亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲欧洲成人av每日更新| 日韩国产一二三区| 日韩av网站免费在线| 日韩精品一二三| 91色.com| 亚洲国产精品成人综合色在线婷婷| 亚洲第一搞黄网站| 成人免费不卡视频| 26uuu久久天堂性欧美| 亚洲成a人v欧美综合天堂下载| 国产福利精品一区| 91精品婷婷国产综合久久竹菊| 亚洲欧美日韩国产成人精品影院| 精品一区二区三区在线观看| 欧美另类videos死尸| 亚洲日本在线看| 成人精品一区二区三区中文字幕| 2023国产精品| 裸体一区二区三区| 精品视频色一区| 一区二区三区中文在线观看| 成人污污视频在线观看| 久久精品一区四区| 麻豆精品在线播放| 欧美一区二区网站| 日韩精品电影在线| 91精品国产综合久久久蜜臀粉嫩| 亚洲国产美女搞黄色| 色嗨嗨av一区二区三区| 一区二区在线观看免费视频播放| 99精品在线免费| 亚洲欧洲av另类| 色综合婷婷久久| 亚洲理论在线观看| eeuss鲁一区二区三区| 国产精品国产精品国产专区不蜜| 国产91在线观看| 成人欧美一区二区三区1314| 成人不卡免费av| 亚洲精品国产一区二区精华液| 一本色道久久加勒比精品| 一区二区三区久久久| 欧美性一二三区| 午夜视频一区在线观看| 欧美一区二区三区视频在线观看| 蜜桃视频免费观看一区| 精品国产91洋老外米糕| 国产a区久久久| 亚洲婷婷综合色高清在线| 色综合天天性综合| 午夜影视日本亚洲欧洲精品| 欧美成人性战久久| 岛国精品在线观看| 亚洲黄色尤物视频| 欧美福利一区二区| 国产精品影音先锋| 最好看的中文字幕久久| 欧美在线观看禁18| 麻豆91免费看| 国产精品动漫网站| 欧美福利视频导航| 成人精品视频一区二区三区尤物| 亚洲人成7777| 欧美日韩aaaaa| 国产精品综合在线视频| 免费观看一级特黄欧美大片| 久久久国产精品不卡| 91黄色免费观看| 国内精品伊人久久久久影院对白| 亚洲视频电影在线| 日韩一区二区视频| 91在线视频观看| 麻豆freexxxx性91精品| 一区二区三区自拍| 精品国产自在久精品国产| 色综合视频在线观看| 国产综合一区二区| 亚洲一区在线观看免费| 国产亚洲欧美激情| 欧美一区二区观看视频| 91麻豆成人久久精品二区三区| 激情综合一区二区三区| 一区二区国产视频| 欧美极品少妇xxxxⅹ高跟鞋| 在线播放中文一区| 91色综合久久久久婷婷| 国产在线日韩欧美| 日韩成人午夜电影| 一区二区视频免费在线观看| 久久久久久亚洲综合影院红桃| 欧美日韩亚洲另类| 97se狠狠狠综合亚洲狠狠| 国产一区二区三区在线看麻豆| 午夜精品123| 一区二区三区高清| 国产精品免费aⅴ片在线观看| 精品日产卡一卡二卡麻豆| 欧美日韩美女一区二区| 色婷婷久久久亚洲一区二区三区| 国产麻豆成人精品| 看国产成人h片视频| 亚洲mv在线观看| 午夜欧美大尺度福利影院在线看| 综合电影一区二区三区| 国产精品三级av| 欧美国产在线观看| 国产色产综合产在线视频| 精品国产制服丝袜高跟| 精品久久久久久亚洲综合网| 日韩片之四级片| 91精品国产高清一区二区三区蜜臀| 色94色欧美sute亚洲线路二| 99精品视频在线观看免费| 不卡视频在线看| 91美女片黄在线观看| 95精品视频在线| 色94色欧美sute亚洲线路一ni| 91福利视频在线| 欧美日韩成人综合| 欧美电影在线免费观看| 欧美日韩不卡在线| 日韩一级二级三级| 日韩欧美国产电影| 精品国产一区二区三区不卡| 精品国产123| 国产婷婷一区二区| 国产精品乱码人人做人人爱 | 黄页视频在线91| 精品亚洲成a人在线观看 | 亚洲一区在线视频观看| 亚洲国产乱码最新视频| 日韩国产在线观看一区| 玖玖九九国产精品| 国产精品系列在线观看| 成人app在线观看| 色狠狠一区二区| 日韩视频一区在线观看| 久久久久久久精| 中文字幕亚洲欧美在线不卡| 亚洲最大成人综合| 日韩在线一区二区三区| 韩国理伦片一区二区三区在线播放 | 精品午夜一区二区三区在线观看| 国产裸体歌舞团一区二区| 成人va在线观看| 欧美日韩的一区二区| 欧美精品一区二区三区四区| 中文字幕日韩av资源站| 亚洲尤物在线视频观看| 黄色日韩网站视频| 欧美综合亚洲图片综合区| 日韩欧美一区电影| 国产精品白丝在线| 日韩成人精品在线| 高清不卡在线观看av| 欧美日韩国产bt| 国产精品久久久久aaaa樱花| 日韩电影免费在线看| a在线欧美一区| 日韩一级二级三级| 亚洲裸体xxx| 国产一区二区久久| 欧美日韩色综合| 中文字幕制服丝袜成人av| 日本欧美一区二区| 欧洲色大大久久| 国产精品视频免费| 日本伊人色综合网| 91麻豆免费视频| 中文字幕欧美三区| 国产福利91精品一区二区三区| 在线免费精品视频| 亚洲欧美自拍偷拍色图| 激情五月激情综合网| 欧美日韩国产乱码电影| 亚洲欧美日韩一区二区三区在线观看 | 日韩精品电影一区亚洲| 91久久精品一区二区二区| 中文一区二区完整视频在线观看| 日本欧美韩国一区三区| 精品视频1区2区| 亚洲欧美日韩系列| 夫妻av一区二区| 久久蜜桃av一区精品变态类天堂| 天堂av在线一区| 91黄色免费看| 一区二区三区四区中文字幕| 成人午夜av在线| 国产精品色噜噜| 丰满白嫩尤物一区二区| 久久午夜电影网| 国产毛片精品一区| 欧美精品一区二区三区蜜臀| 免费成人美女在线观看.| 这里只有精品99re| 麻豆一区二区99久久久久| 6080国产精品一区二区| 日本在线观看不卡视频| 欧美一区二区三区喷汁尤物| 日韩精品亚洲专区|