Solved

Stopping video playback (FLV Playback Component) using ActionScript

Posted on 2010-11-09
3
439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

623 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