|
-
Target paths and loadMovie
i was wondering if there is a way to reference the main timeline of a swf that is loaded into another swf with loadMovie--but keep the actionscript functionality of the loaded swf when editing individually.
I know, confusing..but i will try to make it as clear as possible.
I will refer to the main swf that is loading the other swf as main.swf and the swf being loaded as loaded.swf
when i refer to the main timeline in loaded.swf i use _root but the problem is when i load loadedswf into main.swf (using loadMovie) Flash thinks (by using _root in loaded.swf to reference its main timeline) i mean to reference the main timeline of main.swf--which is not what i want.
so, my question is: is there a way to reference ONLY the main timeline of loaded.swf? (somehow a more specific target path to only loadedswf's main timeline)
(the reason being when i edit loadedswf.fla none of the functionality works if i have to change the target paths to account for the root timeline and the movieclip in main.swf)
if you need me to clarify anything feel free to ask 
Thanks,
Lex
Last edited by Lexthayn; 03-08-2007 at 12:46 PM.
-
FK'n_dog
try using _lockroot = true; on frame#1 in loaded.swf
any code in loaded.swf that uses syntax _root
will now look to loaded.swf main timeline,
hth
-
wahoo! you just made my hour. thank you. you rock.
-
Registered User
hi,
Using _lockroot is a workaround... not considered exactly a good practice. The same goes for _root.
Don't use _root, use relative paths instead (for your next projects at least )
-
how would you reference a root timeline relatively?
because _lockroot works great. the only problem is one aspect of the functionality uses _root._xmouse, root._ymouse and that poses a problem when _lockroot is true.
so if there is a way to have a relative target path to the main timeline. that would be swell.
Lex
-
Registered User
how would you reference a root timeline relatively?
That depends on where the code is attached.
But using relative paths means that you don't use _root. It also means that you'll use this and or _parent (or a combination of both / each).
Read understanding target paths for more details.
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
|