Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // main.swf
- import flash.events.MouseEvent;
- import flash.events.Event;
- // Container
- var imageLoader:Loader = new Loader();
- // Url Requests
- var vidRequest002:URLRequest=new URLRequest("interview002.swf");
- // Interview 2 FUNCTIONS
- function v2(event:Event):void {
- imageLoader.unloadAndStop();
- imageLoader.load(vidRequest002);
- addChild(imageLoader);
- imageLoader.x=-364;
- imageLoader.y=205;
- }
- // Interview 2 FUNCTIONS
- // this function is called on another frame for timing purposes
- v2(null);
- stop();
- //external.swf preloader
- addEventListener(Event.ENTER_FRAME, loading);
- stop();
- function loading(event:Event) {
- var bytestotal=stage.loaderInfo.bytesTotal;
- var bytesloaded=stage.loaderInfo.bytesLoaded;
- var loader=Math.round(bytesloaded*100/bytestotal);
- loaderAnimation.gotoAndPlay(loader);
- if (bytesloaded>=bytestotal) {
- gotoAndPlay('begin');
- removeEventListener(Event.ENTER_FRAME, loading);
- removeChild(loaderAnimation);
- }
- }
Add Comment
Please, Sign In to add comment