Groups | Blog | Home
all groups > flash (macromedia) > september 2004 >

flash (macromedia) : loading external *.swf files...



v_miu
9/14/2004 8:52:47 PM
Hi! I have problems loading external *.swf. I have checked all the questions
& answers in the forum but it seems not really can solve my problem. Can
somebody please help me???

I have a file called "main.swf" which contains a button. Whenever somebody
presses that button, it will load another swf file - "button01.swf".
button01.swf works perfectly fine independently. But when it is loaded
externally to "main.swf", it's not working properly. I think it's related to
"_root" problem.

In "button01.swf", it contains two roll over buttons which one is loading
dynamic text up, one is loading dynamic text down. The "up" button contents
action codes with "_root" and there is a Action movie clip also contains
"_root". There is NO problem of the "down" button when loading externally (may
be because it doesn?t contain "_root" code).

Codes are:
"Up" button:
on (rollOver) {
tellTarget ("_root.down") { // "down" is the instance name of that Action
movie clip
play ();
}
}?
Action Movie Clip:
tellTarget ("_root.text") { // "text" is the instance name of the dynamic
text box
play ();
prevFrame ();
}

Error Message when loading externally in "main.swf" is:
Target not found: Target="_root.down" Base="_level0.contents" //where
"contents" is the instance name of movie clip placing position of external swf

I feel "_parent" code may be needed in "button01.swf". But when I replace
"_root" to "_parent", it doesn't even work independently.

Can somebody please help and explain a bit how "_parent" work?? Thank you
very much.

NSurveyor
9/14/2004 9:10:12 PM
v_miu
9/14/2004 9:28:26 PM
Thank you for your reply!!
But do you mean changing from "_root" to "_level1" in "button01.swf"?
after changing the code, "button01.swf" doesn't work either independently or
with "main.swf"~~~

anymore help please???
maxil
9/15/2004 7:56:23 AM
try changing your code to this: You were also using a reserved word text as an
instance name. I changed it to myText

on (rollOver) {
_root.down.play();
}

//Not sure what you are doing with this code here, you seem to be telling a
dynamic text box to play and goto prevframe in the same breath. What are you
trying to achieve here??
tellTarget ("_root.myText") { // "text" is the instance name of the dynamic
text box
play ();
prevFrame ();
}

AddThis Social Bookmark Button