A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Short animation "timer countdown"

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    6

    Short animation "timer countdown"

    hey guys i need some help with my short animation. The swf is in the link.

    I need to make a count down timer and have it count down from 2013 to the year 1900 in the tablet above the world and whie lthat is happening I need the world to spin in reverse and the satellites to disappear to signafy going back in the past how would i go about doing this?

    https://www.dropbox.com/s/42ktv4opmq...dspining.swf?m

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    106
    Question: How fast do you want the year to go backwards? Do you want the timer to stop at 1900? When do you want the satellites to disappear?

    If it is a very fast countdown, you can have a dynamic textbox on the stage, and use code to update the text inside the box.

    1) Create a Dynamic text box on the Tablet
    2) Turn the TextBox into a MovieClip
    3) Create a variable for the Year
    4) Write a function that will be called by an ENTER_FRAME
    5) Add event listener to your TextBox

    1) Create a text box and make sure the type is Dynamic. Give your text box an instance name "yearTxt" Be sure to choose a font and embed the numbers.
    2) Select your text box and convert it to a MovieClip using F8 on keyboard. Be sure to give your MovieClip and instance name "yearMc"
    3) In your actions layer, write the following code:
    Code:
    var theYear:int =2013;
    
    function countDown(e:Event):void{
    	yearMc.yearTxt.text=theYear;
    	
    	if(theYear==1969){
    		//put code here to kill your satellites
    		satellite1.alpha = 0;
    		satellite2.alpha = 0;
    	}
    	if(theYear==1900){
    		yearMc.removeEventListener(Event.ENTER_FRAME, countDown);
    	}
    	theYear--;
    }
    
    yearMc.addEventListener(Event.ENTER_FRAME, countDown);
    Hope this helps!

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    6
    Thanks that helped alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center