Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

actionscript problems

Status
Not open for further replies.

z35

Programmer
Dec 21, 2001
206
US
I have a movie.
the movie has a mc called "window."
"window" has a movie loaded in it called "photogallery.swf"
"photogallery.swf" has a mc called "container"
"container" has a loaded movie in it called "photo1.swf"

photogallery.swf has a button that loads a movie called "info.swf" on _level1.

what is the ABSOLUTE PATH from "info.swf" to access "photo1.swf"???
i need to know this because a button in "info.swf" has to tell "photo1.swf" to play()


root.window.container.play() doesn't work for me and this is clearly the correct path. WHERE AM I GOING WRONG? am i missing somthing else?
 
try
_root.window.container

this should reference photo1.swf

this might help.
 
hi,
thanks for your reply. i have been posting this for a while with no response.

if you look at the last paragraph in my post above, i did try that and it doesn't work. i also thought that sounds right.
 
What action you use to load the movies?
...post the exact code for photo1.swf !!!

Don't think that you can use _root.container.movie .... if you load the movies on levels. Regards,
Dragos.


 
(all my movie clips have instance names..so that's not the problem)

the code that loads photo1.swf is:
container.loadMovie( "photo1.swf" )

and the code that loads photogallery.swf is:
_root.window.loadMovie( "photogallery.swf");

everything is on the same level until i load info.swf.
info.swf loads on _level1.

since it is on _LEVEL1, what is the path to photo1.swf??
 
maybe _root.window.container._level1 ?? don't know if that works, This is just what comes into my mind 'bout that regards

Firegambler
 
If info.swf and photo1.swf are in the same level(_level1) you can use _root.photo1.swf or _level1.photo1.swf in the info movie because _root will act like _level1 as both are on the same level.

My question comes here: window, photogalery, container are on level0??? if any of them is loaded on _level1 the code will change. Regards,
Dragos.


 
Hi Dragos, thanks for your post.

window,photogallery and container are all on level 0. only info is on _level 1.

this may be the problem. (from info.swf, _root is not accessing _level 0. it is only accessing the _root of _level 1.)

I can place photo1.swf on level 1 if necessary. technically though, shouldn't it be possible though to access _level0 from _level1?


 
Try this. I don't know if i'm aberating or not:

_level0.window.photogalery.container.photo1.gotoAndPlay(1); ...if you want to play it from the 1st frame for example.

If you load photo1.swf on level1 then the code will be:
_root.photo1.gotoAndPlay(1);

...as both movies are on the same level....is not wrong if you write:
_level1.photo1.gotoAndPlay(1); Regards,
Dragos.


 
hi dragos,
thanks very much for your help.
for your information, _level0.window.container.play();
worked.

the point where i was going wrong
is writing _root instead of _level0.

i guess when you have more than one level, _root is not enough, you have to specify the level.
:)
 
I'm happy you solved your problem! Regards,
Dragos.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top