Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

StageWebView Multiple Videos

$
0
0

Hi everyone,

 

I was wondering if there is a way to play multiple videos with stage web view.  Actually i am using this code to call a youtube video:

 

FLASH CS6 AS3:

 

import flash.display.StageAlign;

import flash.display.StageScaleMode;

import flash.events.Event;

import flash.geom.Rectangle;

import flash.media.StageWebView;

import flash.system.Capabilities;

 

 

stage.align = StageAlign.TOP_LEFT;

stage.scaleMode = StageScaleMode.NO_SCALE;

 

var w : int = 800;

var h : int = 600;

 

 

var stageWebView:StageWebView = new StageWebView();

stageWebView.stage = this.stage;

stageWebView.viewPort = new Rectangle(0, 0, w,h);

stageWebView.loadString( getHTML5Player("videoId") );

                    function getHTML5Player( videoId : String ) : String

                    {

                              return "<iframe id=\"player\" type=\"text/html\" width=\"640\" height=\"390\"" +

                                        "src=\"http://www.youtube.com/embed/"+videoId+"?rel=0\ ?hd=1\ ?fs=1\" frameborder=\"0\"> </iframe>"

                    }

 

 

This isnt my code, but i adapted from this discussion http://forums.adobe.com/message/4589135

This code works perfectly for one video.

 

I tried to insert it into a movieclip but didnt work it. Maybe a did it wrong.

 

I also duplicate the code with differents video id but it only catches 1 id.

 

If any one could help i would be grateful !!

 

P.D: This actually works for IOS, i tested on an IPAD 2 if anyone wonders it.

 

Greatings!


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>