Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

gokceng

Members
  • Posts

    1
  • Joined

  • Last visited

gokceng's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm using Flash Builder. I load videos from an xml and after that i add video content to application. Code is like that: Application.mxml: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)"> <fx:Script> <![CDATA[ import com.greensock.TweenLite; import com.greensock.events.LoaderEvent; import com.greensock.layout.AlignMode; import com.greensock.loading.LoaderMax; import com.greensock.loading.VideoLoader; import com.greensock.loading.XMLLoader; import com.greensock.loading.display.ContentDisplay; import com.greensock.loading.display.FlexContentDisplay; import mx.collections.ArrayCollection; import mx.events.FlexEvent; import spark.components.Button; import spark.components.HGroup; import spark.components.VideoPlayer; protected var videosPath:String = "assets/videos.xml"; [bindable] protected var videos:ArrayCollection = new ArrayCollection(); protected var video1:FlexContentDisplay; protected function application1_creationCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub LoaderMax.activate([xmlLoader, VideoLoader]); LoaderMax.contentDisplayClass = FlexContentDisplay; loadVideos2(); } protected function loadVideos2():void { var loader:XMLLoader = new XMLLoader(videosPath, {name:"xmlDoc", onComplete:completeHandler}); loader.load(); } private function completeHandler(event:LoaderEvent):void { var queue:XMLLoader = LoaderMax.getLoader("xmlDoc"); videos = new ArrayCollection(queue.getChildren()); var vl:VideoLoader = videos.getItemAt(0) as VideoLoader; video1 = vl.content; video1.horizontalCenter = 0; video1.verticalCenter = 0; addElement(video1); } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> </s:Application> videos.xml: <?xml version="1.0" encoding="utf-8" ?> <data> <item> <VideoLoader url="assets/vid/magicfall1.flv" name="video4" autoPlay="false" load="true" width="400" height="300" crop="false" scaleMode="proportionalOutside" /> </item> <!-- Some other videos, not posted for simplicity, but their properties exactly same except names --> </data> If i run the program from Flash Builder, I've no problem, it is visible immediately. But if I Export Release Build and put that build to server, when i go to that web page i wait for 3-4 minutes until video content seen on the browser. The size of the video is 24.2 MB. Is that normal? By the way I'm using Version: 1.9.
×