Solved

Flash timeline jumps unexpectedly CS5 AS3

Posted on 2011-03-17
5
312 Views
Last Modified: 2012-05-11
Hello all,

I've been developing a flash website, which has been going just fine.  I'm fairly new to AS3, and realize I haven't been removing any listeners on any of my buttons.  I'm sure there could be a few other bad coding practices that I'm not aware of that could possibly be causing my problem.

Problem:

I have a intro video on the 1st frame of my timeline which is being called from a server using the file/import video.  When the video finished I have a eventlistener that jumps the timeline to frame 2, and the animation/website begins.  There are also 3 other videos throughout the website, fyi.  

Now what seems to happen is the timeline will, for no reason at all, hop to the 2nd frame and play.  So someone could be looking at section 5 (frame 273, for example) of the website, then suddenly, they are back at the intro part (frame 2) of the website (just after the video I mentioned above).

I keep mentioning the videos because this didn't seem to happen before I imported the videos.  From what I can tell, the user doesn't even have to be clicking, or hovering over anything for this to occur.  It seems entirely random.

I suppose I could proved a link to view the site, but would rather not, as the site isn't public yet.

Please give me a hand - I'm really concerned/stressed!

Thanks :)
0
Comment
Question by:Adam
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 500 total points
ID: 35156654
Your thinking is right, this is due to event listeners not being cleared properly.
Once your video is over, clear out everything, close the video stream and then proceed.

Warm Regards
Deepanjan Das
0
 
LVL 1

Author Comment

by:Adam
ID: 35157060
Hi Deepanjas,

Would you mind showing me how to properly clear the video using an event listener?  It's because I don't have instance names on my video, and just wondering what the syntax would be, as I'm fairly new to AS3.

Thanks very much
0
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35162096
It would be easier if you can just share your code snippet. It will be easier for me to integrate in that.

Warm Regards
Deepanjan Das
0
 
LVL 1

Author Comment

by:Adam
ID: 35183046
I used this code on the skip button which resolved the issue:

      intro.removeEventListener(VideoEvent.COMPLETE, fPlay);
      removeChild(intro);

Thanks for your help Deepanjan
0
 
LVL 1

Author Closing Comment

by:Adam
ID: 35183084
Deepanjan confirmed my suspicions but was unable to provide syntax.  He did suggested I send a snippet of code, but that didn't make sense to me in context of the question.  I'm glad he helped me though.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The advancements in today's technology are unparalleled. Much of the technology that we have could not have been imagined twenty years ago. One of the latest additions to the list of technological advances is virtual reality. Virtual reality has an …
Viewers will learn how to include realistic velocity sensitivity to their Sampler instruments. Set the Vol<Vel parameter in the Filter/Global tab to your desired setting: Gather samples of hits of various intensity, and drag/drop into Velocity zon…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question