| Let's add the ActionScript that will load the external ecard swf into our FlashR intro swf. We already have an Actions layer at the top of the Timeline. We created this Actions layer when we built the "Click on Stamp" button on Frame 80. 1. Right-click on Frame 136 and Insert a Keyframe. This will tell Flash to read our ActionScript on this frame. Open the Actions panel (Window – Actions) and copy/paste the following code. var ecard:String = LoaderInfo(this.root.loaderInfo).parameters.ecard; var myrequest:URLRequest = new URLRequest(ecard); var myloader:Loader = new Loader(); myloader.load(myrequest); function swfLoad(myevent:Event):void { stage.addChild(myloader); var myswf:MovieClip = myevent.target.content; myswf.x = 0; myswf.y = 0; } myloader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoad);
Join us in the Flash forum. |

