A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Current frame Variable

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    13

    Current frame Variable

    As it says in the tittle i want to create a variable storing a value of frame, at which my movie stopped. I found this code for Flash 8 but I don't know is it working with as3.
    Code:
    var curFrame = fl.getDocumentDOM().getTimeline().currentFrame;
    Is there something like this for AS3?

  2. #2
    Junior Member
    Join Date
    Oct 2008
    Posts
    26
    http://livedocs.adobe.com/flash/9.0/...l#currentFrame

    according to docs its a property of the movieclip class. you should be able to store the value of your current frame with something like

    var i:int = this.currentFrame;
    trace(i);

    make sure to import the display directive
    //peace.*

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    13
    Thanks, that's what I've been looking for. I got only one more question. If i got that code you told me pasted in,lets say, 20th key frame of one of my animations do I need to create a path or something to be able to use that stored value in other layers' code.

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