开发者

Modify Flash movie without fla files or decompilers

I have 开发者_如何学Cbeen asked to add just some more text in the last "slide" of a Flash movie. I don't have access to the .fla files. What are my options (apart from using decompilers)? Many thanks.


Nothing you can do to the original, perhaps you could get messy and create a new swf load the other swf into the back and time your text to appear on the new swf in the right place.


Well I think you can load the swf into the fla. Something like

function startLoad()
{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest(“OldFlashMovie.swf”);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
addChild(loadEvent.currentTarget.content);
}

You can also add it directly into the library of the new fla as a movie clip. Pull the clip into the timespan of current fla & add more stuff.


If you consider the later option, here is an example. (Add it to the first frame of the new fla)

stop();

var obj:MovieClip;

obj = new oldClip();
obj.addEventListener(Event.ENTER_FRAME, _handle);

addChild(obj);

function _handle(e:Event):void
{
    if(obj.currentFrame == obj.totalFrames)
    {   
        obj.removeEventListener(Event.ENTER_FRAME, _handle);        
        removeChild(obj);

        obj = new newClip();
        addChild(obj);
    }
}

Where :

oldClip is the old flash movie clip.

newClip is the new clip containing your text addition.

No need to drag drop anything onto stage. Let the clips be inside library and set export to actionscript with the class names as above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