亚洲欧美第一页_禁久久精品乱码_粉嫩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同城在线观看| 亚洲激情在线播放| 91激情五月电影| 成人av先锋影音| 国产精品一级片| 亚洲成人高清在线| 中文字幕日韩精品一区| 国产精品色哟哟| 久久免费视频一区| 日韩亚洲欧美一区| 欧美丝袜第三区| 国产曰批免费观看久久久| 亚洲精品第1页| 国产精品美女久久久久久久 | 精品国精品国产| 欧美色图激情小说| 99久久婷婷国产综合精品电影| 久久se精品一区精品二区| 国模一区二区三区白浆| 日韩精品视频网| 亚洲国产日韩在线一区模特| 日韩伦理免费电影| 亚洲成人777| 天天色图综合网| 亚洲一二三四久久| 欧美精品tushy高清| 精品久久人人做人人爱| 2021久久国产精品不只是精品| 91女神在线视频| 成人午夜免费视频| 成人ar影院免费观看视频| 成人18视频在线播放| 成人激情免费视频| 91丨porny丨最新| 91亚洲大成网污www| 播五月开心婷婷综合| 暴力调教一区二区三区| 99久久伊人网影院| 日本大香伊一区二区三区| zzijzzij亚洲日本少妇熟睡| 91老师片黄在线观看| 色猫猫国产区一区二在线视频| 蜜臀av性久久久久蜜臀aⅴ| 日韩精品一级中文字幕精品视频免费观看 | 国产成人精品免费看| 免费观看一级欧美片| 久久成人综合网| 粉嫩一区二区三区性色av| 久久99热狠狠色一区二区| 国产剧情一区二区| 狠狠色狠狠色综合系列| 激情五月播播久久久精品| 奇米一区二区三区| 国产在线播放一区| caoporn国产精品| 91蜜桃婷婷狠狠久久综合9色| 在线精品视频一区二区三四| 日韩一区二区不卡| 国产日韩欧美精品电影三级在线| 国产精品久久久久久久久免费相片| 国产欧美一区二区三区在线看蜜臀 | 亚洲va天堂va国产va久| 捆绑调教一区二区三区| 亚洲与欧洲av电影| 99久久国产综合色|国产精品| 欧美老年两性高潮| 99在线视频精品| 欧美日韩中文字幕一区| 国产日韩视频一区二区三区| 亚洲一区二区三区四区在线免费观看 | 亚洲美女视频在线观看| 欧美在线免费观看亚洲| 久久精品国产**网站演员| 国产精品国产a| 欧美亚洲国产bt| 激情综合色综合久久| 欧美精品一区二区久久久| 成人一区二区三区在线观看| 国产精品国产自产拍高清av王其 | 欧美一级艳片视频免费观看| 久久精品国产免费| 亚洲男人都懂的| 在线播放中文字幕一区| 国产成人免费在线观看不卡| 亚洲精品国产精品乱码不99| 在线欧美日韩精品| 韩国欧美国产一区| 亚洲午夜av在线| 国产精品久久久一本精品| 欧美一区二区三区影视| 欧美亚洲综合另类| 91在线视频观看| 国产一区二区影院| 日韩不卡一区二区| 亚洲一区在线播放| 国产精品美女一区二区在线观看| 一本大道av一区二区在线播放 | 91麻豆国产精品久久| 五月婷婷色综合| 亚洲欧美日韩电影| 亚洲视频在线一区观看| 久久毛片高清国产| 久久综合成人精品亚洲另类欧美| 欧美精品国产精品| 91麻豆精品国产自产在线观看一区| 92国产精品观看| 欧美视频中文字幕| 欧美日韩一区久久| 欧美成人女星排名| 国产欧美一区二区三区网站| 亚洲欧洲色图综合| 亚洲国产精品影院| 裸体歌舞表演一区二区| 国产一区二区在线电影| 成人app网站| 欧美日韩另类一区| 精品国产免费久久| 国产欧美一区二区三区鸳鸯浴| 亚洲天堂福利av| 蜜桃在线一区二区三区| 成人免费av资源| 欧美日韩国产一区二区三区地区| 欧美一区二区日韩| √…a在线天堂一区| 日本一区中文字幕| caoporn国产一区二区| 欧美色综合网站| 国产亚洲综合在线| 天天色天天操综合| 成人网在线播放| 欧美mv日韩mv国产| 日韩美女精品在线| 国产精一区二区三区| 欧美日韩一区二区三区视频| 2017欧美狠狠色| 福利一区二区在线| 亚洲精品视频免费观看| 在线视频一区二区三| 亚洲欧洲av在线| 欧美精品日韩精品| 激情亚洲综合在线| 亚洲三级视频在线观看| 欧美日韩电影一区| 韩日精品视频一区| 亚洲国产精品激情在线观看| 国产一区二区精品久久| 久久女同精品一区二区| 国产一区二区三区不卡在线观看| 日韩欧美国产1| 婷婷激情综合网| 久久影院午夜片一区| 91女厕偷拍女厕偷拍高清| 亚洲综合小说图片| 日韩欧美在线不卡| 福利一区福利二区| 五月婷婷久久综合| 国产精品成人网| 91麻豆免费在线观看| 亚洲成人黄色影院| 精品人在线二区三区| 成人一区二区三区在线观看 | 日韩理论电影院| 久久国产精品99久久人人澡| 亚洲三级免费观看| 国产蜜臀97一区二区三区| 日韩一区二区精品葵司在线| 性做久久久久久久免费看| 波多野洁衣一区| 国产真实乱对白精彩久久| 午夜久久电影网| 午夜伊人狠狠久久| 亚洲一区在线电影| 亚洲一区二区三区免费视频| 亚洲日本电影在线| 中文字幕在线一区免费| 国产精品激情偷乱一区二区∴| 国产午夜精品一区二区| 欧美国产精品一区二区三区| 久久综合狠狠综合| 欧美国产亚洲另类动漫| 日本一区二区综合亚洲| 亚洲视频免费在线| 一二三区精品视频| 亚洲精选免费视频| 一本久久综合亚洲鲁鲁五月天| 日韩一区欧美一区| 国产伦精品一区二区三区免费迷| 欧美日韩一区国产| 蜜桃久久av一区| 欧美绝品在线观看成人午夜影视| 亚洲六月丁香色婷婷综合久久| jlzzjlzz亚洲日本少妇| 又紧又大又爽精品一区二区| 欧美日韩高清不卡| 96av麻豆蜜桃一区二区| 日韩精品专区在线| 性做久久久久久免费观看 | 国产精品456| 欧美精品一区二区久久久| 国内精品在线播放|