Jump to content

Search the Community

Showing results for tags 'loadermax'.

  • 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


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. I'm looping through all the items of my XML and use LoaderMax to load my SWFs onto stage, and trigger a function to generate video items and text items. This looks like this: for each (var item in Main.XMLLiveItems.items.*) { if (item.@type == "static") { Main.queue.insert(new SWFLoader("media/"+item.@name, { name:item.@id, container:area, alpha: 0, onComplete: itemLoaded }),item.@level); } else if (item.@type == "text") { createTextAsset(item); } else if (item.@type == "video") { createVideoAsset(item); } } However, this messes up the levels since LoaderMax loads the queue after my textassets and videos have been loaded onto stage. I can't add the text assets or the video assets to my stage (called area) when specifying the index, because the number of children is still zero when the createTextAsset and createVideoAsset functions are called. I've tried to first use 'applyFullXML' and then add the textfields and videoloaders as a child to the placeholders. This turned out the way I wanted, except the textfields did not scale properly (using the scaleWidthAndHeight property) since they were now a child of a sprite. I am currently not sure what to do so was hoping for a push in the right direction. Thanks again.
  2. Hi, I'm currently loading an image using the proportionalOutside and crop parameters: queue.append( new ImageLoader(_loadedImageURL, {name:_imageName, estimatedBytes:2800, container:this, alpha:1, width:100, height:50, scaleMode:"proportionalOutside", crop:true}) ); If we imagine the full sized image that is loaded to be 200px wide by 50px high the image will crop off the left and right 50px. That is all good but if I get the width of the image I get 200px, not 100. queue.getLoader(_imageName).rawContent.width); // 200 What I'm wanting to do is create a bitmap of the cropped area only, i.e. 100x50px Would anyone know how I can access just this part of the image? Thanks, Mark
  3. Hello, I have an AS3 file that loads fonts at runtime from a compiled SWF using: styleManager.loadStyleDeclarations("fonts.swf", true, true); My question is, can I use LoaderMax to load the "fonts.swf" file and use it in the same way I use it with loadStyleDeclaration: being able to force a refresh, so that every element that uses one of the fonts loaded will refresh it's style accordingly. Please let me know if this is something I cn achieve with LoaderMax. Regards, Livius
  4. I've come across and issue which I have found a work around. I am loading and playing external FLVs from a different server from where my SWF is located. When published locally and pulling in the FLVs, everything worked fine. When placing the SWF online, it wouldn't load the FLVs. After a day of troubleshooting and using crossdomain policies, I've narrowed it down to the loading procedure used. My findings are below. Please feel free to comment or let me know if I missed something that would have prevented me from wasting a day. I have done the following: 1. added crossdomain.xml to the site where the FLVs reside 2. added import flash.system.Security; Security.loadPolicyFile("http://www.mywebsite.com/crossdomain.xml"); <br><br> to my FLA The above files/code didn't have an impact on anything after my testing. I was loading the videos through the following code: var numVids = this.model.xml.q.opt.length(); for (var k:Number = 1; k <= numVids; k++) { var videoSrc:String = vidPath + this.model.xml.q.opt[(k - 1)].source; urls.push(videoSrc); var videoSrcFB:String = vidPath + this.model.xml.q.opt[(k - 1)].fb.source; urls.push(videoSrcFB); } //trace ("urls = " + urls); var queue:LoaderMax = LoaderMax.parse(urls, { onProgress:_progressHandler, onComplete:_queueComplete, onChildComplete:_childComplete }, { width:873.6, height:479, autoPlay:false } ); queue.load(); The above code worked fine when publishing the SWF and testing locally but wouldn't load the FLVs once I placed it online. My workaround: var numVids = this.model.xml.q.opt.length(); for (var k:Number = 1; k <= numVids; k++) { var videoSrc:String = vidPath + this.model.xml.q.opt[(k - 1)].source; urls.push(videoSrc); var videoSrcFB:String = vidPath + this.model.xml.q.opt[(k - 1)].fb.source; urls.push(videoSrcFB); } //trace ("urls = " + urls); var queue:LoaderMax = LoaderMax.parse(urls, { onProgress:_progressHandler, onComplete:_queueComplete, onChildComplete:_childComplete }, { width:873.6, height:479, autoPlay:false } ); for (var m:Number = 1; m <= urls.length; m++) { //append several loaders var load = urls[(m - 1)]; var video:VideoLoader = new VideoLoader(load, { onComplete:_queueComplete, width:873.6, height:479, autoPlay:false } ); //<--THIS IS THE CODE THAT WORKED video.load(); } I would much rather keep the LoaderMax.parse function to keep the code nice and clean but doesn't seem to do the trick when trying to play FLVs from diff server. Has anyone run into similar issues?
  5. 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.
  6. 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
  7. Hi, I'm making a custom web media player and want to use LoaderMAX. We are using FlashDevelop. Are there any demoes or examples of LoaderMAX in just code? (no .FLA files) I put the Greensock library in my project, but have some strange errors: "Type was not found or was not a compile-time constant", even though the files, classpaths and imports are all correct. Any help is much appreciated.
  8. Hi, I'm trying to accomplish the ProgressCircleMax like in the example on loadermax and I do see the circle in the example, so I was wondering how could I use it? Thanks
  9. I can't figure something out. I am trying to: Simply stated, I have loaded an XML doc. Changed it within Flash. I then want to update the XML doc on the server. Then reload the XML back into Flash. I have one main .xml document - "StudentXML.xml" (This is the file I want to overwrite with new info - it is also the file I read from with the application begins.) And one main .php document - "index.php" (sorry for my crappy naming standards..) Here is the PHP code I found (hoping it would do what I wanted) located in "index.php": <?php $filename = "StudentXML.xml"; $raw_xml = file_get_contents("php://input"); print $raw_xml; $fp = fopen($filename, "w"); fwrite($fp, $raw_xml); fclose($fp); ?> Here is my data I want to change and see transfered to the server to overwrite the current XML Document. At this point, I have already loaded, accessed, and read my StudentXML.xml within Flash. var newLogin:XML = <badge>eStudioLogin</badge>; studentXML.id.(@number == studentID.toString()).allBadgeNames.prependChild(newLogin); studentXML.id.(@number == studentID.toString()).badgesEarned = int(studentXML.id.(@number == studentID.toString()).badgesEarned) + 1; So far, and this is not working, I have pieced together this lovely bit of code: var requested:URLRequest = new URLRequest("www.mysite.com/index.php"); requested.data = studentXML; // This does trace the entire [i]edited[/i] XML document that is in Flash requested.method = URLRequestMethod.POST; var loader:XMLLoader = new XMLLoader(requested,{name:"StudentXML",onProgress:showProgress}); loader.load(); I know I am being dumb. It can't be this hard to transfer data and overwrite an existing xml document. Any help would truly be appreciated. Thanks, Adam
  10. Cheers, Wondering if anyone can help. Driving myself nuts I've been reengineering the slideshow example to load my own images of different sizes with fluid layout. When I take out the width and height from the images size correctly but they are all left aligned. Is it possible to center them with in the container or stage? Thanks new ImageLoader("assets/images/" + image.@name + ".jpg", {name:image.@name + "Image", scaleMode:"proportionalInside", bgAlpha:0, bgColor:0x000000, estimatedBytes:820000, onFail:_imageFailHandler})
  11. Hi, I am trying to load some images from xml with LoaderMax. When the LoaderMax finish his images loading he try to load himself, In the childComplete function I use the rawContent, but when the LoaderMax try to load his own instance I get an error says that loaderMax don't have rawContent. To bypass it I use this if statement if (event.target !="LoaderMax 'loaderMaxName'") I am sure there is better way to bypass it, What can I do? Thanks, DingoMan
  12. I'm using LoaderMax, and can't seem to figure out how to create a new instance of a movieclip it loads. I am loading an external SWF with a mc in the library. I'm new-ish to as3 so please be gentle. I think without LoaderMax, I would want to load the swf, and then do something like: var ObjectdAsset:Class = applicationDomain.getDefinition('mc_name'); var instance1 = new ObjectAsset(); var instance2 = new ObjectAsset(); ...etc Much appreciated
  13. Hello Greensock Forum Our group is making an interactive video project using Flash for LEGOLAND - a Danish theme park. You can see the current progress here: www.legoland.mmd.eal.dk. I have been in charge of coding the functionality of the video. How can I optimize the following code, especially around line 192, regarding CuePoints? http://legoland.mmd....com/parallax.as Could I make a function that does the skipping, that I can refer to? In advance thank you so much for your time, - kind regards, Morten Broesby-Olsen.
  14. Has anyone successfully used LoaderMax to load a swf that has a bunch of flasheff animation in it? Thanks
  15. Hi, Just need to sanity check what I am doing and get best advice on clearing loadermax queue (and contents) from memory. So, I am using a LoaderMax queue in Air to download & store locally a series of assets (images, videos, pdfs). _queue.append(new DataLoader(itemURL, {name:itemID, format:"binary", estimatedBytes:_estBytes_general, autoDispose:true}) ); I should say at this point I am not yet doing the saving to local filesystem (so that is not influencing memory) So, Potentially I may have 100's of MB of files which may kill the app if I wait until the end of the queue. So as a queue "child" loads in, I am (going to) save to file, then I kill of the child & it's contents. I also call garbage collection at this point (Air only). function queueChildComplete(event:LoaderEvent):void { event.target.unload(); _queue.remove(event.target as LoaderCore); System.gc(); } When the entire queue completes, I then call the following to clear the queue from memory (not that their should be anything in there anymore). _queue.unload(); _queue.dispose(true) _queue.empty(true,true); System.gc(); Don't think I need to be calling all of those unload, dispose & empty.. but you know belt & braces! Now the problem is, when I trace System.privateMemory before (just before queue.load) & after the operation, memory has increased by the size of the files downloaded. 1) What is the text book method of disposing of a queue, and it's contents .. totally from memory (knowing that I will have re instantiate it later). 2) Do you have a handy tool that will stream files directly to the local filesystem for AIR apps (using urlstream perhaps). Many Thanks
  16. I'm using autoplay=false to load a swf using SWFLoader. As expected, the swf is stopped during the timeline. Is there a way to make it play without knowing how many frames it has(without using the plugin "frame")?
  17. Hey, guys, here's what's going on: I'm using SWF Studio Pro to augment my SWF and create a folder in the user's %APPDATA% directory on a Windows machine. That all works like it should. The problem, however, is when I attempt to load an XML file saved to the user's local machine: when my EXE is first run, it copies an XML file to %APPDATA%\pathname\filename.xml Because I won't know what the users' names are, how can I tell LoaderMax to look in said folder? SWF Studio Pro uses what it called "monikers" that get resolved to the actual paths required, so for example when I type "appdata://pathname/filename.xml", the program sees "C:\Users\Blake\AppData\Roaming\pathname\filename.xml" LoaderMax is, understandably, having trouble (that is, it's not) resolving the full appdata path. Any thoughts on how to solve this problem? Thanks!
  18. I'm getting the following errors below, when I'm loading a SWF into another SWF, the parent will eventually be an executable. I don't think this error is related to LoaderMax (great product by the way), but I feel that since you guys are the experts in loading assets you might know the answer. Things to point out: - when I change the method type to URLRequestMethod.POST it loads great, but for some reason I can't grab the parameters from the loaded SWF. I'm using this.loaderInfo.parameters["appendPath"] but it's undefined, I think that is only for query string variable? If I knew the way to grab the posted values, I think that would fix my problem. - I have queue.append twice only to show the code.. when I run the code I comment one out, one throws URL not found the other is the Stream Error. - I have modified my Flash Professional CS 5.5 so that I can compile Air for IOS, I did read somewhere something about using debug player that may be causing this, I need to test this app on a different Flash professional version that is not modified. I don't remember the exact things I did, but i had to change XML's and update players.. not sure if that is causing this error. - I've also tried passing file path as a string with the query params at the end, the minute it saw a key it thru the error, when I had the ? it loaded ok. It's like the minute it sees a query string it blows up. - The child.swf is compiled using FLASHDEVELOP 4.0 with compiler "C:\flex_sdk_3.3.0.4852" -use-network=true and "Use Network Services = False" not sure if that is the problem, I do have access to the child and can compile it in anyway needed. - The Parent.swf is compiled in FP CS 5.5 targeting flash player 10 and above.. I've test all players and got the same results. Please help!! thx in advance! var request:URLRequest = new URLRequest("assets/child.swf"); var data:URLVariables = new URLVariables(); data.appendPath = "test"; request.data = data; request.method = URLRequestMethod.GET; var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( new SWFLoader(request, { name:"loaderClip", auditSize:true, container:container.holder, y:0, x:0 } ) ); queue.append( new SWFLoader(request, { name:"loaderClip", estimatedBytes:369920, container:container.holder, y:0, x:0 } ) ); queue.load(); progress: 0 LoaderMax 'mainQueue' is complete! ---- Error on SWFLoader 'loaderClip' (assets/child.swf): Error #2035: URL Not Found. URL: file:///C|/CDA/DVD/deploy/assets/child.swf?appendPath=test ---- error occured with SWFLoader 'loaderClip' (assets/child.swf): SWFLoader 'loaderClip' (assets/child.swf) > Error #2035: URL Not Found. URL: file:///C|/CDA/DVD/deploy/assets/child.swf?appendPath=test ---- Error on SWFLoader 'loaderClip' (assets/child.swf): Error #2032: Stream Error. URL: file:///C|/CDA/DVD/deploy/assets/child.swf?appendPath=test ---- error occured with SWFLoader 'loaderClip' (assets/child.swf): SWFLoader 'heaLoader' (assets/child.swf) > Error #2032: Stream Error. URL: file:///C|/CDA/DVD/deploy/assets/child.swf?appendPath=test progress: 0 LoaderMax 'mainQueue' is complete!
  19. If I use LoaderMax to load pngs with transparent backgrounds and add mouse event listeners to the pngs, will the listeners respond when the mouse is over the transparent portion of the png? If so, is there a way to change this so that the mouse events only dispatch when hovering over opaque portions of the png? Thank you
  20. Hi, If I load lots of ImageLoaders via a LoaderMax queue. var queue = new LoaderMax({name:"mainQueue",onProgress:progressHandler,onComplete:completeHandler}); for(...) { var _loader = new ImageLoader(_media_url+".jpg", {name:_media_url, container:this, width:100, height:100, scaleMode:"stretch", onComplete:completeHandler}); } queue.append( _loader ); Is my code more efficient/optimised if I remove all listeners from all ImageLoaders or does it not make any difference if I just leave them there? I had an idea of creating a new bitmap of the loaded content and then using dispose(true) for all the ImageLoaders. Would that be more efficient than just keeping the ImageLoaders as they are? Thanks, Mark
  21. Hi guys, has anyone else had this problem or know of why it might be happening? Im building a simple recipe app for a client of ours and using loadermax to load the xml and images etc, its going to be on android and iphone. i'm loading my images like this, into a cropped area: queue.append( new ImageLoader(imagePath+imageURL, {name:elementID, estimatedBytes:40000, container:listElementContainer, alpha:1, height:300, width:640, scaleMode:"proportionalOutside", crop:"true"}) ); Then after everythings finished loading im using blitmask and making the page scrollable: pageScroll = new BlitMask(scrollPageTarget, bounds.x, bounds.y, bounds.width, bounds.height, true, true, 0xffffff, false); (using the throwplugin etc) Basically my problem is it all works fine on a pc or mac but when exporting to the phone the loadermax crop appears to work until you finish scrolling and i disable blitmask (to make the links to the recipes clickable again) and it seems to disable all the cropped images and show them in full again, then when scrolling again it enables blitmask and it all looks perfect again then when u stop boom all the images are back full again. Anyone encounters any bugs like this before when using loadermax and blitmask? thanks for any help, not sure what else to post so please ask questions and i'll do my best to answer. chur ed
  22. Without exception the following code: queue.append(new ImageLoader("images/whale.png", {width:640, height:450, scaleMode:"proportionalOutside", crop:true, container:this})); Displays the image at half the size entered. My project will be loading images of different sizes and orientations and I want to scale and crop them to fit a movieClip of a specified size. Any advice?