亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tagwriter.java

?? java版本的flash文件(swf)播放器
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/****************************************************************
 * Copyright (c) 2001, David N. Main, All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or
 * without modification, are permitted provided that the 
 * following conditions are met:
 *
 * 1. Redistributions of source code must retain the above 
 * copyright notice, this list of conditions and the following 
 * disclaimer. 
 * 
 * 2. Redistributions in binary form must reproduce the above 
 * copyright notice, this list of conditions and the following 
 * disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * 3. The name of the author may not be used to endorse or 
 * promote products derived from this software without specific 
 * prior written permission. 
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
 * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ****************************************************************/
package com.anotherbigidea.flash.writers;

import java.io.*;
import java.util.*;
import java.util.zip.*;
import com.anotherbigidea.io.*;
import com.anotherbigidea.flash.*;
import com.anotherbigidea.flash.structs.*;
import com.anotherbigidea.flash.interfaces.*;

/**
 * A writer that implements the SWFTagTypes interface and writes
 * to a SWFTags interface
 */
public class TagWriter implements SWFTagTypes, SWFConstants, SWFFileSignature 
{
    protected SWFTags mTags;
        
    protected OutStream out;
    protected ByteArrayOutputStream bytes;
    protected int     tagType;
    protected boolean longTag;
    protected int version;
    protected String mStringEncoding = SWFConstants.STRING_ENCODING_MX;
    
    public TagWriter( SWFTags tags )
    {
        mTags = tags;
    }
    
    protected OutStream getOutStream() { return out; }
    
    protected SWFActions factorySWFActions()
    {
        return new ActionWriter( this, version );
    }
    
    protected SWFShape factorySWFShape( boolean hasAlpha, boolean hasStyle )
    {
        return new SWFShapeImpl( this, hasAlpha, hasStyle );
    }
    
	/**
	 * @see SWFFileSignature#signature(String)
	 */
	public void signature( String sig ) {
		if( mTags instanceof SWFFileSignature ) {
			((SWFFileSignature) mTags).signature( sig );
		}
	}    
    
    /**
     * Start a new tag context
     */
    protected void startTag( int tagType, boolean longTag )
    {
        this.tagType = tagType;
        this.longTag = longTag;
        
        bytes = new ByteArrayOutputStream( 10000 );
        out   = new OutStream( bytes );
    }
    
    /**
     * Start a new definition tag context
     */
    protected void startTag( int tagType, int id, boolean longTag )
        throws IOException 
    {
        startTag( tagType, longTag );        
        out.writeUI16( id );
    }
        
    /**
     * Finish the tag context and write the tag
     */
    protected void completeTag() throws IOException 
    {
        out.flush();
        byte[] contents = bytes.toByteArray();
        
        out = null;
        bytes = null;
        
        mTags.tag( tagType, longTag, contents );        
    }
    
    /**
     * SWFTags interface
     */    
    public void tag( int tagType, boolean longTag, byte[] contents ) 
        throws IOException
    {
        mTags.tag( tagType, longTag, contents );
    }
    
