Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 5th, 2003, 10:26 PM
EthanM EthanM is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 EthanM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Naming Instance of DuplicateMovieClip

I want to Duplicate a Movie Clip using AS.

How can I name this new instance of the MC?

Reply With Quote
  #2  
Old July 6th, 2003, 02:12 PM
m_head m_head is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 m_head User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ethan -

there's a better way to do it than Duplicate Movie Clip -

try this:

this.attachMovie(yourInstanceName, yourNewinstanceName, yourDepth);

Reply With Quote
  #3  
Old July 10th, 2003, 05:58 AM
1ain 1ain is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Bath
Posts: 26 1ain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
...but if you did want to use duplicatemovieclip...

this script places the new instance of the duplicated mc on a new level each time and appends the name of each movie clip with that level as a unique identifier.

var inc = 0;

movietoduplicate.duplicateMovieClip("newname_"+inc, inc);

//now access attributes of your new movie:
eval("newname_"+inc)._x = 56;
eval("newname_"+inc)._y = 90;

inc = inc + 1;

that should do it. don't forget to increment the x and/or y positions otherwise you won't see them.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Naming Instance of DuplicateMovieClip


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway