A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Simple Question for Showing Current Frame

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    5

    Simple Question for Showing Current Frame

    Hi!

    I'm working to create a simple animation and have created the motion tween. I would like a text box that shows during the clip that tells the viewer what frame they're viewing.

    I've created an empty dynamic text box and named the instance 'myTextField'.

    Then, I inserted the following code in an actionscript layer:

    myTextField.text = _currentframe;

    However, when I play the movie, the textbox only shows the first frame, and doesn't change as it the motion tween does. What am I doing wrong? Thanks for any input!

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    Actionscript Code:
    this.onEnterFrame = function() {
        myTextField.text = _currentframe;
    };


    arkitx

  3. #3
    Junior Member
    Join Date
    Jun 2012
    Posts
    5
    Thanks a bunch. It worked perfectly.

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