Solved

Stopping video playback (FLV Playback Component) using ActionScript

Posted on 2010-11-09
3
436 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a simple "throw object" gesture on as3 / air mobile ? 3 1,198
Flash Player White Screen Facebook 5 775
How  to reduce the .AVI file size of 90GB 4 356
YouTube video issue 28 121
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…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

860 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