Jump to content
GreenSock

Multi-Task

Members
  • Posts

    19
  • Joined

  • Last visited

Reputation

0 Newbie
  1. Side note... To set back the SWF timeline of the child swf, is it someAsset.rawContent.gotoAndStop(1); or someAsset.content.gotoAndStop(1); These would all be loaded into the container_mc
  2. If this is not possible given my scenario, do you know of any work arounds? I was thinking about adding some custom listeners and events but not sure if that would even help in this scenario.
  3. Thanks Carl for helping out... So I added a simple text field on stage to try to determine what is being referenced and for displaying errors. Environment: AIR app runs on desktop and loads in externally hosted SWF files. This all works great since I have a crossdomain policy in place. However; after your suggestions. I am getting a #2047 error. Any ideas? Is it not possible to call public functions of an AIR app from externally hosted SWFS? private function showSomething():void { try { this.dText.text = "parent " + MovieClip(this.parent.parent.parent.parent); } catch(e:Error) { this.dText.text = e.errorID+"\nError Message : "+e.message; } } private function done():void { this.dText.text = "done"; var curParent:MovieClip = this.parent.parent.parent.parent as MovieClip; curParent.swfFinished(); }
  4. From the child swf, this.parent says its referencing the stage. so this.parent.parent should be the container_mc? adding another parent (this.parent.parent.parent) should be the stage of the parent application? but what about the document class of that parent? :/ I should add that these sub SWFs are being loaded into an AIR app. SWFs are pulled from Server... Am I even able to access the public functions within the AIR app from the loaded SWFs?
  5. Trying to unload a child SWF by calling the parent document class function from the child document class... Loading as such from Main Document class: (SWF loads and plays fine) if(currAsset is SWFLoader){ container_mc.addChild(currAsset.rawContent); currAsset.rawContent.gotoAndPlay(1); } Also, within Main Document Class: public function swfFinished():void { var currAsset = media.getChildAt(mediaTracker-1); currAsset.content.visible = false; currAsset.rawContent.gotoAndStop(1); container_mc.removeChildAt(0); currAsset=null; //set up and play the next swf managePlayBack(); } Then - From the Child SWFs Main Document Class: This function is fired once the SWF is done (last frame of SWF calls this), this fires but doesnt trigger parent function of swfFinished(). private function done():void { var curParent:MovieClip = this.parent.parent.root as MovieClip; curParent.swfFinished(); } Any ideas?
  6. I am wondering if this is even possible. I am using LoaderMax/XMLLoader and loading in SWF files that are externally hosted into an AIR app. Everything works great! With LoaderMax is it possible to have one of these child SWFs load in some type of XML data? Or if need be, should I have the AIR app do all the loading (including the other XML) and pass that to the child SWF? Thanks in advance! In detail: AIR app -> Loads SWFs SWFS -> Load XML SWF -> displays something or does something RAD!!! Thanks in advance!
  7. Thanks Carl! I was also curious per one of my initial questions; Have you guys noticed whether with the LoaderMax by itself and/or AIR/Flash Player, is it better (memory speaking) to use FLVs within swfs or MP4s? Thanks in advance!
  8. Thanks Carl for responding. So per my set up I am loading everything into the var media:LoaderMax; This is referenced in the first function where I am setting; var currAsset = media.getChildAt(mediaTracker-1); I am also harnessing the XMLLoader and once that is done I am calling media.load(); I am cycling through these per a var mediaTracker:int; As the files play over and over, I am just incrementing the mediaTracker ++ and then if its at the end setting it back to 1. Now when the videoComplete function is called per the Event; VideoLoader.VIDEO_COMPLETE Do I actually want to unload(); given I am going to play the file again? I thought that would empty out all content and then I would have to reload? Thanks in advance!
  9. Video presenter made with VideoLoader... I made a video presenter that loads videos (mp4) and cycles through them. There are 8 videos in total around 30MB combined. Everything loads in perfectly and plays for awhile, however, for some reason after a certain number of cycles, the screen will go black and the video complete listener never fires. It does this on random videos and is never the same video that it happens to. The managePlayer function will fire and load the video but it never fires the complete event. Is this sufficient addition/removal of videoLoader? Am I missing something? Any ideas why the screen would go black and the complete event never fires? Per memory usage would it be better to make swfs rather than MP4s? private function managePlayer():void { //this just traces out to a window where we are at addToDisplayIt("managePlayer"); var currAsset = media.getChildAt(mediaTracker-1); if(currAsset.vars.type!=null) { if(currAsset is VideoLoader){ container_mc.addChild(currAsset.content); currAsset.playVideo(); currAsset.addEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete); } } } private function videoComplete(e:Event):void { //this just traces out to a window where we are at addToDisplayIt("videoComplete"); var currAsset:VideoLoader = VideoLoader(e.target); currAsset.removeEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete); currAsset.gotoVideoTime(0, false); container_mc.removeChildAt(0); currAsset=null; managePlayBack(); }
  10. Carl, thanks for responding so quickly. Yep! Policy file is in place and I did set everything up per that link you sent prior to testing this. Since yesterday I have tested a few more things in more detail. My policy file loads per my Logs. OK: Policy file accepted: https://somebucket.s3.amazonaws.com/crossdomain.xml) The problem: There is extra encoding happening on certain URL parameter values. Fixed by unescape(url); However is it possible to turn this off globally with the loadermax and set vars? hmm...
  11. Multi-Task

    s3

    First off, the new forum and site are sick! Nice work. Looks great! I am stumped on this one. I made a sample loader (image loader) since I know the test is an image. I am trying to load an image from s3 and I am getting errors? Any ideas why? Below is just an example with real data taken out. Also: In the output window I am getting Error on ImageLoader - with the correct path to the file which if copy and pasted works in a browser. It also says Error Load never completed URL: then the url again with the parameters and values in a different order. Why is this parameter and value shift happening? Also which URL is it actually trying to load? Any help is appreciated. Thanks in advance! var myImage:ImageLoader = new ImageLoader("https://somebucket.s3.amazonaws.com/img/someFile.jpg?AWSAccessKeyId=someAccessKey&Expires=someTime&Signature=someSignature", {container:this}); myImage.load();
  12. True. All true. I just didn't know if there were limits built in. Thanks though. Publishing for AIR 3.4, (the same assets/playlist run fine when in debug mode). I will try to find that happy place for a few various devices. I have tried leveraging setting various vars: media = LoaderMax.getLoader("media"); media.vars = {maxConnections : 1, auditSize : false }; But to no avail… Thoughts? Trying to play - 10 MP4s @ an average of 8MB each -mt
  13. Is there a maximum of videoLoaders one can add? I have 14 MP4s that I am trying to play back. On initial start of the app. It attempts to load but then crashes. Is there a Max to LoaderMax (especially for video)? Thanks in advance. -MT
  14. Roger that Carl. A new test will commence here shortly. I will try swfs only (without FLVs embedded). Thanks for the help, forgot to mention this is for an air app. no browser. Interesting comment you made about FLVs. I have a few SWFs that have FLVs embedded in them and they act very goofy upon playback. I'll be back (arnold voice). Thanks again.
  15. Thanks Carl. Even if I am going to cycle through and play them again? I thought the dispose method completely removes them and sets it out for GC... It is fairly odd too, since I am testing also if all eventListeners have been cleared which they are. Like so, trace(currAsset.hasEventListener(VideoLoader.VIDEO_COMPLETE)); Returns false as it should.
×