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

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

?? frame.java

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

import java.io.IOException;
import java.util.Enumeration;
import java.util.Vector;

import com.anotherbigidea.flash.SWFConstants;
import com.anotherbigidea.flash.interfaces.SWFActions;
import com.anotherbigidea.flash.interfaces.SWFTagTypes;
import com.anotherbigidea.flash.sound.SoundStreamHead;
import com.anotherbigidea.flash.structs.AlphaTransform;
import com.anotherbigidea.flash.structs.SoundInfo;

/**
 * A Movie or Movie Clip frame
 */
public class Frame
{
    protected int frameNumber;
    protected String label;
    protected Vector placements = new Vector();
    protected boolean stop;
    protected TimeLine timeline;
    protected Actions actions;
    protected SoundStreamHead soundHeader;
    protected byte[] soundData;
    protected Sound soundToStart;
    protected int    customTag = -1;
    protected byte[] customTagData;
    protected boolean mAnchor; //true for an anchor frame (Flash MX+)
    
    protected Frame( int number, TimeLine timeline )
    {
        frameNumber = number;
        this.timeline = timeline;
    }
    
    public SoundStreamHead getSoundHeader() { return soundHeader; }
    public void setSoundHeader( SoundStreamHead header ) { soundHeader = header; }

    public byte[] getSoundData() { return soundData; }
    public void   setSoundData( byte[] data ) { soundData = data; }
    
    public boolean isAnchor() { return mAnchor; }
    public void setAnchor( boolean isAnchor ) { mAnchor = isAnchor; }
    
    /**
     * Set a custom tag to be written at the start of the frame
     */
    public void setCustomTag( int tagId, byte[] tagData )
    {
        this.customTag     = tagId;
        this.customTagData = tagData;
    }
    
    /**
     * @return number of frames required for the sound
     */
    public int startSound( Sound soundToStart, int framesPerSec )
    {
        this.soundToStart = soundToStart;
        
        int freq = soundToStart.getFrequency();
        switch( freq )
        {
            case SWFConstants.SOUND_FREQ_5_5KHZ: freq = 5500; break;
            case SWFConstants.SOUND_FREQ_11KHZ:  freq = 11000; break;
            case SWFConstants.SOUND_FREQ_22KHZ:  freq = 22000; break;
            case SWFConstants.SOUND_FREQ_44KHZ:  freq = 44000; break;
            default: freq = 22000; break;
        }
        
        int samples = soundToStart.getSampleCount();
        int length = samples / freq;
        return length * framesPerSec;
    }
    
    /**
     * Get the frame actions
     */
    public Actions getActions() { return actions; }
    
    /**
     * Set the frame actions (or null them out)
     */
    public void setActions( Actions actions ) { this.actions = actions; }
    
    /** 
     * Reset the frame actions (if any) and return the new empty Actions object
     */
    public Actions actions( int flashVersion ) 
    { 
        actions = new Actions( 0, flashVersion ); 
        return actions;
    }
    
    /**
     * Get the frame number
     */
    public int getFrameNumber() { return frameNumber; }

    /**
     * Get the placements in this frame
     */
    public Placement[] getPlacements()
    {
        Placement[] p= new Placement[ placements.size() ];
        placements.copyInto( p );
        return p;
    }

    /**
     * Get the frame label
     * @return null if the frame has no label
     */
    public String getLabel() { return label; }

    /**
     * Set the frame label - set to null to clear any label
     */
    public void setLabel( String label ) { this.label = label; }

    /**
     * Set the stop flag - if true then the movie will stop at this frame.
     * This can be set on the last frame to prevent the movie looping.
     */
    public void stop() { this.stop = true; }


    /**
     * Place a symbol at the given coordinates at the next available
     * depth.
     */
    public Instance placeSymbol( Symbol symbol, int x, int y )
    {
        return placeSymbol( symbol, new Transform( x, y ), null, -1, -1 );
    }

    /**
     * Place a symbol at the next available depth with the given
     * matrix transform and color transform.
     * 
     * @param matrix may be null to place the symbol at (0,0)
     * @param cxform may be null if no color transform is required
     */
    public Instance placeSymbol( Symbol symbol, Transform matrix, AlphaTransform cxform )
    {
        return placeSymbol( symbol, matrix, cxform, -1, -1 );
    }

