Skip to main content
Known Participant
May 7, 2008
Question

positioning loadMovie

  • May 7, 2008
  • 5 replies
  • 379 views
Hi all,
I've sifted through the forums and confused myself with the help feature in flash but still can't find an answer to my problem, would be apreciated if someone could help.
Im trying to load and external swf i but when I use the usual loadMovie into the mc the swf wont work fully - something to do with being inside numerous mc's. When I use the code -
loadMovieNum("scroller.swf", 1, "GET");

It works but is positioned to the default ie x=0 y=0
I've also tried:
this.createEmptyMovieClip("image_mc", 1);
image_mc.loadMovie("scroller.swf");
image_mc._x = -10;
image_mc._y = -50;

But every time I place the new swf into a mc it won't fully work!
Is there any way to use the loadMovieNum("scroller.swf", 1, "GET"); but give it the correct x,y values?
Thanks in advance for any input.
Cheers,
D
This topic has been closed for replies.

5 replies

Known Participant
May 8, 2008
Hi, thanks for the reply.
Still no joy with the code - I've tried placing it on the main stage, on the button, and every where that I thought would be relevant!
Where is it meant to go?
Out of interest instead of using : companyscroller.onRelease = function(){
Could I use onFrameLoad ? Or something similar?
Thanks again for the input
D
Inspiring
May 8, 2008
Does it load, and just not in the correct loc or what? Try this:

companyscroller.onRelease = function(){
var container:MovieClip = this.createEmptyMovieClip("companies", 0);
mcLoader.loadClip("scroller.swf", container);
};

var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadInit = function(mc:MovieClip){
trace("onLoadInit: " + mc);
mc._x = 5;
mc._y = 6;
};
mcLoader.addListener(listener);



--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


Known Participant
May 7, 2008
Hi again, I've just tried the MovieClipLoader and still can't get it to work.
Close to giving up! Here's the AS i used.
companyscroller.onRelease = function(){
var container:MovieClip = this.createEmptyMovieClip("companies", 0);
container._x = 5;
container._y = 6;
mcLoader.loadClip("scroller.swf", container);
};

var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadInit = function(mc:MovieClip){
trace("onLoadInit: " + mc);
};
mcLoader.addListener(listener);

Any ideas?
Cheers
D
Known Participant
May 7, 2008
Thanks for the reply - I'll look into it.
I'm not a big fan on the help as it always seems to complicate things!
Thanks again.
D
Inspiring
May 7, 2008
You really want to use the MovieClipLoader class - and its associated
onLoadInit method. What you do is tell MCL to load the clip, then in the
onLoadInit method you can position it - once it's downloaded and ready to
accept scripting commands.

See the MovieClipLoader class, in Help, for more info.

--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/