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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buttons in my loaded swf files don't work

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi can you help?
I want to be able to load several swf s into another timeline which all have buttons and scripts in them.
They work fine initially but once I load them nothing works. Is this a pathname problem? I have tried addressing the mc in all possible ways.
Is this generally not possible and if not how do I address my toload1.swf which I load into my target on the other timeline since you can't give it an instance name, if I was to change everything to having buttons in my main timeline.

Thanks in advance taking time on this
 
A little more info!

What's the name of the movie your trying to load?
Loading it on another level of your main movie?
Loading it in an empty container movie clip in your main movie?
Loading it in an empty container movie clip on another level of your movie?
Have you named the instance of the container clip?

Regards,
new.gif
 
Thanks..
I am loading the movie toload2.swf into my mc instance named the_target on the main timeline. Like this:

on (release) {
loadMovie ("toload2.swf", the_target);
tellTarget ("_level0") {
play ();
}
}


in the mc toload.swf is a mc called test with a simple control button
on (release) {
setProperty ("_root.test", _alpha, "50");
}

This is only a test to understand what the issues are because I want to get a number of scrolling pics to work eventually which are more complicated.
I would be greatful if you could help.




 
1:

on (release) {
loadMovie ("toload2.swf", the_target);
tellTarget ("_level0") {
play ();
}
}

The above should load "toload2.swf" in a container clip with the instance name of "the_target". It doesn't suffice that the container clip be called "the_target", you have to make sure that's the instance name of it, by entering "the_target" in the name box in the Instance panel.
Next, although it's still would work, the tellTarget action is deprecated in Flash 5 and simple dot syntax should be used instead. Not too sure of what you're trying to achieve here, but as scripted above, your tellTarget would have the main movie play and not necessarily the "toload2.swf", loaded in "the_target" container clip, especially if you have a stop action on it's first frame, or if the container clip is not present anymore on the main movie's timeline.
In any case, most all other actions following a loadMovie action, in the same button script, will be ignored, and should be place on following frame actions.
So what were you trying to achieve exactly with this action?

2:

As for controlling the "test" mc (once again with the instance name of "test", not only called "test"), from the main timeline, you should try the following:

on (release) {
_root.the_target.test._alpha =50;
}

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top