PDA

View Full Version : Access Components and loadMovie


AstAn
07-07-2004, 01:39 PM
Hi

I use loadMovie to load a control into my flash movie.
When I trace the control from within the source movie, this is what I get: _level0.loadingProgressbar

This is the way I load the source movie:
_root.createEmptyMovieClip('screen_loading', _root.getNextHighestDepth());
_root.screen_loading.loadMovie('screens/loading.swf');

Now, I would expect my control to be placed here:_root.screen_loading._level0.loadingProgressb ar

I can access "_root.screen_loading._level0", but there is no "loadingProgressbar".

Can anyone help me?
And, of course the movie IS loaded.

greetings
Daniel

Billy T
07-07-2004, 02:06 PM
when you load into an mc the main timeline of the external movie is targeted via the mc its loaded into so try

_root.screen_loading.loadingProgressbar

AstAn
07-08-2004, 11:14 AM
I already tried this and it does not work, no idea why.
It traces "undefined".

greetings
Daniel

Billy T
07-08-2004, 11:32 AM
up the files

AstAn
07-08-2004, 11:58 AM
I found something new.
Ok, this is what I found out:

This is the code from the movie I load:
trace('obj1: '+ obj1);
trace('obj2: '+ obj2);

This is the code from the movie I load the other one in:
trace(_level0.localMarket.screen_loading.obj1);

And this is the result when I run the movie:
undefined
obj1: _level0.localMarket.screen_loading.obj1
obj2: _level0.localMarket.screen_loading.obj2

When I try to access the loaded movie from the outside, it says undefined.
When I try to access the loaded movie from the inside, it tells me exaclty the position I traced before.

Any idea?

greetings
Daniel

AstAn
07-08-2004, 01:03 PM
The problem was that I did not wait until the clip was loaded. Don't know why this did not come to my mind earlier.

Thx anyway

greetings
Daniel