My animation is 100 frames total. I want to set a range of frames. Is is there a command to play only frames 50 to 75? I want begin-and-end frame to be in an object I can call on later. There must be a "best" way of doing this!
100 frame total <==play 50 to 75==>
SAMPLE
These commands work, but I would end up adding labels and stop();
//start playing at given frame
Play at 9950.00
gotoAndPlay(4990,"Scene 1");
//advance and stop at given frame
my_mc.gotoAndStop(my_mc.currentFrame + 10);
//control frame rate on stage
Frame rate command
stage.frameRate = 90;
USE
The begin-and-end of my movie should be an object in it's self. My movie will need to control time and duration for a given number of frames. Comment if you have any ideas.
TAGS
AS 3.0, timer class, display, time-scaling
Patricks example modified "I play with the values, but no effect or error"
import flash.display.MovieClip;
import fl.transitions.Tween;
import fl.transitions.easing.*;
//...
function playFromTo(from:int, to:int, duration:Number):Tween {
return new Tween(this, "tweenFrame", None.easeNone, from, to, duration, true);
}
//instance of tweenFrame on stage
var _tweenFrame:Number;
function set tweenFrame(value:Number):void{
//what about value?
_tweenFrame = value;
gotoAndStop(int(value));
}
function get tweenFrame():Number{
return _tweenFrame;
}