Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 June 20th, 2012, 02:49 AM
itsmerocky itsmerocky is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 1 itsmerocky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 47 sec
Reputation Power: 0
Question ActionScript 3 - How to Restart MovieClip in a Main Timeline?

Hi AS3 Guys,

I need help with my flash work regarding the looping animation.

--------------------------------------------------------------------------------------------------------------------
Problem Case: I have Main Timeline which is a looping animation, within the Main Timeline there is movieclip named "MC" ( inside the movieclip timeline, I put stop(); so that the movieclip will not play automatically within the main timeline and wait for the animation to be finished ), but the problem is when the 2nd iteration of animation, the movie clip stops and doesnt restart its animation.
Note:
The total length of animation is 11secs @ 18FPS with a total of 199Frames
The movieclip is a only part of the main animation that had own animation itself.
I need AS3 code.

Question: How do I restart the movieclip animation in every iteration/loop of the main timeline animation. What am I going to do?
--------------------------------------------------------------------------------------------------------------------

I tried some sample on the internet but no one works for me. Any answer would be great help. Thanks!

Reply With Quote
  #2  
Old June 21st, 2012, 08:29 PM
stillwell stillwell is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 60 stillwell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 50 m 14 sec
Reputation Power: 6
It would probably be better to add an instance of the movieclip when you need it, and remove when you don't anymore, but that might be a bit much right now, so try this on you 2nd iteration:

Code:
MC.gotoAndPlay(1);
Attached Files
File Type: zip Example.zip (6.3 KB, 121 views)

Last edited by stillwell : June 21st, 2012 at 09:23 PM.

Reply With Quote
  #3  
Old June 28th, 2012, 07:23 AM
YEAV YEAV is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 4 YEAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 14 m 26 sec
Reputation Power: 0
restartScene();
- restarts a stopped scene.

Example:
RunPseudoScenes();

MovieClip.prototype.restartScene = function(){
_root.scene.onEnterFrame = _root.scene.onEnterFrameBAK;
};
MovieClip.prototype.gotoAndPlayScene = function(label, frame){
_root.scene.gotoAndStop(label);
_root.scene.getScene();
if (frame == undefined) frame = 1;
_root.scene.currScene.gotoAndPlay(frame);
if (!_root.scene.onEnterFrame) _root.scene.onEnterFrame = _root.scene.onEnterFrameBAK;
};

Reply With Quote
  #4  
Old June 28th, 2012, 01:05 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 6,663 Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 3 Days 20 h 11 m 52 sec
Reputation Power: 3163
Facebook MySpace
YEAV, that's ActionScript 2
__________________
Quis custodiet ipsos custodes?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - How to Restart MovieClip in a Main Timeline?

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap