Solved

Flash timeline jumps unexpectedly CS5 AS3

Posted on 2011-03-17
5
311 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this article, I'll explain how to setup a Plex Media Server (https://plex.tv/) on a Redhat (Centos) 7 based NAS with screenshots to help those looking for assistance.  What is Plex? If you aren't familiar with Plex, it’s a DLNA media serv…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

790 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