To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-08-2005, 02:44 AM   #1
pencilthin
Junior Member
 
Join Date: Nov 2005
Posts: 3
How to get GotoAndStop to work on all duplicated MCs

I have a simple bit of AS which duplicates MCs via looping through a couple of frames:

_root.tile.duplicateMovieClip("tile"+i,i+1)

What I would like to do is to use a button to move each duplicated MC from frame 1 to frame 2, hence changing the appearance of ALL duplicated MCs.

I have tried a simple action on a button:

on (release) {
tile.gotoAndStop(2);
}

but obviously this only changes one MC - the first one, and none of the duplicated ones.

Please can someone advise about the correct syntax to impact on all duplicated MCs?

Thanks

Jim
pencilthin is offline   Reply With Quote
Old 11-08-2005, 05:04 AM   #2
Wizzz
FlashCLUE.com
 
Wizzz's Avatar
 
Join Date: Nov 2005
Location: Warsaw Poland
Posts: 451
on (release) {
for( var i=first_tile_i; i<last_tile_i; i++) _root["tile"+i].gotoAndStop(2);
}
Wizzz is offline   Reply With Quote
Old 11-08-2005, 03:32 PM   #3
pencilthin
Junior Member
 
Join Date: Nov 2005
Posts: 3
Thanks Wizzz, for the advice.

I have tried that, but unfortunately it doesn't work.

If it's not too cheeky, I have uploaded the file I am working on:

swf: http://jimpix.co.uk/thanks2.swf
fla: http://jimpix.co.uk/thanks2.fla

The green bar at the bottom is the button which has the action on you posted on this thread. The idea was that it would move the duplicated m/cs to frame two, and in doing so change their color from green to black.

Any advice much appreciated!

Thanks

Jim
pencilthin is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:22 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.