Solved

Stopping video playback (FLV Playback Component) using ActionScript

Posted on 2010-11-09
3
431 Views
Last Modified: 2012-05-10
Hi,

I am working in Flash CS4 (AS3). I have an instance of an FLV Playback Component on frame 102 of my scene and I'm trying to get the video to stop playing when the user navigates to frame 101 or 103 (by clicking on buttons on the stage).

I tried adding the following to the actions layer on frames 101 and 103:

my_video.stop();

but upon publishing the scene, I got an error message that prevented me from clicking through (Error #1009: Cannot access a property or method of a null object reference.).

Am I missing a piece of actionscript? Would it be better to use actionscript instead of the FLV Playback Component (and what would that be)?

I also noticed that the video appears and plays when I publish the scene, but does not appear when I publish the movie. ??

I'm a newcomer to working with video in Flash, so any advice would be greatly appreciated!!

0
Comment
Question by:zburger
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 250 total points
ID: 34098764
Hi,
Try placing the script
my_video.stop();
on the buttons from where you navigate to the 2 frames.
Set the script before executing the code to navigate on the click.

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
0
 

Author Comment

by:zburger
ID: 34101997
Thanks - that worked beautifully!

I'm still unable to view the video when I publish the movie (the video player just doesn't show up) - do you have any suggestions as to why this might be?

Many thanks,
T.
0
 
LVL 17

Expert Comment

by:deepanjandas
ID: 34102068
So, may i request you to close this post.
Thank you.

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

747 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

12 Experts available now in Live!

Get 1:1 Help Now