CGTalk > More Forums > Click Here for: > WIP/Critiques: Flash Design and Animation
Login register
  share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-11-2003, 09:53 PM   #1
Nicool
Lord of the underground
 
Nicool's Avatar
portfolio
Nicolas DHaussy
Owner
Supinfocom
London, Lille, Paris, France
 
Join Date: Aug 2002
Posts: 1,766
Question loadMovie() : "_root" problem

Hye,

Flash problem : I loadMovie() a *.swf using "_root" variable in its scripts... But on loading "_root" as changed to the main variable of the receiving movie and the *.swf included does not work right. How to?

1001 thanks
 
Old 10-22-2003, 04:14 PM   #2
Nicool
Lord of the underground
 
Nicool's Avatar
portfolio
Nicolas DHaussy
Owner
Supinfocom
London, Lille, Paris, France
 
Join Date: Aug 2002
Posts: 1,766
Nobody to help me?
Is "_root" a base layer declaration, a base scene declaration, something else?
 
Old 10-23-2003, 09:08 AM   #3
Garma
No light please, thanks
 
Garma's Avatar
It will stay hidden.
Student
Delft, Netherlands
 
Join Date: Apr 2003
Posts: 3,396
don't know your problem but _root is a base *scene* node. all your scenes are attached to this baby.You can see this in the "movie explorer" (advice: make extensive use of that one)
 
Old 10-23-2003, 07:52 PM   #4
poe
Veteran
 
Join Date: Jul 2002
Posts: 80
first things first. you have to understand that "_root" is a virtual path.

in flash you have levels. _level0 is "_root". always. (well, not anymore however we dont need to go into that)

if you then load a movie into a new level using loadMovieNum it sits on "_leveln" (where n is the level number you chose), so any reference to "_root", because it is a virtual path will still lock to "_level0"

ways to get round this are:

use "_level" references for everything. not the best answer
use a global namespace to store things in...this is only available in flashMX and above and involves setting an object to store data in...along the lines of

_global.dataStore = {};

then you can use it like anything else

dataStore.arrays = {}
dataStore.arrays.timerArray = [];

this again is not an ideal solution...because it is accessible anywhere, if the object becomes bloated with data, it will take up alot or memory.

the best solution is the simplest. use "_parent" to get to where you want to store the info for each level. so if you are 3 movieClips down in _level1, the "root" or _level 1 is found at "_parent._parent._parent".

that will allow you always to load one movie into another and it be interoperable with no recoding required
 
Old 10-24-2003, 08:11 AM   #5
Nicool
Lord of the underground
 
Nicool's Avatar
portfolio
Nicolas DHaussy
Owner
Supinfocom
London, Lille, Paris, France
 
Join Date: Aug 2002
Posts: 1,766
Thanks a lot... I'll study it :|
 
Old 01-16-2006, 08:00 AM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,480
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
  share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:14 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.