Solved

Flash timeline jumps unexpectedly CS5 AS3

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
disabled AD accounts info 3 61
Live streaming video 4 56
Python 2.7 - French characters 6 47
Actionscript in Flash 3 25
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now