Aligning imported MC?

Is there a way to align an imported MC on your root MC using AS or other method? Tried searching forums but didnt find anything…

Current code:


loadMovieNum("file.swf", 1);

Do you mean loading in just a movieClip? If so, I don’t even know how you do that. However, if you mean loading in a swf into a swf use this:
http://www.kirupa.com/developer/mx/full_site.htm

That way you can manipulate the ‘container’ movieClip anyway you would like with AS.

Is that what you meant?

I am loading a SWF into another SWF. Was just wondering how to align the imported SWF on the main SWF. I have found a couple of ways of doing it so far:

  1. Simply make sure both SWF files are same size and align the content on imported SWF to were you want it to show up on main SWF file.

(2) Create an empty MC on the main SWF and import the second SWF into the empty MC which you can align were you want on the main SWF.

Both methods work only thing is with second method I have problems with my imported SWF file which contains scroll text box. For some reason when its imported into the empty MC it wont scroll :-\ . The first method works just fine and very simple. However I am just trying to find out if its possible to designate the x, y cordinates of an imported SWF with AS. It seems like it would be possible. Hope this makes sense :smirk: .

Odd…
I always use method no. 2. I’m not sure why the scrollers aren’t working, because I use them too. Are you using the compontent scrollers or a custom scroller?

If it’s custom, check your path to the text box. Everything with a ‘_root.’ in the path will lead back to the main timeline.

I’m using a custom scroller. Ill check the paths im sure thats the problem. Should I remove the '_root '?

That was it! Just had to rmeove “_root” from the path. Working fine now…Thanks!

I’ve been playing with flash like everyday for months - I still forget that _root thing all the time!! Glad I could help!
:beam: