Jump to content

Search the Community

Showing results for tags 'videoLoader'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


  • Learning Center
  • Blog


  • Products
  • Plugins


  • Examples
  • Showcase


  • FAQ


  • ScrollTrigger Demos


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



  1. Hi, (first of all, sorry I posted a reply instead of creating new topic before, newby) I have a Loadermax with multiple loaders (image, xml, video and selfloader). All them have estimatedBytes and autodispose = false. I also have progress, complete and onError handlers set up. Testing for errors, I get the complete event fired before the onError event...... the onError handler would have a boolean to let the whole thing to start or not. so, why does the onComplete fires before the onError? Thanks Al
  2. Hi Guys, I am loading a few flv's using VideoLoader and LoaderMax queue. My video is 720x406 and I am stretching it to fit in 1000x564. VideoLoader's API says that smooting on videos is turned on by default and I have tried setting it to true as well. Problem is that when I test the sfw in flash, smoothing works but when I run this file in browser or on it own, no smoothing is applied. I have also tried this: intro.rawContent.smoothing = true; Appreciate if anyone can point out what might be happening. Thanks, ak
  3. Hello! We are using this tutorial as a starting point: http://codeknow.com/...ce/videoLoader/ What we have is seven F4V videos that are relatively large (smallest 5.2MB; largest 44.3MB). I am using the XML loader to create the queue and then load it as the tutorial link above demonstrates. The first video in the queue should play when enough of it is buffered in (it's 8.9MB) while the rest of the videos download in the background. I am using MaxConnections = 1. What is happening though is that the first video doesn't show until the entire queue of videos is loaded completely. The audio plays though. Can anyone lend some assistance to me to help troubleshoot this? XML file content: <?xml version="1.0" encoding="iso-8859-1"?> <videoList> <LoaderMax name="videoListLoader" prependURLs="video/" load="true" maxConnections="1" > <VideoLoader url="Intro.f4v" name="videoID0" width="1060" height="620" scaleMode="proportionalInside" centerRegistration="true" alpha="1" autoPlay="true" estimatedBytes="8887418" /> <VideoLoader url="RC.f4v" name="videoID1" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="14602065" /> <VideoLoader url="PED.f4v" name="videoID2" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="37803458" /> <VideoLoader url="AMT.f4v" name="videoID3" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="44307106" /> <VideoLoader url="ECR.f4v" name="videoID4" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="22076283" /> <VideoLoader url="REC.f4v" name="videoID5" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="27594500" /> <VideoLoader url="Outro.f4v" name="videoID6" width="856" height="530" scaleMode="proportionalInside" centerRegistration="true" alpha="0" autoPlay="false" estimatedBytes="5196856" /> </LoaderMax> </videoList> My Flash is too big to upload but here is the frame 1 script // Import Scripts import flash.net.URLRequest; import flash.display.MovieClip; import flash.events.Event; import flash.events.MouseEvent; import com.greensock.TweenMax; import com.greensock.events.LoaderEvent; import com.greensock.loading.LoaderMax; import com.greensock.loading.XMLLoader; import com.greensock.loading.VideoLoader; import flash.geom.Rectangle; //---- LOADER MAX ----------------------------------------------------------------; //an array containing the VideoLoaders in the order they should be played var _videos:Array; //keeps track of the VideoLoader that is currently playing var _currentVideo:VideoLoader; //If true, the audio has been muted var _silentMode:Boolean = false; //Check if we are in PlayAll Mode (true) var _playAllMode:Boolean = false; MainP(); //txt_progress.text = "0"; function MainP() { LoaderMax.activate([xmlLoader, VideoLoader]); initUI(); var xmlLoader:XMLLoader = new XMLLoader("videos.xml",{name:"videoList",onComplete:xmlHandler}); trace("XML Loader started"); xmlLoader.load(); trace("XML Loader Processing"); } function xmlHandler(event:LoaderEvent):void { trace("XML Complete Handler Started"); var queue:LoaderMax = LoaderMax.getLoader("videoListLoader");//get the LoaderMax named "videoListLoader" which was inside our XML _videos = queue.getChildren();//store the nested VideoLoaders in an array trace("Loading XML..."); queue.load(); //start loading the queue of VideoLoaders (they will load in sequence); trace("XML and videoListLoader loading!"); showVideo(_videos[0]);//show the first video } function initUI():void { //ignore mouse interaction with preloader_mc preloader_mc.mouseEnabled = false; //initially hide the user interface - autoAlpha:0 sets alpha to 0 and visible to false. TweenMax.allTo([preloader_mc], 0, {autoAlpha:0}); } function activateUI():void { btn_play.addEventListener(MouseEvent.CLICK, togglePlayPause); btn_next.addEventListener(MouseEvent.CLICK, nextVideo); btn_back.addEventListener(MouseEvent.CLICK, previousVideo); //loop through various UI elements and set buttonMode to true and mouseChildren to false so that rollovers/outs work smoothly; //var controls:Array = [btn_play]; //var i:int = controls.length; //while (i--) //{ //controls[i].buttonMode = true; //controls[i].mouseChildren = false; //} } //---- MENU BUTTONS ----------------------------------------------------------------; function play0(evt:MouseEvent):void { gotoAndPlay("Regulatory"); _playAllMode = false; selectedVideo(evt,1); } function play1(evt:MouseEvent):void { gotoAndPlay("EmplDev"); _playAllMode = false; selectedVideo(evt,2); } function play2(evt:MouseEvent):void { gotoAndPlay("AdvMgtTools"); _playAllMode = false; selectedVideo(evt,3); } function play3(evt:MouseEvent):void { gotoAndPlay("EmplRecords"); _playAllMode = false; selectedVideo(evt,4); } function play4(evt:MouseEvent):void { gotoAndPlay("Recruiting"); _playAllMode = false; selectedVideo(evt,5); } function play5(evt:MouseEvent):void { rewindAndPause(_currentVideo); _playAllMode = false; gotoAndPlay("MainMenu"); } function gotoViewAll(evt:MouseEvent):void { //rewindAndPause(_currentVideo); //gotoAndPlay("PlayAll","ViewAll"); _playAllMode = true; gotoAndPlay("Regulatory"); selectedVideo(evt,1); } // Button Setups - MENU BAR btn1.addEventListener(MouseEvent.CLICK, play0); btn2.addEventListener(MouseEvent.CLICK, play1); btn3.addEventListener(MouseEvent.CLICK, play2); btn4.addEventListener(MouseEvent.CLICK, play3); btn5.addEventListener(MouseEvent.CLICK, play4); btn6.addEventListener(MouseEvent.CLICK, play5); btn_viewall.addEventListener(MouseEvent.CLICK, gotoViewAll); // Trial Button Link btn_trial.addEventListener(MouseEvent.MOUSE_DOWN, trialButtonHandler); function trialButtonHandler(event:MouseEvent):void { navigateToURL(new URLRequest("https://www.prospera.com/signup/trialsignup.aspx?ActCode=00101817"),"_blank"); } // Contact Button Link btn_contact.addEventListener(MouseEvent.MOUSE_DOWN, contactButtonHandler); function contactButtonHandler(event:MouseEvent):void { navigateToURL(new URLRequest("http://www.prospera.com/"), "_blank"); } // Big SignUp Trial Button btn_signup.addEventListener(MouseEvent.MOUSE_DOWN, signupButtonHandler); function signupButtonHandler(event:MouseEvent):void { navigateToURL(new URLRequest("https://www.prospera.com/signup/trialsignup.aspx?ActCode=00101817"),"_blank"); } // Pricing Button Link btn_pricing.addEventListener(MouseEvent.MOUSE_DOWN, pricingButtonHandler); function pricingButtonHandler(event:MouseEvent):void { // NEED REAL LINK navigateToURL(new URLRequest("https://www.Prospera.com/HelpOutside/info.aspx?view=1"),"_blank"); } // Logo Click Button btn_logoClick.addEventListener(MouseEvent.MOUSE_DOWN, logoButtonHandler); function logoButtonHandler(event:MouseEvent):void { navigateToURL(new URLRequest("http://www.jjkeller.com/"),"_blank"); } //---- LoaderMax Video Controls ------------------------------------------------------------- function showVideo(video:VideoLoader):void { //if the new video is the one that's currently showing, do nothing. if (video == _currentVideo) { return; } //The first time through, the _currentVideo will be null. That's when we need to activate the user interface if (_currentVideo == null) { // NOT USING activateUI();//don't activate the UI until the first video is ready. This avoids errors when _currentVideo is null. } else { //remove the event listeners from the _currentVideo (which is now the old one that will be replaced) _currentVideo.removeEventListener(LoaderEvent.PROGRESS, updateDownloadProgress); if (_videos.indexOf(_currentVideo) == 0) { _currentVideo.addEventListener(VideoLoader.VIDEO_COMPLETE, gotoMainMenu); } else { if (_playAllMode == false) { _currentVideo.removeEventListener(VideoLoader.VIDEO_COMPLETE, gotoClosing); } else { _currentVideo.removeEventListener(VideoLoader.VIDEO_COMPLETE, nextVideo); } } _currentVideo.removeEventListener(VideoLoader.VIDEO_BUFFER_FULL, bufferFullHandler); //If the video is paused, we should togglePlayPause() so that the new video plays and the interface matches.; if (_currentVideo.videoPaused) { togglePlayPause(); } //fade out the preloader and then stop() it. If the new video needs to display the preloader, that's okay because the fade-in tween we create later will overwrite this one. TweenMax.to(preloader_mc, 0.3, {autoAlpha:0, onComplete:preloader_mc.stop}); //fade the current (old) video's alpha out. Remember the VideoLoader's "content" refers to the ContentDisplay Sprite we see on the screen.; TweenMax.to(_currentVideo.content, 0.8, {autoAlpha:0}); //fade the current (old) video's volume down to zero and then pause and rewind the video (it will be invisible by that time).; TweenMax.to(_currentVideo, 0.8, {volume:0, onComplete:rewindAndPause, onCompleteParams:[_currentVideo]}); } //now swap the _currentLoader variable so it refers to the new video. _currentVideo = video; //listen for PROGRESS events so that we can update the loadingBar_mc's scaleX accordingly _currentVideo.addEventListener(LoaderEvent.PROGRESS, updateDownloadProgress); //listen for a VIDEO_COMPLETE event so that we can automatically advance to the next video.; //########################################################################################## if (_videos.indexOf(_currentVideo) == 0) { _currentVideo.addEventListener(VideoLoader.VIDEO_COMPLETE, gotoMainMenu); } else { if (_playAllMode == false) { _currentVideo.addEventListener(VideoLoader.VIDEO_COMPLETE, gotoClosing); } else { _currentVideo.addEventListener(VideoLoader.VIDEO_COMPLETE, nextVideo); } } //########################################################################################## //if the video hasn't fully loaded yet and is still buffering, show the preloader; if (_currentVideo.progress < 1 && _currentVideo.bufferProgress < 1) { //when the buffer fills, we'll fade out the preloader _currentVideo.addEventListener(VideoLoader.VIDEO_BUFFER_FULL, bufferFullHandler); //prioritizing the video ensures that it moves to the top of the LoaderMax gueue and any other loaders that were loading are canceled to maximize bandwidth available for the new video.; _currentVideo.prioritize(true); //play() the preloader and fade its alpha up.; preloader_mc.play(); TweenMax.to(preloader_mc, 0.3, {autoAlpha:1}); } //start playing the video from its beginning _currentVideo.gotoVideoTime(0, true); //always start with the volume at 0, and fade it up to 1 if necessary.; _currentVideo.volume = 0; if (! _silentMode) { TweenMax.to(_currentVideo, 0.8, {volume:1}); } //when we addChild() the VideoLoader's content, it makes it rise to the top of the stacking order videoContainerInset_mc.addChild(_currentVideo.content); //fade the VideoLoader's content alpha in. Remember, the "content" refers to the ContentDisplay Sprite that we see on the stage.; TweenMax.to(_currentVideo.content, 0.8, {autoAlpha:1}); //update the progressBar_mc and loadingBar_mc; updateDownloadProgress(); } function bufferFullHandler(event:LoaderEvent):void { TweenMax.to(preloader_mc, 0.3, {autoAlpha:0, onComplete:preloader_mc.stop}); } function rewindAndPause(video:VideoLoader):void { video.pauseVideo(); //rewind the video so that when we fade it in again later, it's already displaying the first frame and there's no delay skipping to it. ; video.gotoVideoTime(0); } function rewindAndHide(video:VideoLoader):void { video.pauseVideo(); TweenMax.to(_currentVideo.content, 0.8, {autoAlpha:0}); //rewind the video so that when we fade it in again later, it's already displaying the first frame and there's no delay skipping to it. ; video.gotoVideoTime(0); } function nextVideo(event:Event):void { var next1:int = _videos.indexOf(_currentVideo) + 1; if (next1 >= _videos.length) { next1 = 1; rewindAndPause(_currentVideo); gotoAndPlay("MainMenu"); } else { if (next1 <= 6) { showVideo(_videos[next1]); } else { return; } } } function gotoClosing(event:Event):void { gotoAndPlay("Closing"); showVideo(_videos[6]); } function gotoMainMenu(event:Event):void { //rewindAndHide(_currentVideo); _playAllMode = false; gotoAndPlay("MainMenu"); } function previousVideo(event:Event):void { var prev:int = _videos.indexOf(_currentVideo) - 1; if (prev < 1) { prev = _videos.length - 1; } showVideo(_videos[prev]); } function selectedVideo(event:Event,whichVid:Number):void { showVideo(_videos[whichVid]); } //---- PROGRESS AND LOADING BAR FUNCTIONS ------------------------------------------------------------- function updateDownloadProgress(event:LoaderEvent=null):void { //loadingBar_mc.scaleX = _currentVideo.progress; //trace("progress: " + event.target.progress); //loadingBar_mc.scaleX = event.target.progress; //var currentProgress:Number = (int(event.target.progress * 100 )); //txt_progress.text = currentProgress.toString(); } //---- TOGGLE FUNCTIONS ------------------------------------------------------------------------------- function togglePlayPause(event:MouseEvent=null):void { _currentVideo.videoPaused = ! _currentVideo.videoPaused; if (_currentVideo.videoPaused) { //TweenMax.to(btn_play, 0.3, {autoAlpha:1}); btn_play.gotoAndStop("paused"); TweenMax.to(videoContainerInset_mc, 0.3, {blurFilter:{blurX:6, blurY:6}, colorMatrixFilter:{brightness:0.5}}); } else { //TweenMax.to(btn_play, 0.3, {autoAlpha:0}); btn_play.gotoAndStop("playing"); TweenMax.to(videoContainerInset_mc, 0.3, {blurFilter:{blurX:0, blurY:0, remove:true}, colorMatrixFilter:{brightness:1, remove:true}}); } } //---- UTILITY FUNCTIONS ------------------------------------------------------------------------------------- function addListeners(objects:Array, type:String, func:Function):void { var i:int = objects.length; while (i--) { objects[i].addEventListener(type, func); } } function force2Digits(value:Number):String { return (value < 10) ? "0" + String(value) : String(value); } Kindest Regards, Monica
  4. Hi, I seem to have found a bug... I'm currently working on a custom video player based on VideoLoader, and up till today everything was OK. I understand the limitations of progressive loading and all that, but... I thought I'd do a 'connection lost' test while the video file was still loading (disable/enable the ethernet connection on my PC). What I was hopping to see was the loading progress bar stop when I disable, and resume when I enable the connection, or at least get some king of a load error (fail, error, cancel, ioError). But that wasn't the case. In fact, atfer some digging around, I found that the bytesTotal were set to bytesLoaded when connection was lost (not the other way around, it's not a typo), which in my case were a lot less, thus giving me a progress of 1 and a completly full loading progress bar. Also, a loadComplete event was dispatched. So, when the playProgress reached that last loaded frame, instead of staying there and showing me that the videoBuffer was empty, it just triggerd a VIDEO_COMPLETE event. I can't seem to figure out any work around this, since the bytesTotal is read-only, right? Also, as mentioned before, no events are dispatched other then LoaderEvent.COMPLETE.
  5. Hi, I'm trying to find a solution for my loading concept: I have several pages, each loading a video. When I leave a page I call dispose() on the VideoLoader to stop the loading process. The problem is, when I call dispose without "true" my network analyser shows that the video is still loading data from the server. When I pass in true, the loading stops but also removes the video from cache. Is it possible to really stop the loading and at the same time don't clear it from cache ? Thanks, Oliver
  6. Hi All I am having an issue with a app that loads video from the app document directory. Its working great with flv format videos. It loads and plays fine. When I try to load mp4 or f4v it appears and acts as though it has loaded. My scrubber moves, time counts down but there is no audio or video. The video is just black. I am using gpu acceleration but have tried with it off and same result. Any help would be great. This is running on an ipad. I have the same app running on an adroid working fine. _videoProperties = new VideoLoaderVars(); _videoProperties.width(747); _videoProperties.height(419); //_videoProperties.bgColor(0x000000); _videoProperties.autoPlay(autoPlay); _videoProperties.container(_container); _videoLoader = new VideoLoader("file:////var/mobile/Applications/F601234555A-D27F-48D5-A484-675F7E84839F/Documents/myvideo.mp4", _videoProperties); _videoLoader.addEventListener(LoaderEvent.COMPLETE, _onLoadComplete, false, 0, true); _videoLoader.addEventListener(LoaderEvent.ERROR, _onLoadError, false, 0, true); _videoLoader.netStream _videoLoader.load(true); private function _onLoadComplete(e:Event):void{ _videoLoader.addEventListener(VideoLoader.PLAY_PROGRESS, updatePlayProgress); _videoLoader.addEventListener(VideoLoader.VIDEO_COMPLETE, VideoComplete); _videoScrubber.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownScrubber); _videoScrubber.addEventListener(MouseEvent.MOUSE_UP, mouseUpScrubber); _videoScrubber.addEventListener(MouseEvent.MOUSE_OUT, mouseUpScrubber); _playButton.addEventListener(MouseEvent.MOUSE_DOWN, playClick); _pauseButton.addEventListener(MouseEvent.MOUSE_DOWN, pauseClick); _muteButton.addEventListener(MouseEvent.MOUSE_DOWN, muteClick); _soundButton.addEventListener(MouseEvent.MOUSE_DOWN, soundClick); _volumeScrubber.addEventListener(MouseEvent.MOUSE_DOWN, volumeClick); _volumeScrubber.mouseChildren = false; _videoScrubber.mouseChildren = false; }
  7. I am having trouble with a screensaver file that I am creating. The basic idea is that a f4v will be loaded in with videoLoader and then it will play seemless until a specified amount of time when the videos will be paused, and a swf will play over the top. The first problem I am having is with the seemless aspect of the video. I have tried several options including setting repeat:-1, but as the file repeats, it pauses for half a second and you can see the background. To fix this I have two video loaders that listen for the end of one video, then switches to the other. This works fine on its own, but when I try to add in the swf after so many rotations it breaks the system after about 30 minutes depending on the computer. Could it be a problem with how large the stage size is? The stage is 5464x768.
  8. Hi there, First off I would like to say the work you have done thus far is awesome! I'm really hoping you can help me as I feel ive been banging my head against the wall the last couple of days. I have a project that will be running a video playlist, I want to remove a video once it has finished playing but the loaders, contentDisplay, video etc are still kept in memory when it try disposing of them. So over time the project maxes the memory and I am left with the big "!". I have gone through and stripped event listeners, and everything i can think of that may keep it in memory. I really hope you can point out what is going wrong. Attached are simplified versions of what im trying to do. Main.txt VideoPlayer.txt
  9. Thank you in advance. Great VideoLoader, love its features. I am having a sound issue though. I have three MCs in my FLA linked to the Main document. I load each video player into a dummy container on a mouse click event and am able to remove the content from the container. However, the sound keeps playing. I tried creating a dummy function with the Main class to pauseVideo but it comes back as undefined. i can trace (myMC.showVideo and return the fact that it is a function function {} so i know i can get into the class.) So, simply how would i stop the sound using multiple loaders within the same project? Thank you.
  10. Hello and thank you so much for the most useful AS3 Library I've ever used! I'm currently using a VideoLoader to playback external MP4 on a client website. I've set bufferMode=true and all goes well on short videos. However, on larger videos (about 100MB) when I try to seek the video immediately after the first bufferFull event: - bufferEmpty is displached properly - I display a 0% buffer progress info and wait for buffer progress - It stays at 0% for about 20 seconds! -> My problem - It then starts to show progress and quickly gets to 100% - bufferFull is dispached, all is good. I can't quite explain to my client why does this happen on our website and it doesn't happen on youtube. On youtube it starts re-buffering immediately after seeking to a further frame I'll post the essential parts of my code and I hope you can give me some insight on this subject, thank you very much in advance. Here is how initialize the loader: // Estimated Bytes are provided on each video video = new VideoLoader(url, {container:this, x:bkg.x, y:bkg.y, width:bkg.width, height:bkg.height, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:1, auditSize:false, estimatedBytes:this.estimatedBytes, bufferMode:true, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); video.load(); video.gotoVideoTime(0); video.addEventListener(VideoLoader.PLAY_PROGRESS, updatePlayProgress); video.addEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete); video.addEventListener(VideoLoader.VIDEO_BUFFER_EMPTY, bufferEmptyHandler); video.addEventListener(VideoLoader.VIDEO_BUFFER_FULL, bufferFullHandler); video.content.addEventListener(MouseEvent.DOUBLE_CLICK, toogleFullScreenMode); Here are the listener functions: public function progressHandler(event:LoaderEvent):void { trace("progressHandler",(Math.round(event.target.progress*100))+"%"); // custom code to display progress text } public function completeHandler(event:LoaderEvent):void { // custom code to hide buffer progress text } public function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } public function bufferEmptyHandler(evt:LoaderEvent):void { // custom code to show buffer progress text, starting with "0%" addEventListener(Event.ENTER_FRAME, reportBufferProgress); } public function bufferFullHandler(evt:LoaderEvent):void { trace("bufferFullHandler"); removeEventListener(Event.ENTER_FRAME, reportBufferProgress); completeHandler(null); } public function reportBufferProgress(evt:Event):void { // ISSUE: it stays at 0% for about 20 seconds on large movies and then evolves super fast to 100% trace("buffer progress:",video.bufferProgress); } public function updatePlayProgress(evt:LoaderEvent=null) { // custom code to show play progress bar } public function videoComplete(evt:LoaderEvent=null) { // custom code for when the video is done playing }
  11. Here's an easy one: How do I update the url that a conditional statement determines? What I have so far does not work: var video:VideoLoader = new VideoLoader('', {name:"weatherVideo", container:mc_video, width:756, height:672, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:0, estimatedBytes:75000}); if( condition == "Cloudy.png" ){ getVideos( 'video' ); } function getVideos( url:String ):void { video.getLoader( 'weatherVideo' ).url = url; video.load(); video.playVideo(); }
  12. Hi I want to make a simple video player with VideoLoader. But when I try to "fast forward" my video, addEventListener(Event.ENTER_FRAME, onFrame); private function onFrame(e:Event):void { if (videoLoader.duration - videoLoader.videoTime < 1) { removeEventListener(Event.ENTER_FRAME, onFrame); }else { videoLoader.videoTime += someSpeed; } } I found "videoTime" it never change, then in http://www.greensock...loadermax/#bugs If you seek() to a certain time in a NetStream and then immediately check its “time” property, it is often incorrect (reflects the previous time, not the new one) so, I change my code, just skip some frames do videoLoader.videoTime += someSpeed; not every frame. it works! But not smooth enough. If there has a better solution? Thanks.
  13. 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.
  14. Hello, and thanks for reading. I'm making a video player that continuos play clips from a playlist and I would like to dispose the video after playing it. I can't configure autoDispose:true because I still need it for some seconds when the next video is playing, this is the code I'm trying: //add cuepoint var oldVideo:Number = _videos.indexOf(_currentVideo) - 1; _currentVideo.addASCuePoint(1, "removeVideoCP", {n:oldVideo}); //..... // get message from cue point if (event.data.name == "removeVideoCP") { var _videoID:Number = event.data.parameters.n; //_videos:Array of VideoLoaders _videos[_videoID].dispose(); trace(_videos[_videoID].name); // this still traces "clip1" } Any idea? Thanks a lot for your help.
  15. Alright, I'm 100% stuck, and I really need some help with my project. Below is a link to the FULL project so you can see everything that's there and test it yourself. It's 180MB, sorry for the filesize, but its like 78MB of video and some sound and other things. http://www.mediafire.com/?5eox4gderare717 The project is one frame, on the frame there is a movie clip called rewinder. inside rewinder theres about 24 frames that left and right arrows on screen navigate between, and plays different videos. I'm loading videos 2 in front and 2 behind the current frame, and unloading any videos outside that threshold, but it's not helping. Further details but not super relevant I dont think: the swf is referencing a php file every 2.5 seconds that has a variable I'm using. The problem: Run the swf, and you'll see your RAM usage and CPU usage skyrocket. I've compressed the videos as much as I can, I'm using Loadermax, loading the videos when needed, unloading them when they're not needed, but it's just detrimental to the computer. It literally starts to crash other programs and slow the computer down because it's too intense on it. I don't know what the problem is or how to fix it. Furthermore, when you navigate pages, the RAM usage endlessly goes up well beyond 1GB. Is there a way that I can test where a memory leak is occuring? Does this seem like a LoaderMax issue? I'm a designer primarily and trying to work with AS3 and greensock, so I apologize that the code isn't refactored well or optimized. Any help would be TREMENDOUSLY appreciated, please let me know if I can supply with anything else thats needed for testing. The project is up and online at www.helpg.us. Please don't post that link around right now, just saying that so you can see the full file online running.