    /**
     * Place a symbol at the next available depth with the given properties.
     * 
     * @param matrix may be null to place the symbol at (0,0)
     * @param cxform may be null if no color transform is required
     * @param ratio  only for a MorphShape - the morph ratio from 0 to 65535,
     *               should be -1 for a non-MorphShape
     * @param clipDepth the top depth that will be clipped by the symbol, should
     *               be -1 if this is not a clipping symbol
     */
    public Instance placeSymbol( Symbol symbol, Transform matrix, AlphaTransform cxform,
                                 int ratio, int clipDepth )
    {
        int depth = timeline.getAvailableDepth();
        Instance inst = new Instance( symbol, depth );
        timeline.setAvailableDepth( depth+1 );
        
        if( matrix == null ) matrix = new Transform();
        
        Placement placement = new Placement( inst, matrix, cxform, null, 
                                             ratio, clipDepth, frameNumber, false,
                                             false, null );
        
        placements.add( placement );
        return inst;
    }
    
    /**
     * Replace the symbol at the given depth with the new symbol
     * 
     * @param matrix may be null to place the symbol at (0,0)
     * @param cxform may be null if no color transform is required
     * @param ratio  only for a MorphShape - the morph ratio from 0 to 65535,
     *               should be -1 for a non-MorphShape
     * @param clipDepth the top depth that will be clipped by the symbol, should
     *               be -1 if this is not a clipping symbol
     */
    public Instance replaceSymbol( Symbol symbol, int depth,
                                   Transform matrix, AlphaTransform cxform,
                                   int ratio, int clipDepth )
    {
        Instance inst = new Instance( symbol, depth );
        
        if( matrix == null ) matrix = new Transform();
        
        Placement placement = new Placement( inst, matrix, cxform, null, 
                                             ratio, clipDepth, frameNumber,
                                             false, true, null );
        
        placements.add( placement );
        return inst;
    }    
    
    /**
     * Free up the given symbol so that it no longer takes up memory.
     * All instances of the symbol must be removed first.
     * This is useful with large images when they are no longer required.
     */
    public void undefineSymbol( Symbol symbol )
    {
        placements.add( new Placement( symbol ) );
    }
    
    /**
     * Place a Movie Clip at the next available depth with the given properties.
     * 
     * @param matrix may be null to place the symbol at (0,0)
     * @param cxform may be null if no color transform is required
     * @param name   the instance name of a MovieClip - should be null if this is
     *               not a MovieClip
     * @param clipAction an array of Actions (with clipAction conditions)
     */
    public Instance placeMovieClip( Symbol symbol, Transform matrix, 
                                    AlphaTransform cxform, String name,
                                    Actions[] clipActions )
    {
        int depth = timeline.getAvailableDepth();
        Instance inst = new Instance( symbol, depth );
        timeline.setAvailableDepth( depth+1 );
        
        if( matrix == null ) matrix = new Transform();
        
        Placement placement = new Placement( inst, matrix, cxform, name, 
                                             -1, -1, frameNumber, false, false,
                                             clipActions );
        
        placements.add( placement );
        return inst;
    }

    /**
     * Replace the Symbol at the given depth with the new MovieClip
     * 
     * @param matrix may be null to place the symbol at (0,0)
     * @param cxform may be null if no color transform is required
     * @param name   the instance name of a MovieClip - should be null if this is
     *               not a MovieClip
     * @param clipAction an array of Actions (with clipAction conditions)
     */
    public Instance replaceMovieClip( Symbol symbol, int depth,
                                      Transform matrix, 
                                      AlphaTransform cxform, String name,
                                      Actions[] clipActions )
    {
        Instance inst = new Instance( symbol, depth );
        
        if( matrix == null ) matrix = new Transform();
        
        Placement placement = new Placement( inst, matrix, cxform, name, 
                                             -1, -1, frameNumber, false, true,
                                             clipActions );
        
        placements.add( placement );
        return inst;
    }    
    
    /**
     * Remove the symbol instance from the stage
     */
    public void remove( Instance instance )
    {
        placements.add( new Placement( instance, frameNumber ) );
    }
    
    
    /**
     * Alter the symbol instance by moving it to the new coordinates.
     * Only one alteration may be made to an Instance in any given frame.
     */
    public void alter( Instance instance, int x, int y )
    {
        alter( instance, new Transform( x, y ), null, -1 );
    }

    /**
     * Alter the symbol instance by applying the given transform and/or
     * color transform.
     * Only one alteration may be made to an Instance in any given frame.
     * 
     * @param matrix may be null if no positional change is to be made.
     * @param cxform may be null if no color change is required.
     */
    public void alter( Instance instance, Transform matrix, AlphaTransform cxform )
    {
        alter( instance, matrix, cxform, -1 );
    }
    
