Skip to main content
Known Participant
October 7, 2010
Question

Can't programmatically control FLVPlayback with ActionScript

  • October 7, 2010
  • 1 reply
  • 392 views

Hello,

I'm trying to control the video playback of a live video stream using ActionScript 3 code in Flash Professional.

There's a FLVPlayback component on my stage titled "flvPlayer", and in Frame one of my "Actions" layer, I have the following code:

import fl.video.FLVPlayback;

import flash.display.Sprite;

var vidURL:String = new String("rtmp://www.mycompanyserver.com/test/live/livestream");

var flvPlayer:FLVPlayback = new FLVPlayback();

addChild(flvPlayer);

flvPlayer.source = vidURL;

flvPlayer.isLive = true;

flvPlayer.autoPlay = true;

However, the video doesn't play.

I can get it to work by adding the source to the Compenent Parameters window, but I need to be able to access those parameters in code.

Thanks in advance.

This topic has been closed for replies.

1 reply

jtdodge87Author
Known Participant
October 7, 2010

To add to this, this comes up in my Output when I test the app: