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

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

?? moviebuilder.java

?? java版本的flash文件(swf)播放器
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************
 * 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.readers;

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

/**
 * An implementation of the SWFTagTypes interface that builds a Movie object
 */
public class MovieBuilder implements SWFTagTypes 
{
    protected Movie   movie;
    protected MovieClip clip;
    protected boolean newMovie = false;
    protected Frame   frame;
    protected Map     symbols = new HashMap();
    protected TimeLine timeline;
    protected Map     instances = new HashMap();
    
    /**
     * Build a new Movie
     */
    public MovieBuilder()
    {
        movie = new Movie();
        newMovie = true;
        timeline = movie;
    }
    
    /**
     * Append to an existing movie (do not change size,rate,color,version etc)
     */
    public MovieBuilder( Movie movie )
    {
        this.movie = movie;
        newMovie = false;
        timeline = movie;
    }
    
    /**
     * Build the timeline of a MovieClip
     */
    protected MovieBuilder( MovieBuilder parent, MovieClip clip )
    {
        this.movie     = parent.movie;
        this.symbols   = parent.symbols;
        this.clip      = clip;
        newMovie       = false;
        timeline       = clip;
    }    
    
    public Movie getMovie() { return movie; }
    
    /**
     * Get the defined symbols - keyed by Integer( symbolId )
     */
    public Map getDefinedSymbols() { return symbols; }
    
    protected Symbol getSymbol( int id )
    {
        return (Symbol)symbols.get( new Integer( id ) );        
    }
    
    protected void saveSymbol( int id, Symbol s )
    {
        symbols.put( new Integer(id), s );
    }

    protected Instance getInstance( int depth )
    {
        return (Instance)instances.get( new Integer( depth ) );        
    }
    
    protected void saveInstance( int depth, Instance inst )
    {
        if( inst == null )
        {
            try{ throw new Exception();  }
            catch( Exception ex ) { ex.printStackTrace(); }
        }
        instances.put( new Integer(depth), inst );
    }    
    
    /**
     * SWFTags interface
     */    
    public void tag( int tagType, boolean longTag, byte[] contents ) 
        throws IOException
    {
        //ignore unknown tags
    }

    /**
     * SWFHeader interface.
     */
    public void header( int version, long length,
                        int twipsWidth, int twipsHeight,
                        int frameRate, int frameCount ) throws IOException
    {
        if( newMovie )
        {
            movie.setVersion( version );
            movie.setWidth( twipsWidth / SWFConstants.TWIPS );
            movie.setHeight( twipsHeight / SWFConstants.TWIPS );
            movie.setFrameRate( frameRate );
        }
    }
    
    /**
     * SWFTagTypes interface
     */
    public void tagEnd() throws IOException
    {
        //nothing to do
    }

    /**
     * SWFTagTypes interface
     */
    public void tagShowFrame() throws IOException
    {
        //--complete the current frame
        if( frame == null ) timeline.appendFrame();
        else frame = null;
    }
    
    protected Frame currentFrame()
    {
        if( frame == null ) frame = timeline.appendFrame();            
        return frame;
    }
    
    //--Tags yet to be implemented...
    public void tagDefineSound( int id, int format, int frequency,
                                boolean bits16, boolean stereo,
                                int sampleCount, byte[] soundData ) 
        throws IOException {}
    public void tagDefineButtonSound( int buttonId,
                    int rollOverSoundId, SoundInfo rollOverSoundInfo,
                    int rollOutSoundId,  SoundInfo rollOutSoundInfo,
                    int pressSoundId,    SoundInfo pressSoundInfo,
                    int releaseSoundId,  SoundInfo releaseSoundInfo )
        throws IOException {}
    public void tagStartSound( int soundId, SoundInfo info ) throws IOException {}
    public void tagSoundStreamHead( 
        int playbackFrequency, boolean playback16bit, boolean playbackStereo,
        int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo,
        int averageSampleCount ) throws IOException {}
    public void tagSoundStreamHead2( 
        int playbackFrequency, boolean playback16bit, boolean playbackStereo,
        int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo,
        int averageSampleCount ) throws IOException {}
    public void tagSoundStreamBlock( byte[] soundData ) throws IOException {}
    public void tagSerialNumber( String serialNumber ) throws IOException {}
    public void tagGenerator( byte[] data ) throws IOException {}
    public void tagGeneratorText( byte[] data ) throws IOException {}
    public void tagGeneratorCommand( byte[] data ) throws IOException {}
    public void tagGeneratorFont( byte[] data ) throws IOException {}
    public void tagNameCharacter( byte[] data ) throws IOException {}
    public void tagDefineBits( int id, byte[] imageData ) throws IOException {}
    public void tagJPEGTables( byte[] jpegEncodingData ) throws IOException {}
    public void tagDefineBitsJPEG3( int id, byte[] imageData, byte[] alphaData ) throws IOException {}
	public SWFActions tagDoInitAction( int spriteId ) throws IOException { return null; }
    
    
    /**
     * SWFTagTypes interface
     */
    public SWFActions tagDoAction() throws IOException
    {
        Actions acts = currentFrame().actions( movie.getVersion() );
        
        return acts;
    }
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape( int id, Rect outline ) throws IOException
    {
        Shape s = new Shape();
        s.setBoundingRectangle( ((double)outline.getMinX()) / SWFConstants.TWIPS,
                                ((double)outline.getMinY()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxX()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxY()) / SWFConstants.TWIPS );
        
        saveSymbol( id, s );
        
        return new ShapeBuilder( s );
    }
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape2( int id, Rect outline ) throws IOException
    {
        Shape s = new Shape();
        s.setBoundingRectangle( ((double)outline.getMinX()) / SWFConstants.TWIPS,
                                ((double)outline.getMinY()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxX()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxY()) / SWFConstants.TWIPS );
        
        saveSymbol( id, s );
        
        return new ShapeBuilder( s );
    }
    
    /**
     * SWFTagTypes interface
     */
    public SWFShape tagDefineShape3( int id, Rect outline ) throws IOException
    {
        Shape s = new Shape();
        s.setBoundingRectangle( ((double)outline.getMinX()) / SWFConstants.TWIPS,
                                ((double)outline.getMinY()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxX()) / SWFConstants.TWIPS,
                                ((double)outline.getMaxY()) / SWFConstants.TWIPS );
        
        saveSymbol( id, s );
        
        return new ShapeBuilder( s );
    }    
    
    /**
     * SWFTagTypes interface
     */    
    public void tagFreeCharacter( int charId ) throws IOException 
    {
        //nothing
    }
    
    /**
     * SWFTagTypes interface
     */    
    public void tagPlaceObject( int charId, int depth, 
                                Matrix matrix, AlphaTransform cxform ) 
        throws IOException
    {
        Symbol s = getSymbol( charId );
        if( s == null ) return;
                
        timeline.setAvailableDepth( depth );
        Instance inst = currentFrame().placeSymbol( s, ( matrix != null ) ? new Transform(matrix): null, cxform );
        saveInstance( depth, inst );
    }
    
    /**
     * SWFTagTypes interface
     */    
    public SWFActions tagPlaceObject2( boolean isMove,
                                       int clipDepth,
                                       int depth,
                                       int charId,
                                       Matrix matrix,
                                       AlphaTransform cxform,
                                       int ratio,
                                       String name,
                                       int clipActionFlags )  
        throws IOException    
    {
        Instance inst = null;
            
        if( depth == 59 )                 
        {
            //System.out.println( "Place2: " + charId + " isMove=" + isMove + " depth=" + depth + " frame=" + currentFrame().getFrameNumber() );
        }
        
        if( isMove && charId <= 0 )
        {
            inst = getInstance( depth );
            if( inst == null )
            {                
                System.out.println( "Failed to find Instance at depth " + depth );
                return null;
            }
            
            currentFrame().alter( inst, ( matrix != null ) ? new Transform(matrix): null, cxform, ratio );
        }
        else
        {
            Symbol s = getSymbol( charId );

            if( depth == 59 )                 
            {
                //System.out.println( ">>> " + s );
            }
                       
            if( s == null )
            {
                System.out.println( "Failed to find Symbol with id " + charId );
                return null;
            }
                
            if( name != null )
            {                
                Frame frame = currentFrame();
                
                if( isMove )
                {
                    inst = frame.replaceMovieClip( s, depth, ( matrix != null ) ? new Transform(matrix): null, 
                                                   cxform, name, null );
                }
                else
                {
                    timeline.setAvailableDepth( depth );

                    inst = frame.placeMovieClip( s, ( matrix != null ) ? new Transform(matrix): null, 
                                                   cxform, name, null );
                }
                
                saveInstance( depth, inst );                
            }
            else if( clipActionFlags != 0 )
            {
                return new ClipActionBuilder( s, matrix, cxform, depth, name, 
                                              movie.getVersion(), isMove );
            }
            else
            {
                Frame frame = currentFrame();
                
                if( isMove )
                {
                    inst = frame.replaceSymbol( s, depth, ( matrix != null ) ? new Transform(matrix): null, 
                                                   cxform, ratio, clipDepth );
                }
                else
                {
                    timeline.setAvailableDepth( depth );

                    inst = frame.placeSymbol( s, ( matrix != null ) ? new Transform(matrix): null, 
                                                   cxform, ratio, clipDepth );
                }

                saveInstance( depth, inst );
            }
        }        
        
        return null;
    }
        
