Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 645953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:33:32+00:00 2026-05-13T21:33:32+00:00

My animation is 100 frames total. I want to set a range of frames.

  • 0

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; 
    } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:33:33+00:00Added an answer on May 13, 2026 at 9:33 pm

    If you want to control time, acceleration, etc… You can use a tween to advance the play head, add a getter and setter that will change the play head.

    For this example i use the flash tweening but you can use whatever library you want.

    package  {
      import flash.display.MovieClip;
      import fl.transitions.Tween;
      import fl.transitions.easing.*;
    
      public class MyMC extends MovieClip { 
        //...
    
        public function playFromTo(from:int, to:int, duration:Number):Tween {
          // add a tween with no acceleration and a duration in second
          return new Tween(this, "tweenFrame", None.easeNone, from, to, duration, true);
        }
    
        private var _tweenFrame:Number;
        public function set tweenFrame(value:Number):void{
          _tweenFrame = value;
          gotoAndStop(int(value));
        }
        public function get tweenFrame():Number{
          return _tweenFrame;
        }
      }
    }
    

    or using composition if you cant modify your MovieClip:

    package  {
      import flash.display.MovieClip;
      import fl.transitions.Tween;
      import fl.transitions.easing.*;
    
      public class TweenableMC {
        private var _target:MovieClip;
    
        public function TweenableMC(target:MovieClip):void {
          _target=target;
        }
    
        public function playFromTo(from:int, to:int, duration:Number):Tween {
          // add a tween with no acceleration and a duration in second
          return new Tween(_target, "tweenFrame", None.easeNone, from, to, duration, true);
        }
    
        private var _tweenFrame:Number;
        public function set tweenFrame(value:Number):void{
          _tweenFrame = value;
          gotoAndStop(int(value));
        }
        public function get tweenFrame():Number{
          return _tweenFrame;
        }
      }
    }
    
    //...
    var tm:TweenableMC=new TweenableMC(myMc);
    tm.playFromTo(50, 75, 1); // play from 50 to 75 in 1 second
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a animation consisting of 100 images. I want to be able to
I have a 100-frame animation in one div and a standard area highchart in
I have the following animation set up using Three.js: http://frontier.lincoln.ac.uk/3d/development/Stage2/characters/man2.html Please ignore the ropey
Possible Duplicate: How to get UIView frame origin and size while animation -(void)anothertarget1 {
I am trying to get a frame by frame animation to run on android
I have an ImageView that is being used to show some frame animation. The
I want to show a custom animation when pushing a view controller: I would
Everybody.. How to set animation on button click ? I have two buttons, both
I am trying to play through an animation using these files that I created
I have some JPEG files and I want to create a GIF animation with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.