|
-
Loading an external SWF
I am loading an external SWF onto an Miscorsoft Projector EXE file. But, it is stuck in the top left corner. How do I reposition the SWF?
I have tried creating a new movie clip to act as a placeholder, and loading the external SWF into that movie clip. But, the SWF does not load.
By the way, I am using Actionscript 2.
-
You should be fine loading an external swf into a placeholder movieclip. What's your code?
-
I select the movie clip, then I place this Actionscript in it:
onClipEvent (enterFrame){
loadMovieNum ("donations.swf",1);
}
It doesn't return any errors. But, when I try to play this frame, the placeholder loads (it's just a black box), but the video doesn't play.
-
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
|