Solved

Stopping video playback (FLV Playback Component) using ActionScript

Posted on 2010-11-09
3
437 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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
Microsoft WSUS 4 110
Updating Flash Player with GPO 3 361
Google Chrome Blank White Screens 13 303
Include Adobe AIR libraries in Flash Builder 4 137
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

680 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