A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dynamically Changing the FPS

  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    12

    Dynamically Changing the FPS

    As in, changing the frames per second for so that all movieclips on screen will slow down for a nice, pretty Finishing Move. Is it possible? If it is... I have a bad feeling I missed something obvious. I did peruse through the ActionScript Dictionary before posting here, however.

    I am using Flash MX ((and compiling in Flash 6? Does that help, or even matter?))

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    You can't.
    You can skip frames to give the impression of a faster pace, but it'll only be a workaround.

    gparis

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    26
    I think you can technically do it with Javascript, but haven't tried it myself. Check out the help files, look for the "framerate" property.

  4. #4
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    you cant dynamically change the framerate but can have the same effect by using setInterval. for e.g suppose you have a box called mcBox. Then put a stop action in the first frame of the mcBox. The following will then move through its frames at a speed of 48 frames a sec


    Code:
    var nFramerate:Number = 48;
    
    var nFrame:Number = setInterval(mover, 1000/nFramerate);
    
    
    function mover():Void{
    	mcBox.nextFrame();
    	updateAfterEvent();
    	if(mcBox._totalframes == mcBox._currentframe){
    		clearInterval(nFrame);
    		trace("clear");
    		}
    }
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

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