    /**
     * SWFTagTypes interface
     */ 
    public void tagRemoveObject( int charId, int depth ) throws IOException
    {     
        Instance inst = getInstance( depth );
        if( inst == null ) return;
        
        currentFrame().remove( inst );
    }
        
    /**
     * SWFTagTypes interface
     */ 
    public void tagRemoveObject2( int depth ) throws IOException
    {        
        Instance inst = getInstance( depth );
        if( inst == null ) return;
        
        currentFrame().remove( inst );
    }

    /**
     * SWFTagTypes interface
     */ 
    public void tagSetBackgroundColor( Color color ) throws IOException
    {
        if( newMovie ) movie.setBackColor( color );      
    }

    /**
     * SWFTagTypes interface
     */ 
    public void tagFrameLabel( String label ) throws IOException
    {
		tagFrameLabel( label, false );
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一区| 高清国产一区二区| 久久国产视频网| 91色.com| www久久精品| 亚洲成av人影院在线观看网| 国内成人自拍视频| 欧美日韩极品在线观看一区| 日本一区二区三区视频视频| 日韩中文字幕一区二区三区| 91麻豆国产香蕉久久精品| 精品免费日韩av| 亚洲午夜久久久久久久久电影网 | 国产中文字幕一区| 欧美性猛交xxxxxxxx| 国产精品久久精品日日| 麻豆91免费看| 6080yy午夜一二三区久久| 欧美成人a∨高清免费观看| 国产成人高清视频| 日本成人在线看| 国产成人亚洲综合a∨婷婷图片| 777午夜精品免费视频| 中文字幕在线不卡一区二区三区| 国产一区二区在线看| 欧美疯狂做受xxxx富婆| 亚洲精品videosex极品| 成人视屏免费看| 久久新电视剧免费观看| 美女精品自拍一二三四| 欧美一激情一区二区三区| 亚洲国产一区二区三区| 91国内精品野花午夜精品| 国产精品久久久99| 99免费精品视频| 亚洲三级免费观看| gogogo免费视频观看亚洲一| 国产精品国模大尺度视频| 成人一区二区三区中文字幕| 中文字幕在线观看不卡| 亚洲图片自拍偷拍| 污片在线观看一区二区| 欧美亚洲国产一区二区三区| 亚洲乱码国产乱码精品精98午夜| 色综合色综合色综合色综合色综合 | 91精品国产免费久久综合| 亚洲成人免费观看| 欧美美女一区二区三区| 日本一不卡视频| 久久综合五月天婷婷伊人| 国产精品自拍三区| 最新久久zyz资源站| 91浏览器入口在线观看| 亚洲18影院在线观看| 在线综合视频播放| 久色婷婷小香蕉久久| 国产日韩精品一区二区三区| 成人黄色综合网站| 亚洲国产美国国产综合一区二区| 欧美年轻男男videosbes| 久久精品72免费观看| 国产精品欧美一区二区三区| 日韩一级精品视频在线观看| 久草热8精品视频在线观看| 久久毛片高清国产| 99精品热视频| 日韩成人dvd| 国产丝袜美腿一区二区三区| 99久久伊人久久99| 婷婷激情综合网| 久久久一区二区三区| av爱爱亚洲一区| 亚洲bt欧美bt精品| 久久久国产一区二区三区四区小说| 成人av网站大全| 无吗不卡中文字幕| 国产精品妹子av| 51精品视频一区二区三区| 国产成人午夜精品5599| 亚洲制服丝袜av| 精品99999| 欧美日韩国产电影| 成人在线视频首页| 久久福利视频一区二区| 亚洲精品综合在线| 久久精品一区蜜桃臀影院| 色菇凉天天综合网| 国产传媒日韩欧美成人| 亚洲国产中文字幕| 亚洲色图欧洲色图| 欧美精品一区男女天堂| 欧美人xxxx| 91最新地址在线播放| 精品一区二区三区在线播放| 亚洲欧美日韩一区二区| 久久久精品tv| 精品成人在线观看| 91精品国产手机| 欧美亚州韩日在线看免费版国语版| 韩国视频一区二区| 日韩在线一区二区| 怡红院av一区二区三区| 国产精品国产自产拍在线| 精品乱人伦小说| 欧美丰满一区二区免费视频| 欧美自拍丝袜亚洲| 91日韩在线专区| 成人免费毛片app| 国产91富婆露脸刺激对白| 国产亚洲一区二区三区| 狠狠色伊人亚洲综合成人| 欧美日韩视频专区在线播放| 久久国产免费看| 青娱乐精品在线视频| 亚洲第一激情av| 亚洲综合视频网| 亚洲精品高清视频在线观看| 国产精品久久久久影视| 日本一区二区三区视频视频| 欧美国产成人在线| 国产欧美一区二区精品婷婷| 久久综合色鬼综合色| 26uuu成人网一区二区三区| 精品国产乱码久久久久久久| 日韩欧美123| 久久久久久免费网| 久久午夜国产精品| 国产精品久久久久久久蜜臀| 国产精品丝袜91| 最近日韩中文字幕| 亚洲一区在线观看网站| 亚洲成年人影院| 日韩国产精品久久| 秋霞电影一区二区| 日本欧美在线观看| 国产精品电影一区二区| 亚洲精品一线二线三线| 精品粉嫩超白一线天av| 日韩免费观看高清完整版 | 91性感美女视频| 欧美另类高清zo欧美| 欧美三级韩国三级日本三斤| 欧美高清视频www夜色资源网| 5858s免费视频成人| 日韩美女天天操| 久久精品亚洲乱码伦伦中文 | 日本欧美一区二区在线观看| 日韩激情一二三区| 韩国成人精品a∨在线观看| 久久精品99国产精品日本| 国产精品 日产精品 欧美精品| 风流少妇一区二区| 欧美日韩一区二区在线观看| 欧美日韩久久一区| 亚洲精品国产精品乱码不99| 精品一二线国产| 日本成人在线视频网站| 日韩电影在线一区二区| 国产自产2019最新不卡| 日韩欧美在线观看一区二区三区| 欧美美女黄视频| 久久久不卡影院| 视频一区中文字幕| 国产传媒欧美日韩成人| 在线亚洲一区二区| 精品久久久久久无| 亚洲免费在线电影| 久久精品国产免费看久久精品| 大尺度一区二区| 日韩视频在线永久播放| 亚洲日本va午夜在线电影| 久久99国产精品尤物| 在线观看成人免费视频| 久久久国产午夜精品| 日韩国产高清影视| 色欧美乱欧美15图片| 久久精品水蜜桃av综合天堂| 五月开心婷婷久久| 欧美在线免费播放| 福利视频网站一区二区三区| 亚洲h在线观看| 91啪九色porn原创视频在线观看| 日韩三区在线观看| 一区二区三区加勒比av| 国产精品亚洲一区二区三区在线| 欧美日韩aaa| 亚洲欧美激情小说另类| 国产成人精品免费一区二区| 日韩精品一区二区三区中文不卡| 亚洲亚洲精品在线观看| 97久久精品人人做人人爽50路| 欧美日韩在线亚洲一区蜜芽| 国产精品乱码一区二三区小蝌蚪| 国产精品资源在线观看| 欧美日韩视频不卡| 国产精品久久毛片a| 成人激情黄色小说| 国产精品天天看| 成人综合在线观看| 国产日韩欧美不卡|