Skip to main content
Known Participant
September 3, 2010
Question

Timeline Position of movie

  • September 3, 2010
  • 1 reply
  • 2253 views

Hi,

How to find Timeline Position of my Movie.

thanks

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 3, 2010

you can check its currentFrame property.

Known Participant
September 3, 2010

Hi,

Thanks for reply if i write like this, i am getting an error:Scene 1, Layer 'AS', Frame 173, Line 34    1119: Access of possibly undefined property position through a reference with static type int.

     lastPositionframe = currentFrame.position;
    myChannel = mySound.play(lastPositionframe);

can u be able to tell me what is wrong in this code?

thanks

kglad
Community Expert
Community Expert
September 3, 2010

1.  lastPositionframe is not declared (but i assume that's elsewhere in your code because there's no error message)

2.  currentFrame has no position property

3.  it looks like you're confusing timeline navigation and sound control

so, what are you trying to do?  navigate a timeline or control a sound?

if navigating a timeline, you would use something like:

var lastFrame:uint = somemovieclip.currentFrame;  // <- and this would need to execute every time somemovieclip changes frames

then at some point if you wanted to goto lastFrame, you would use:

somemovieclip.gotoAndPlay(lastFrame);