A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [EXAMPLE] Learning from Books - frameRate

Threaded View

  1. #1
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193

    [EXAMPLE] Learning from Books - frameRate

    Changing the frame rate is new to ActionScript 3. Here is an example.

    http://www.heritagecustomwoodworking...frameRate.html

    the movie consisits of 3 key frames with tweens set to 12.

    each button changes the frameRate to 6(slow), 24(medium), and 36(fast).

    thought I would add this

    Code:
    btnSlow.addEventListener
    	(MouseEvent.MOUSE_DOWN, slowPaceHandler);
    	
    btnMed.addEventListener
    	(MouseEvent.MOUSE_DOWN, medPaceHandler);
    	
    btnFast.addEventListener
    	(MouseEvent.MOUSE_DOWN, fastPaceHandler);
    	
    function slowPaceHandler(evt:MouseEvent):void{
    	stage.frameRate = 6;
    	}	
    
    function medPaceHandler(evt:MouseEvent):void{
    	stage.frameRate = 24;
    	}
    	
    function fastPaceHandler(evt:MouseEvent):void{
    	stage.frameRate = 36;
    	}
    Last edited by etuom; 08-07-2009 at 07:13 PM. Reason: added code

Tags for this Thread

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