-
Keyboard Events and External SWF
OK. So, I finally found a way to exactly position my External SWF on the main stage. Here is the Actionscript I placed on an empty layer:
Actionscript Code:
this.createEmptyMovieClip("externalSWF",1); externalSWF._x=550; externalSWF._y=300; externalSWF.loadMovie("donation.swf"); preloadI=setInterval(preloadF,100); function preloadF(){ bl=externalSWF.getBytesLoaded(); bt=externalSWF.getBytesTotal(); if(bl>0&&bl>=bt){ clearInterval(preloadI); externalSWF._width =720; externalSWF._height=480; } }
As you can see, I created an empty movie clip and loaded the SWF into that. Now, here is my question. The external SWF has keyboard events to navigate around it. But, when I load it into this empty movie clip, the keyboard events don't work. Do I need to set the focus? Do I need to import the keyboard events?
How do I do this in Actionscript 2?
-
Keyboard Events and External SWF
OK. So, I finally found a way to exactly position my External SWF on the main stage. Here is the Actionscript I placed on an empty layer:
Actionscript Code:
this.createEmptyMovieClip("externalSWF",1); externalSWF._x=550; externalSWF._y=300; externalSWF.loadMovie("donation.swf"); preloadI=setInterval(preloadF,100); function preloadF(){ bl=externalSWF.getBytesLoaded(); bt=externalSWF.getBytesTotal(); if(bl>0&&bl>=bt){ clearInterval(preloadI); externalSWF._width =720; externalSWF._height=480; } }
As you can see, I created an empty movie clip and loaded the SWF into that. Now, here is my question. The external SWF has keyboard events to navigate around it. But, when I load it into this empty movie clip, the keyboard events don't work. Do I need to set the focus? Do I need to import the keyboard events?
How do I do this in Actionscript 2?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|