Skip to main content
April 4, 2012
Question

Playing video - stupid bug :(

  • April 4, 2012
  • 1 reply
  • 321 views

Hi

I'm trying to make app play video using VideoPLayer component. I'm using this example:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/VideoPlayer.html#includeExamplesSummary

It works great wehn I add required murkup in MXML directly.

But when I'm trying to add items from code - video is'nt played.  Here is my code:

var pnl:Panel=new Panel();

pnl.title = "Spark VideoPlayer Example"

pnl.width=0.75 ;pnl.height=0.75;

pnl.horizontalCenter="0"

pnl.verticalCenter="0"

var gr:VGroup = new VGroup();

gr.left = 10;

gr.right=10;

gr.top=10;

gr.bottom=10;

var l:Label = new Label();

l.text = "Text Text text";

/*l.color = "blue";*

/l.width = .75;

var vid:VideoPlayer = new VideoPlayer();

vid.source = "rtmp://fmsexamples.adobe.com/vod/mp4:_cs4promo_1000.f4v";

vid.width = .75;

vid.height = .75;

vid.autoPlay= false;

pnl.addElement(gr);

gr.addElement(l);

gr.addElement(vid);

stage.addChild(pnl);

Could you help me please?

This topic has been closed for replies.

1 reply

Inspiring
April 4, 2012

I gave up trying to use any of the Flash video players and now I am just loading the video with the native player on iOS