    /**
     * Alter the symbol instance by applying the given properties.
     * Only one alteration may be made to an Instance in any given frame.
     * 
     * @param matrix may be null if no positional change is to be made.
     * @param cxform may be null if no color change is required.
     * @param ratio  only for a MorphShape - the morph ratio from 0 to 65535,
     *               should be -1 for a non-MorphShape
     */
    public void alter( Instance instance, Transform matrix, 
                       AlphaTransform cxform, int ratio )
    {
        Placement placement = new Placement( instance, matrix, cxform, null, 
                                             ratio, -1, frameNumber, true, false, null );
        
        placements.add( placement );
    }
    
    protected void flushDefinitions( Movie movie, 
                                     SWFTagTypes timelineWriter,
                                     SWFTagTypes definitionWriter )
        throws IOException 
    {
        for( Enumeration enum = placements.elements(); enum.hasMoreElements(); )
        {
            Placement placement = (Placement)enum.nextElement();
            
            placement.flushDefinitions( movie, timelineWriter, definitionWriter );
        }
    }
    
    /**
     * Write the frame
     */
    protected void write( Movie movie, 
                          SWFTagTypes movieTagWriter,
                          SWFTagTypes timelineTagWriter )
        throws IOException 
    {
        if( customTag >= 0 )
        {
            timelineTagWriter.tag( customTag, false, customTagData );
        }
        
        if( actions != null )
        {
            SWFActions acts = timelineTagWriter.tagDoAction();
            acts.start(0);
            acts.blob( actions.bytes );
            acts.done();
        }
        
        if( stop )
        {
            SWFActions actions = timelineTagWriter.tagDoAction();
            
            actions.start(0);
            actions.stop();
            actions.end();
            actions.done();
        }

        if( soundHeader  != null ) soundHeader.write( timelineTagWriter );
        if( soundData    != null ) timelineTagWriter.tagSoundStreamBlock( soundData );
        if( soundToStart != null ) timelineTagWriter.tagStartSound( 
                                       soundToStart.define( movie, movieTagWriter, timelineTagWriter ),
                                       new SoundInfo( true, false, null, -1, -1, 0 ));
        
        for( Enumeration enum = placements.elements(); enum.hasMoreElements(); )
        {
            Placement placement = (Placement)enum.nextElement();
            
            placement.write( movie, movieTagWriter, timelineTagWriter );
        }

        if( label != null ) timelineTagWriter.tagFrameLabel( label, mAnchor );
        timelineTagWriter.tagShowFrame();
    }    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
石原莉奈在线亚洲二区| 精品国产第一区二区三区观看体验 | 日本午夜一本久久久综合| 欧美不卡一区二区三区四区| www.亚洲激情.com| 青娱乐精品视频在线| 51久久夜色精品国产麻豆| 人人超碰91尤物精品国产| 日韩一区二区三区电影在线观看| 日本欧美一区二区三区| 日韩亚洲欧美一区二区三区| 国产久卡久卡久卡久卡视频精品| 久久久久久久精| 色综合天天综合给合国产| 五月天一区二区三区| 精品人伦一区二区色婷婷| 成人综合在线网站| 亚洲成在线观看| 国产午夜三级一区二区三| 91成人在线免费观看| 久久99精品一区二区三区三区| 国产精品久久久久一区| 欧美四级电影在线观看| 国产成人午夜精品影院观看视频| 中文字幕亚洲视频| 日韩丝袜美女视频| 在线中文字幕一区二区| 国产一区三区三区| 五月激情六月综合| 天堂精品中文字幕在线| 日韩免费一区二区三区在线播放| 欧美羞羞免费网站| 99精品国产一区二区三区不卡| 国产一区二区三区精品视频| 午夜视频在线观看一区二区三区| 国产日韩综合av| 欧美变态tickling挠脚心| 欧美日韩国产色站一区二区三区| 成人不卡免费av| 成人福利视频在线| 国产精品一区专区| 久久精品久久综合| 黄色小说综合网站| 激情综合色丁香一区二区| 亚洲成人免费看| 日韩va亚洲va欧美va久久| 日韩二区在线观看| 免费在线观看视频一区| 精品中文av资源站在线观看| 日日骚欧美日韩| 蜜臀国产一区二区三区在线播放 | 成人免费毛片app| 成人美女视频在线看| 色综合一区二区三区| 色老综合老女人久久久| 欧洲精品一区二区三区在线观看| 日本韩国精品一区二区在线观看| 99re8在线精品视频免费播放| 色综合久久综合| 欧美一区二视频| 亚洲一区二区三区精品在线| 成人免费电影视频| 久久久久久久久久久久久久久99 | 亚洲一区二区欧美激情| 丝袜亚洲另类丝袜在线| 九九国产精品视频| 色综合天天狠狠| 国产欧美1区2区3区| 亚洲成va人在线观看| 日本道色综合久久| 欧美一级理论片| 亚洲第一成年网| 欧美怡红院视频| 国产精品高潮呻吟| 精品在线免费视频| 制服丝袜亚洲精品中文字幕| 亚洲精品你懂的| 男女男精品网站| 色八戒一区二区三区| 国产免费久久精品| 国产在线精品一区二区三区不卡| 欧美一区二区视频在线观看2020 | 中文幕一区二区三区久久蜜桃| 国产中文一区二区三区| 日韩精品影音先锋| 欧美日韩一区二区三区免费看| 51久久夜色精品国产麻豆| 免费精品视频最新在线| 欧美一区国产二区| 国产成人免费视频一区| 自拍视频在线观看一区二区| 日本精品裸体写真集在线观看| 亚洲一二三四区不卡| 精品少妇一区二区三区日产乱码| 国产成人精品一区二| 一区二区三区在线免费播放| 欧美一区二区三区在| 成人免费高清在线| 婷婷综合五月天| 成人亚洲一区二区一| 国产午夜精品一区二区三区视频| 国产欧美日韩在线观看| 日韩欧美色综合网站| 亚洲综合一区二区精品导航| 六月丁香婷婷久久| 欧美在线不卡视频| 亚洲天堂2016| av在线不卡免费看| 国产精品色一区二区三区| 狠狠色丁香婷综合久久| 日韩写真欧美这视频| 亚洲成人手机在线| 91精品国产色综合久久久蜜香臀| 亚洲观看高清完整版在线观看| 色综合视频一区二区三区高清| 中文字幕av不卡| 国产伦精品一区二区三区免费迷| 欧美大肚乱孕交hd孕妇| 椎名由奈av一区二区三区| 亚洲精品乱码久久久久久黑人 | 黑人精品欧美一区二区蜜桃| 欧美日韩综合一区| 综合激情成人伊人| 国产成人免费在线| 久久九九久久九九| 国产精品一级在线| 久久亚洲二区三区| 国产真实乱偷精品视频免| 精品区一区二区| 国产在线精品国自产拍免费| 精品粉嫩aⅴ一区二区三区四区| 爽爽淫人综合网网站| 91精品在线一区二区| 日产国产欧美视频一区精品| 欧美一区二区视频在线观看2022| 日韩二区三区在线观看| 日韩三级在线免费观看| 精品一区二区三区视频| 久久综合色鬼综合色| 国产精品77777竹菊影视小说| 国产午夜久久久久| 不卡一区二区在线| 亚洲乱码日产精品bd| 欧美日韩在线电影| 毛片av一区二区| wwww国产精品欧美| 成人伦理片在线| 一区二区三区蜜桃网| 欧美久久久久久蜜桃| 老司机精品视频线观看86| 久久久久97国产精华液好用吗| 国产福利一区二区三区视频在线 | 午夜精品一区二区三区免费视频 | ㊣最新国产の精品bt伙计久久| 蜜桃av一区二区在线观看| 久久综合久久综合久久综合| 欧美老年两性高潮| 91丨国产丨九色丨pron| 久久99精品久久久久久久久久久久 | 亚洲精品五月天| 久久久www免费人成精品| 欧美二区乱c少妇| 波多野结衣欧美| 国产高清精品久久久久| 国产呦萝稀缺另类资源| 美女网站色91| 激情综合五月天| 国产成人h网站| 成人午夜激情影院| www.色精品| 91久久国产最好的精华液| 不卡欧美aaaaa| 色婷婷av一区二区| 91久久线看在观草草青青| 91偷拍与自偷拍精品| 99久久久精品| www.色精品| 欧美三级在线视频| 欧美日韩成人高清| 日韩一区二区视频在线观看| 久久精品亚洲精品国产欧美kt∨| 亚洲欧美日韩一区二区三区在线观看 | 成人avav影音| 欧美一区二区三区日韩视频| 美腿丝袜一区二区三区| 99久久婷婷国产综合精品电影| 日韩三级.com| 日韩欧美123| 日韩欧美中文字幕一区| 欧美日本一区二区三区四区| 中文字幕亚洲在| 欧美一级欧美三级在线观看| 美腿丝袜亚洲一区| 亚洲最大的成人av| 久久久国产午夜精品| 欧美日韩在线三级| 91亚洲永久精品| 国产成人免费在线观看不卡| 亚洲午夜日本在线观看| 国产精品乱码久久久久久|