メニューバー

HOME HELP 新着記事 ツリー表示 スレッド表示 トピック表示 発言ランク ファイル一覧 検索 過去ログ

■306 / 1階層)  AS3:videoPlay_auto.as
□投稿者/ mitt クラウンプライズ(54回)-(2009/12/11(Fri) 01:18:37) [ID:vS2O7xY5]
http://mitt3210.com
    package {
    import fl.video.*;
    import flash.events.*;
    import flash.text.*;
    import fl.containers.UILoader;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import flash.display.Sprite;

    public class videoPlay_auto extends Sprite {
    private var myLoader:URLLoader;
    private var videoNum:Number = 5;
    private var video:Array = [];
    private var videoTitle:Array = [];
    private var videoContent:Array = [];
    private var img:Array = [];
    private var player = new FLVPlayback();
    private var n:Number;
    private var infoBox = new TextField();
    private var aLoader1 = new UILoader();
    private var aLoader2 = new UILoader();
    private var aLoader3 = new UILoader();
    private var aLoader4 = new UILoader();
    private var aLoader5 = new UILoader();
    private var myXML:XML;

    public function videoPlay_auto() {
    var infoBox:TextField = new TextField();
    with(infoBox) {x = 640;y = 10;width = 160;height = 85;wordWrap = true;}var info:TextFormat = new TextFormat();info.font = "_明朝";info.color = 0xFFFFFF;info.size = 10; infoBox.defaultTextFormat = info;
    addChild(infoBox);

    var myXML:XML = new XML();
    var XML_URL:String = "videoPlay.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(event:Event):void{
    myXML = XML(myLoader.data);
    var total:String = myXML.total.toString();
    var pskin:String = myXML.pskin.toString();
    var pskinCol:String = myXML.pskinCol.toString();
    var txtCol:String = myXML.txtCol.toString();
    var element:XML;
    for each (element in myXML..item){
    var flv:String = element.flv.toString();
    var img:String = element.img.toString();
    var videoTitle:String = element.videoTitle.toString();
    var videoContent:String = element.videoContent.toString();


    var aLoade1r:UILoader = new UILoader();
    aLoader1.source = myXML.channel.item.img[0].toString();
    aLoader1.scaleContent = true;
    with (aLoader1) {
    x = 660;y = 40;scaleX = scaleY = 1.2;alpha = 0.7;
    }
    addChild(aLoader1);
    aLoader1.buttonMode = true;
    aLoader1.addEventListener(MouseEvent.ROLL_OVER, rollover);
    aLoader1.addEventListener(MouseEvent.ROLL_OUT, rollout);
    aLoader1.addEventListener(MouseEvent.CLICK, playStart);
    function playStart(event:MouseEvent) {player.source = myXML.channel.item.flv[0].toString();player.play();infoBox.text = myXML.channel.item.videoTitle[0]+"\n "+"\n "+myXML.channel.item.videoContent[0].toString();}
    function rollover(event:MouseEvent):void {event.target.alpha = 1.0;alt.text = myXML.channel.item.videoContent[0].toString();}
    function rollout(event:MouseEvent):void {event.target.alpha = 0.7;alt.text = "\n "+"\n ".toString();}

    var aLoade2r:UILoader = new UILoader();
    aLoader2.source = myXML.channel.item.img[1].toString();
    aLoader2.scaleContent = true;
    with (aLoader2) {
    x = 660;y = 133;scaleX = scaleY = 1.2;alpha = 0.7;
    }
    addChild(aLoader2);
    aLoader2.buttonMode = true;
    aLoader2.addEventListener(MouseEvent.ROLL_OVER, rollover2);
    aLoader2.addEventListener(MouseEvent.ROLL_OUT, rollout2);
    aLoader2.addEventListener(MouseEvent.CLICK, playStart2);
    function playStart2(event:MouseEvent) {player.source = myXML.channel.item.flv[1].toString();player.play();infoBox.text = myXML.channel.item.videoTitle[1]+"\n "+"\n "+myXML.channel.item.videoContent[1].toString();}
    function rollover2(event:MouseEvent):void {event.target.alpha = 1.0;alt2.text = myXML.channel.item.videoContent[1].toString();}
    function rollout2(event:MouseEvent):void {event.target.alpha = 0.7;alt2.text = "\n "+"\n ".toString();}

    var aLoade3r:UILoader = new UILoader();
    aLoader3.source = myXML.channel.item.img[2].toString();
    aLoader3.scaleContent = true;
    with (aLoader3) {
    x = 660;y = 226;scaleX = scaleY = 1.2;alpha = 0.7;
    }
    addChild(aLoader3);
    aLoader3.buttonMode = true;
    aLoader3.addEventListener(MouseEvent.ROLL_OVER, rollover3);
    aLoader3.addEventListener(MouseEvent.ROLL_OUT, rollout3);
    aLoader3.addEventListener(MouseEvent.CLICK, playStart3);
    function playStart3(event:MouseEvent) {player.source = myXML.channel.item.flv[2].toString();player.play();infoBox.text = myXML.channel.item.videoTitle[2]+"\n "+"\n "+myXML.channel.item.videoContent[2].toString();}
    function rollover3(event:MouseEvent):void {event.target.alpha = 1.0;alt3.text = myXML.channel.item.videoContent[2].toString();}
    function rollout3(event:MouseEvent):void {event.target.alpha = 0.7;alt3.text = "\n "+"\n ".toString();}

    var aLoade4r:UILoader = new UILoader();
    aLoader4.source = myXML.channel.item.img[3].toString();
    aLoader4.scaleContent = true;
    with (aLoader4) {
    x = 660;y = 319;scaleX = scaleY = 1.2;alpha = 0.7;
    }
    addChild(aLoader4);
    aLoader4.buttonMode = true;
    aLoader4.addEventListener(MouseEvent.ROLL_OVER, rollover4);
    aLoader4.addEventListener(MouseEvent.ROLL_OUT, rollout4);
    aLoader4.addEventListener(MouseEvent.CLICK, playStart4);
    function playStart4(event:MouseEvent) {player.source = myXML.channel.item.flv[3].toString();player.play();infoBox.text = myXML.channel.item.videoTitle[3]+"\n "+"\n "+myXML.channel.item.videoContent[3].toString();}
    function rollover4(event:MouseEvent):void {event.target.alpha = 1.0;alt4.text = myXML.channel.item.videoContent[3].toString();}
    function rollout4(event:MouseEvent):void {event.target.alpha = 0.7;alt4.text = "\n "+"\n ".toString();}

    var aLoade5r:UILoader = new UILoader();
    aLoader5.source = myXML.channel.item.img[4].toString();
    aLoader5.scaleContent = true;
    with (aLoader5) {
    x = 660;y = 412;scaleX = scaleY = 1.2;alpha = 0.7;
    }
    addChild(aLoader5);
    aLoader5.buttonMode = true;
    aLoader5.addEventListener(MouseEvent.ROLL_OVER, rollover5);
    aLoader5.addEventListener(MouseEvent.ROLL_OUT, rollout5);
    aLoader5.addEventListener(MouseEvent.CLICK, playStart5);
    function playStart5(event:MouseEvent) {player.source = myXML.channel.item.flv[4].toString();player.play();infoBox.text = myXML.channel.item.videoTitle[4]+"\n "+"\n "+myXML.channel.item.videoContent[4].toString();}
    function rollover5(event:MouseEvent):void {event.target.alpha = 1.0;alt5.text = myXML.channel.item.videoContent[4].toString();}
    function rollout5(event:MouseEvent):void {event.target.alpha = 0.7;alt5.text = "\n "+"\n ".toString();}
削除キー/

前の記事(元になった記事) 次の記事(この記事の返信)
←5個編:AS3:XMLを読み込んで表示するプレーヤー /mitt [ID:vS2O7xY5] →AS3:videoPlay_auto.asの続き /mitt [ID:vS2O7xY5]
 
上記関連ツリー

Nomal 5個編:AS3:XMLを読み込んで表示するプレーヤー / mitt (09/12/11(Fri) 01:07) [ID:vS2O7xY5] #305
Nomal AS3:videoPlay_auto.as / mitt (09/12/11(Fri) 01:18) [ID:vS2O7xY5] #306 ←Now
  └Nomal AS3:videoPlay_auto.asの続き / mitt (09/12/11(Fri) 01:20) [ID:vS2O7xY5] #307
    └Nomal videoPlay.xml / mitt (09/12/11(Fri) 01:23) [ID:vS2O7xY5] #308

All 上記ツリーを一括表示 / 上記ツリーをトピック表示
 
上記の記事へ返信

Mode/  Pass/

HOME HELP 新着記事 ツリー表示 スレッド表示 トピック表示 発言ランク ファイル一覧 検索 過去ログ

- Child Tree -