Using the same object many times
- aplusads21
-
aplusads21
- Member since: Feb. 4, 2009
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
Suppose i have a movie clip with some actions on it (say its a obstacle)
now i want to place this movie clip on several places on the stage. I manually select command duplicate symbol and place it here and there.
but the actions associated with it are lost. and i have to again paste the code for that movie clip
is there a way to duplicate the movie clip with the action script intact.
thank you
- Redshift
-
Redshift
- Member since: Feb. 12, 2005
- Offline.
-
- Forum Stats
- Member
- Level 15
- Programmer
This is precisely what classes are for. :P
#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
Place an instance on stage, with the actions on it, then simply copy/paste multiple times.
It's either that or use (AS2) Duplicated Movie Clips/attachMovie to replicate an instance on stage or from the library. If you're doing that, you can add your actions as you create the new MC.
And then there's always classes, as Nano says, but they killed my grandma so I don't like them.
- Redshift
-
Redshift
- Member since: Feb. 12, 2005
- Offline.
-
- Forum Stats
- Member
- Level 15
- Programmer
At 2/10/09 05:26 AM, Denvish wrote: And then there's always classes, as Nano says, but they killed my grandma so I don't like them.
*is confused*
#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}
- Deathcon7
-
Deathcon7
- Member since: Oct. 1, 2003
- Offline.
-
- Forum Stats
- Member
- Level 21
- Writer
At 2/10/09 05:26 AM, Denvish wrote: And then there's always classes, as Nano says, but they killed my grandma so I don't like them.
Your grandma was obviously not strong in the force.
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 2/10/09 05:35 AM, Deathcon7 wrote: Your grandma was obviously not strong in the force.
She was geriatrically procedural
- aplusads21
-
aplusads21
- Member since: Feb. 4, 2009
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
At 2/10/09 05:26 AM, Denvish wrote: Place an instance on stage, with the actions on it, then simply copy/paste multiple times.
.
i am trying copy paste duplicate movie even dragging from library to stage . But the actions are not coming with the movie clip
How do i create an instance with actions on it
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 2/10/09 05:51 AM, aplusads21 wrote: How do i create an instance with actions on it
I'm not sure which approach you're taking
Drag one instance of a movie clip from the library to the stage. Select it, on stage, and press F9. Paste your actions. Then just copy that on-stage MC and paste it as many times as you want, the code will come with it.
- aplusads21
-
aplusads21
- Member since: Feb. 4, 2009
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
ok it worked thank you brother and sister.
- TutorialPoo
-
TutorialPoo
- Member since: Dec. 29, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
At 2/10/09 06:20 AM, aplusads21 wrote: ok it worked thank you brother and sister.
It's ok mother.


