Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Stopping video playback (FLV Playback Component) using ActionScript

Posted on 2010-11-09
3
Medium Priority
?
440 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 1000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

715 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