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

adding action to movie clips using loop

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
What I am trying to do is to load the movie star.swf into my project and then attach an action to that object. So basically each object loads a different swf file. Hope someone can help? Thanks in advance.

southeast.onrelease = function(){
var states = ["flstar", "ncstar", "tnstar", "scstar", "gastar", "vastar"];
var theclips = ["fl", "nc", "tn", "sc", "ga", "va"];
_root.southeast.southeaststar._visible = false;
for (var i = 0; i<states.length; i++) {
_root.southeast[states].dalinks.loadMovie(&quot;flash/movies/star.swf&quot;);
_root.southeast[states].onrelease = function() {
_root.southeast[theclips].loadMovie(&quot;flash/movies/&quot; + theclips +&quot;.swf&quot;);

-root.southeast[theclips].swapDepths(0);
}
}
 
I have updated my code, but still can't get the two linked yet

southeast.onrelease = function(){
var states = [&quot;flstar&quot;, &quot;ncstar&quot;, &quot;tnstar&quot;, &quot;scstar&quot;, &quot;gastar&quot;, &quot;vastar&quot;];
var theclips = [&quot;fl&quot;, &quot;nc&quot;, &quot;tn&quot;, &quot;sc&quot;, &quot;ga&quot;, &quot;va&quot;];
_root.southeast.southeaststar._visible = false;
for (var num = 0; num<states.length; num++) {
_root.southeast[states[num]].dalinks.loadMovie(&quot;flash/movies/star.swf&quot;);
_root.southeast[states[num]].onrelease = function() {
_root.southeast[theclips[num]].loadMovie(&quot;flash/movies/&quot; + theclips[num] +&quot;.swf&quot;);

-root.southeast[theclips[num]].swapDepths(0);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top