    /**
     * SWFHeader interface.
     * Sets movie length to -1 to force a recalculation since the length
     * cannot be guaranteed to be the same as the original.
     */
    public void header( int version, long length,
                        int twipsWidth, int twipsHeight,
                        int frameRate, int frameCount ) throws IOException
    {
        this.version = version;
        mTags.header( version, -1, twipsWidth, twipsHeight, frameRate, frameCount );
        
        //set encoding to Ascii if pre-MX
        if( version < SWFConstants.FLASH_MX_VERSION ) {
        	mStringEncoding = SWFConstants.STRING_ENCODING_PRE_MX; 
        } 
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagEnd() throws IOException
    {
        mTags.tag( TAG_END, false, null );
    }

    /**
     * SWFTagTypes interface
     */
    public void tagShowFrame() throws IOException
    {
        mTags.tag( TAG_SHOWFRAME, false, null );
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagDefineSound( int id, int format, int frequency,
                                boolean bits16, boolean stereo,
                                int sampleCount, byte[] soundData ) 
        throws IOException
    {
        startTag( TAG_DEFINESOUND, id, true );
        out.writeUBits( 4, format );
        out.writeUBits( 2, frequency );
        out.writeUBits( 1, bits16 ? 1 : 0 );
        out.writeUBits( 1, stereo ? 1 : 0 );
        out.writeUI32 ( sampleCount );
        out.write( soundData );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagDefineButtonSound( int buttonId,
                    int rollOverSoundId, SoundInfo rollOverSoundInfo,
                    int rollOutSoundId,  SoundInfo rollOutSoundInfo,
                    int pressSoundId,    SoundInfo pressSoundInfo,
                    int releaseSoundId,  SoundInfo releaseSoundInfo )
        throws IOException
    {
        startTag( TAG_DEFINEBUTTONSOUND, buttonId, true );
        
        out.writeUI16( rollOverSoundId );
        if( rollOverSoundId != 0 ) rollOverSoundInfo.write( out );

        out.writeUI16( rollOutSoundId );
        if( rollOutSoundId != 0 ) rollOutSoundInfo.write( out );
        
        out.writeUI16( pressSoundId );
        if( pressSoundId != 0 ) pressSoundInfo.write( out );
        out.writeUI16( releaseSoundId );
        if( releaseSoundId != 0 ) releaseSoundInfo.write( out );
        
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagStartSound( int soundId, SoundInfo info ) throws IOException
    {
        startTag( TAG_STARTSOUND, soundId, false );
        info.write( out );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagSoundStreamHead( 
        int playbackFrequency, boolean playback16bit, boolean playbackStereo,
        int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo,
        int averageSampleCount ) throws IOException
    {
        writeSoundStreamHead( TAG_SOUNDSTREAMHEAD,
            playbackFrequency, playback16bit, playbackStereo,
            streamFormat, streamFrequency, stream16bit, streamStereo,
            averageSampleCount );
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagSoundStreamHead2( 
        int playbackFrequency, boolean playback16bit, boolean playbackStereo,
        int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo,
        int averageSampleCount ) throws IOException
    {
        writeSoundStreamHead( TAG_SOUNDSTREAMHEAD2,
            playbackFrequency, playback16bit, playbackStereo,
            streamFormat, streamFrequency, stream16bit, streamStereo,
            averageSampleCount );
    }
    
    public void writeSoundStreamHead( int tag,
        int playbackFrequency, boolean playback16bits, boolean playbackStereo,
        int streamFormat, int streamFrequency, boolean stream16bits, boolean streamStereo,
        int averageSampleCount ) throws IOException    
    {
        startTag( tag, false );
        
        out.writeUBits(4,0);
        out.writeUBits(2,playbackFrequency);
        out.writeUBits(1, playback16bits ? 1 : 0 );
        out.writeUBits(1, playbackStereo ? 1 : 0 );
        
        out.writeUBits(4,streamFormat);
        out.writeUBits(2,streamFrequency);
        out.writeUBits(1, stream16bits ? 1 : 0 );
        out.writeUBits(1, streamStereo ? 1 : 0 );        
        out.writeUI16 (averageSampleCount);
        
        if( streamFormat == SWFConstants.SOUND_FORMAT_MP3 )
        {
            out.writeUI16 (0); //unknown
        }
        
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagSoundStreamBlock( byte[] soundData ) throws IOException
    {
        startTag( TAG_SOUNDSTREAMBLOCK, true );
        out.write( soundData );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagSerialNumber( String serialNumber ) throws IOException
    {
        startTag( TAG_SERIALNUMBER, false );
        out.writeString( serialNumber, mStringEncoding );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagGenerator( byte[] data ) throws IOException
    {
        startTag( TAG_FLASHGENERATOR, false );
        out.write( data );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagGeneratorText( byte[] data ) throws IOException
    {
        startTag( TAG_GENERATOR_TEXT, false );
        out.write( data );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagGeneratorCommand( byte[] data ) throws IOException
    {
        startTag( TAG_TEMPLATECOMMAND, false );
        out.write( data );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagGeneratorFont( byte[] data ) throws IOException
    {
        startTag( TAG_GEN_EXTERNAL_FONT, false );
        out.write( data );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagNameCharacter( byte[] data ) throws IOException
    {
        startTag( TAG_NAMECHARACTER, false );
        out.write( data );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagDefineBits( int id, byte[] imageData ) throws IOException
    {
        startTag( TAG_DEFINEBITS, id, true );
        out.write( imageData );
        completeTag();
    }  
    
    /**
     * SWFTagTypes interface
     */
    public void tagJPEGTables( byte[] jpegEncodingData ) throws IOException
    {
        startTag( TAG_JPEGTABLES, true );
        out.write( jpegEncodingData );
        completeTag();
    }

    /**
     * SWFTagTypes interface
     */
    public void tagDefineBitsJPEG3( int id, byte[] imageData, byte[] alphaData ) throws IOException
    {
        startTag( TAG_DEFINEBITSJPEG3, id, true );
        out.writeUI32( imageData.length );
        out.write( imageData );
        out.write( alphaData );
        completeTag();        
    }        
    
    /**
     * SWFTagTypes interface
     */
    public SWFActions tagDoAction() throws IOException
    {
        startTag( TAG_DOACTION, true );
        return factorySWFActions();
    }
    
	/**
	 * SWFTagTypes interface
	 */
	public SWFActions tagDoInitAction( int spriteId ) throws IOException {
		startTag( TAG_DOINITACTION, spriteId, true );
		return factorySWFActions();		    
	}
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape( int id, Rect outline ) throws IOException
    {
        startShape( TAG_DEFINESHAPE, id, outline );
        return factorySWFShape( false, true );
    }
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape2( int id, Rect outline ) throws IOException
    {
        startShape( TAG_DEFINESHAPE2, id, outline );
        return factorySWFShape( false, true );
    }
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape3( int id, Rect outline ) throws IOException
    {
        startShape( TAG_DEFINESHAPE3, id, outline );
        return factorySWFShape( true, true );        
    }    
    
    /**
     * SWFTagTypes interface
     */    
    public void tagFreeCharacter( int charId ) throws IOException 
    {
        startTag( TAG_FREECHARACTER, false );
        out.writeUI16( charId );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */    
    public void tagPlaceObject( int charId, int depth, 
                                Matrix matrix, AlphaTransform cxform ) 
        throws IOException
    {
        startTag( TAG_PLACEOBJECT, false );
        out.writeUI16( charId );        
        out.writeUI16( depth );
        matrix.write ( out );
        if( cxform != null ) cxform.write( out );
        completeTag();
    }
    
    /**
     * SWFTagTypes interface
     */    
    public SWFActions tagPlaceObject2( boolean isMove,
                                       int clipDepth,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91成人看片片| 日韩欧美第一区| 亚洲欧美日韩一区| 日本欧美一区二区在线观看| 在线一区二区三区做爰视频网站| 亚洲激情中文1区| 亚洲激情在线播放| 日韩欧美国产一区二区在线播放| 色婷婷亚洲一区二区三区| 精品亚洲成a人| 久久精品日产第一区二区三区高清版| 日韩avvvv在线播放| 91精品国产免费| 国产.欧美.日韩| 亚洲va欧美va国产va天堂影院| av不卡免费电影| 婷婷国产在线综合| 国产精品全国免费观看高清| 欧美日韩午夜精品| 亚洲国产一区二区视频| 欧美tickling网站挠脚心| 国内成+人亚洲+欧美+综合在线| 欧美在线你懂的| 久久综合色综合88| 日韩av中文在线观看| 欧美色欧美亚洲另类二区| 亚洲高清不卡在线观看| 亚洲日本在线天堂| 亚洲欧洲在线观看av| 欧美国产综合色视频| 成人av手机在线观看| 精品av综合导航| 国产精品正在播放| 国产视频亚洲色图| 国产裸体歌舞团一区二区| 精品久久久久一区二区国产| 婷婷开心激情综合| 欧美成人一级视频| 欧美bbbbb| 专区另类欧美日韩| 91视频xxxx| 日韩高清国产一区在线| 久久久国产午夜精品| 日韩欧美亚洲一区二区| 欧美日韩专区在线| 成人美女视频在线观看| 国产精品18久久久久久久久| 香蕉成人啪国产精品视频综合网| 国产精品毛片久久久久久久| 欧美午夜在线观看| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲精品中文字幕乱码三区| 日韩黄色免费网站| 国产精品久久国产精麻豆99网站| 久久久蜜臀国产一区二区| 欧美精品一区视频| 国产精品成人一区二区艾草| 亚洲成av人影院| 国产丶欧美丶日本不卡视频| 欧美极品xxx| 久久久久综合网| 欧美精品 国产精品| 欧美无乱码久久久免费午夜一区 | 欧美三级日韩在线| 99国产精品视频免费观看| 麻豆精品新av中文字幕| 国产精品一卡二| av电影在线观看一区| 欧美丝袜第三区| 久久久久99精品一区| 亚洲线精品一区二区三区| 亚洲成a人在线观看| 青青青伊人色综合久久| 91性感美女视频| 精品美女在线观看| 午夜av电影一区| 亚洲日穴在线视频| 精品福利在线导航| 成人免费毛片嘿嘿连载视频| 亚洲成人自拍偷拍| 日韩欧美色综合| 99久久777色| 日本欧美在线观看| 亚洲欧美另类小说视频| 欧美不卡123| 色综合久久中文综合久久牛| 免费不卡在线观看| 夜色激情一区二区| 亚洲欧洲性图库| 久久蜜臀精品av| 日韩女优毛片在线| 欧美色欧美亚洲另类二区| 不卡的av电影| 国产毛片精品国产一区二区三区| 午夜精品久久久久影视| 自拍偷自拍亚洲精品播放| 国产日韩综合av| 精品电影一区二区| 日韩视频在线观看一区二区| 欧美三级乱人伦电影| 在线观看中文字幕不卡| 美国精品在线观看| 国产欧美精品区一区二区三区 | 99久久99久久免费精品蜜臀| 美女精品一区二区| 亚洲一区精品在线| 国产欧美一区二区三区鸳鸯浴 | 欧美日韩精品一区二区三区四区 | 色综合天天做天天爱| 日韩中文字幕91| 国产日本亚洲高清| 色先锋久久av资源部| 亚洲精品写真福利| 国产精品黄色在线观看| 国产精品日韩成人| 国产午夜亚洲精品羞羞网站| 久久久久久久综合| 国产日韩视频一区二区三区| 久久久国产精品午夜一区ai换脸| 亚洲成人精品影院| 日韩限制级电影在线观看| 99久久99久久综合| 成人久久视频在线观看| 蜜桃精品视频在线| 亚洲精品成人悠悠色影视| 久久蜜桃av一区精品变态类天堂 | 亚洲天堂av一区| 精品久久久久久久久久久久久久久久久| 97久久超碰国产精品| 美国毛片一区二区三区| 日韩精彩视频在线观看| 亚洲成人777| 青青草原综合久久大伊人精品| 亚洲影院理伦片| 亚洲午夜久久久久久久久电影院| 国产精品久久久久久久蜜臀| 中文字幕不卡一区| 精品国产制服丝袜高跟| xvideos.蜜桃一区二区| 欧美大肚乱孕交hd孕妇| 国产嫩草影院久久久久| 国产欧美中文在线| 亚洲一区中文日韩| 欧美国产成人在线| 日韩美女视频19| 日本一道高清亚洲日美韩| 狠狠色综合播放一区二区| 波多野结衣亚洲| 91香蕉国产在线观看软件| 欧美日韩视频在线第一区| 欧美一区二区啪啪| 国产欧美日韩在线看| 亚洲不卡一区二区三区| 国产伦精品一区二区三区免费 | 欧美国产国产综合| 亚洲一区在线观看视频| 韩国女主播一区| 在线观看精品一区| 国产欧美日韩精品在线| 日韩精品亚洲一区| 91视频xxxx| 欧美日韩高清影院| 亚洲欧美综合另类在线卡通| 亚洲国产aⅴ成人精品无吗| 免费在线成人网| 欧美中文字幕久久| 亚洲欧美另类久久久精品2019| 美女www一区二区| 91精品国产一区二区三区蜜臀| 亚洲精品水蜜桃| 国产成人av电影在线播放| 欧美成人一区二区三区| 美国三级日本三级久久99 | 亚洲人成精品久久久久久| 久久99精品久久久久久久久久久久| 欧美日韩在线播放三区四区| 亚洲综合成人网| 欧美视频一区二区三区在线观看| 亚洲美女屁股眼交| 欧美中文字幕一区二区三区亚洲| 亚洲欧美日韩小说| 欧美日韩免费观看一区三区| 伊人色综合久久天天| 欧美日韩情趣电影| 日韩精品久久理论片| 欧美一区二区三区色| 国产精品一区在线观看乱码| 久久久久久久久久电影| 成人av电影在线| 亚洲一区自拍偷拍| 欧美日韩精品电影| 麻豆精品国产91久久久久久| 26uuu精品一区二区在线观看| 国产99一区视频免费| 亚洲精品写真福利| 日韩美女天天操| 91视频一区二区| 理论电影国产精品| 中文字幕av一区 二区| 在线免费一区三区|