-
Positioning a swf movies with loadMovie
Ok here is my problem.
I am trying to load a seperate swf into a playing movie. This swf is for a CDrom and the loaded movie contains my video. I can get the video to play, but not load in the position I want it to. Here is the code I am using on the button:
on (release){
loadMovie("video.swf", 1)_x41_y84;
}
Can anyone show me the correct format? THis is REALLY driving me nuts
Thanks everyone
JF
"Remember, where ever you go there you are!"
Mad Max Beyond Thunderdome
-
hi
try this:
on (release){
loadMovie("video.swf", 1)
_level1._x = 41;
_level1._y = 84;
}
hope it helps
-
Nope it is still loading the movie at the 0,0 coordinates.
Thanks though for trying..
This is going to drive me nuts I know it
"Remember, where ever you go there you are!"
Mad Max Beyond Thunderdome
-
sorry
it works like this:
on(release){
var mcLoader = new MovieClipLoader();
myListener = new Object();
myListener.onLoadInit = function(target_mc) {
target_mc._x = 41;
target_mc._y = 84;
};
mcLoader.addListener(myListener);
mcLoader.loadClip("video.swf", 1);
}
forget prev post
-
What if I placed an empty movie clip in the Flash and named it video_clip?
If I wanted to load the external swf movie into that MC what would script? Something like this?
on (release){
video_clip.loadMovie("video.swf",1);
}
"Remember, where ever you go there you are!"
Mad Max Beyond Thunderdome
-
you can create the "place holder movie" on the fly like this:
on (release) {
this.createEmptyMovieClip("placeHolder",1);
placeHolder.loadMovie("sub.swf");
placeHolder._x = 41;
placeHolder._y = 84;
}
-
Ok well that somewhat worked. Using that code to make the MC on the fly brings in the audio, but no video LOL.
"Remember, where ever you go there you are!"
Mad Max Beyond Thunderdome
-
So instead of creating a MC on the fly I placed a MC named Viewer on the stage, then used this script to load the external movie:
on(release){
loadMovie("video.swf", _root.viewer);
viewer._x=41;
viewer._y=84;
}
So now it loads both the video and audio but it is placed on the bottom of the screen and not at the coordinates I specified.
This has always been my weak point in Flash scripting, it just always seems to give me issues.
If you have any recommendations please feel free to provide them, and I wanted to also thank you for taking the time to reply to my questions with all of your great suggestions.
JF
"Remember, where ever you go there you are!"
Mad Max Beyond Thunderdome
-
Banned
Hi,
You can control the loaded movie. Set their _x,_y,_xscale,_yscale. You can make them to where and how large you want.The trick is, this must be done after the movie is loaded. Although you can control _x,_y if you load it into a movieClip. Load a movie into level 1 by loadMovieNum("test.swf",1);Make a dummy movieClip to be loaded with the following code...
... load a movie to level1 by loadMovieNum("test.swf",1);
Make a dummy movieClip and write the codes below:
code:
code:
onClipEvent(load){loaded=false;}
onClipEvent(enterFrame){
if(loaded==false){
if(_level1._currentframe>0){
with(_level1){_x=100;_y=100;_width=100;_height=100 ;}
loaded=true;
}
}
}
You will get you movie loaded at 100,100 and width height 100,100. if you load movie to movieClip...
code:
onClipEvent(load){loaded=true;}
onClipEvent(enterFrame){
if(loaded==true){return;}
if(_root.MC2._width>0){
with(_root.MC2){_x=100;_y=100;_width=100;_height=1 00;}
loaded=true;
}
}
And the button:
code:
on(release){MC2.loadMovie("test.swf");MC.loaded=fa lse;}
One other thing to mention is you can even use variable names to control the loaded movie...
on (release){
myMovie = loadMovie("video.swf", 1);
myMovie._x = 41;
myMovie._y = 84;
}
HTH
NTD
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
|