Search the Community

Showing results for tags 'imageloader'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 / JS
    • GSAP
    • Banner Animation
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Categories

  • HTML5 / JS
    • Public
    • "Simply Green" Package
    • "Shockingly Green" Package
    • "Business Green" Package
  • Flash
    • AS3
    • AS2

Found 18 results

  1. Since I've updated my AIR runtime to 27.0.0.124, I'm experiencing a crash in any project that uses ImageLoader / LoaderMax to load images from the local file system. This is a brand new issue that has just started today and is consistent with all my previous projects. The code is: var queue:LoaderMax = new LoaderMax( { onComplete:onBitmapsLoaded, onError:onBitmapsError } ); for (var i:int = 0; i < _imagesToLoad.length; i++) { queue.append(new ImageLoader(_imagesToLoad[i].path, {name:_imagesToLoad[i].id})); } queue.load(); At the point of calling LoaderMax to load, the application crashes with the following report: Log Name: Application Source: Application Error Date: 27/09/2017 14:30:50 Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: DESKTOP-L18EOIN Description: Faulting application name: adl.exe, version: 26.0.0.118, time stamp: 0x592be5a1 Faulting module name: SS2DevProps.dll, version: 0.0.0.0, time stamp: 0x58873503 Exception code: 0xc0000005 Fault offset: 0x00009522 Faulting process ID: 0x2534 Faulting application start time: 0x01d33794d41287f9 Faulting application path: C:\Users\ben\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+26.0.0\bin\adl.exe Faulting module path: C:\Program Files\ASUSTeK COMPUTER INC\SS2\UserInterface\SS2DevProps.dll Report ID: c4b45f2f-183b-470f-95df-1a1a28134578 Faulting package full name: Faulting package-relative application ID: Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2017-09-27T13:30:50.246338200Z" /> <EventRecordID>6764</EventRecordID> <Channel>Application</Channel> <Computer>DESKTOP-L18EOIN</Computer> <Security /> </System> <EventData> <Data>adl.exe</Data> <Data>26.0.0.118</Data> <Data>592be5a1</Data> <Data>SS2DevProps.dll</Data> <Data>0.0.0.0</Data> <Data>58873503</Data> <Data>c0000005</Data> <Data>00009522</Data> <Data>2534</Data> <Data>01d33794d41287f9</Data> <Data>C:\Users\ben\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+26.0.0\bin\adl.exe</Data> <Data>C:\Program Files\ASUSTeK COMPUTER INC\SS2\UserInterface\SS2DevProps.dll</Data> <Data>c4b45f2f-183b-470f-95df-1a1a28134578</Data> <Data> </Data> <Data> </Data> </EventData> </Event> Is this just my local system? I've redownloaded and replaced the .SWC component but the problem remains. Thanks, Ben
  2. First of all let me thank you for your awesome loading features, what i mostly liked about them is that you can define loaders in an XML file, great job. Now to the important part. I just found out about Adobe Scout and decided to give it a try to tune my App and I found something quite weird that nearly doubled my memory use. The problem is that when i tried to decompress a loaded bitmapData with the getPixel(0,0) technique, two things used memory, Bitmap DisplayObjects and BitmapData, both used 20.480 KB. Why Bitmap DisplayObjects used memory? I thought that only BitmapData should have used memory, the Bitmap DisplayObjects was later garbage collected, but why is it being created in the first place.... So i tried using getPixel(0,0) on a clone of the bitmapData i loaded and Bitmap DisplayObjects never appeared. Is the Bitmap DisplayObjects memory being used by the ContentDisplay object that comes with the loader? If so, what can i do to prevent this from happening?
  3. Loading multiple images

    Hello guys, This is my first time using LoaderMax to load assets as I usually use the Starling asset manager however I am working on a standard flash application now and have had good experiences with TweenMax and TweenLite so thank you for providing these awesome tools! I am trying to load multiple images (pngs + jpegs) using the ImageLoader. It is working fine but I am looking for a way to be able to not add the images to the screen as soon as they are loaded and make them accessible to child sprites that I can't specify in the container parameter (These sprites are different screens which are created and destroyed as needed and do not exist at the time of loading). So basically, what is the best way to make these images accessible throught my application and not just in the class they are loaded in (this class is still a parent of all the sprites I will need to use these images in). Regards, Ash.
  4. Hello everyone, I've been spending the last few hours trying to display the loading progress of an image. Quick rundown of the project: I have a Controller FLA with a base class, this file constructs my course engine and all files associated with it. This engine contains many layers(Page, Overlay, Interface, etc) each is a separate swf file with a base class. One of the layers, IDLayer, loads images into it. On the loading progress the IDLayer sends the loading event data to the Controller so it can display the progress on the Overlay Layer. When running the program from Flash, the data traces out correctly and the progress is between 0 and 1. When I try to run the program from my hosting site it only traces out 0. Any help would be appreciated, thanks. Load Image Calls: private function displayImages($obj:Object):void { trace("[IDLayer >> displayImages]"); clearHolders(); LoaderQueue.LoadImg(_IMG_FOLDER+$obj._partImg,_imgHolder,false,"png","default",positionImage); //Load Part Image LoaderQueue.LoadImg(_IMG_FOLDER+$obj._locImg,_locHolder,false,"png","default",positionImage,updateImageProgress); //Load Location Image } Progress Handlers: private function updateImageProgress($le:LoaderEvent){ trace("[IDLayer >> updateImageProgress]"); //trace("\t",$le.target.progress); //ExternalInterface.call("alert", "IDLayer >> Loading Progress: " + $le.target.progress); Controller._this.UpdateImageLoadProgress($le); } private function positionImage($le:LoaderEvent):void { if((_IMG_FOLDER + _curPart._locImg) == $le.target.name){ //ExternalInterface.call("alert", "IDLayer IMAGE LOAD COMPLETE >> Loading Progress: " + $le.target.progress); Controller._this.UpdateImageLoadProgress($le); } var loadedImg:Object = $le.target.content; loadedImg.x = 0; loadedImg.y = 0; } LoaderQueue ImageLoader: public static function LoadImg($name:String, $cont:MovieClip, $local:Boolean=true, $ext:String="png", $process:String="default", $cb:Function=null, ...$phand):void { trace("[LoaderQueue >> LoadImg]"); var imgLoader:ImageLoader; var lhandler:LoaderHandler; var pHandler:Function; var cHandler:Function = $cb; var fext:String = $ext; var fname:String = $name; var ftype:String = "img"; var local:Boolean = $local; var process:String = $process; var container:MovieClip = $cont; ($phand[0]) ? pHandler = $phand[0] : pHandler = progressHandler; switch (local) { case true: imgLoader = new ImageLoader("../../../"+__BASE+__IMG_DIR+fname+"."+fext, {name:fname, x:10, y:10, container:container, scaleMode:"proportionalInside", onProgress:pHandler, onComplete:cHandler}); _imgQueue.append(imgLoader); break; case false: imgLoader = new ImageLoader(__ROOT+__BASE+__IMG_DIR+fname+"."+fext, {name:fname, x:10, y:10, container:container, scaleMode:"proportionalInside", onProgress:pHandler, onComplete:cHandler}); _imgQueue.append(imgLoader); break; } } Controller Handler: public function UpdateImageLoadProgress($le:LoaderEvent):void { //trace("[Controller >> UpdateImageLoadProgress]"); //trace("\t",$le.target.progress); var curProg:Number = Math.ceil($le.target.progress * 100); if (_overlayLayer.replay_overlay.currentLabel != 'loading') { _overlayLayer.replay_overlay.gotoAndStop('loading'); } //trace("\t***Loading Progress: "+curProg); _overlayLayer.replay_overlay.loadingBox_mc.pageName_dtf.text = "Loading Image(s)"; !_overlayLayer._showOverlay ? _overlayLayer._showOverlay = true : null; //ExternalInterface.call("alert", "Loading Progress: " + $le.target.progress); _overlayLayer.replay_overlay.loadingBox_mc.loaded_dtf.text = (curProg + "%"); //trace("\t***replay_overlay.loadingBox_mc.loaded_dtf.text:", _overlayLayer.replay_overlay.loadingBox_mc.loaded_dtf.text); (curProg >= 100) ? _overlayLayer._showOverlay = false : null; }
  5. I've been testing this for days now and I've reached my conclusions. I can consistently crash the API while previewing under the following circumstances: multiple JPG images are loaded. I'm using 5 to test: 1. A LoaderMax instance and appending to the queue using a for loop. 2. A LoaderMax instance and appending to the queue using parse() and an array of URLs that point to JPG images. 3. A singular ImageLoader instance in a for loop. If I preview this file in the Flash CC for Mac API, after 5 or 10 previews, the API will crash. If I switch to local image files, there is no crash on preview. If I reboot it will take more previews but after it crashes once, the next crash happens in less than 10 previews. Here is the code I've been using: LoaderMax.activate([ImageLoader]); var queue:LoaderMax = LoaderMax.parse(stringArray, {autoDispose: true, onComplete:completeHandler, onChildComplete:childCompleteHandler}); queue.load(); And the handlers: private function childCompleteHandler(event: LoaderEvent): void { trace("child done") } private function completeHandler(event: LoaderEvent): void { } Is there a memory leak in LoaderMax when loading non-local images in the api? I haven't noticed problems in the compiled SWF, just in the api when previewing.
  6. Hey guys, I'm using ImageLoader nodes in an XML file, to auto-load 500 images (total load weight around 20 megs). I'm using Flash Pro CC. An example node looks like this: <ImageLoader url="assets/images/patterns/thumb/pattern-0-thumb.png" name="pattern_thumb_0" load="true" /> When exporting locally from Flash, there's a 10 second lag as LoaderMax process all the images. I've attached 3 screenshots from Scout, and it looks like 87% of that 10 second-time is taken up by Flash sending URL requests for the images. When the files are up on a server everything runs normally (I expect a 10 second load on a server), but when running locally I'd expect the content to load almost immediately, but instead I'm getting the same 10 second lag. I understand that by setting load=true, LoaderMax is loading all the images at start, which is what I want. I'm wondering if this 10 second process time is normal for a local Flash export? And if I were to create the ImageLoaders via AS (rather than automatically via XML), would this 10 second local export be reduced? Or is there any other way to reduce this process time when exporting locally (keeping in mind I need to load all the images at app startup). Thanks for any insight.
  7. Bug On ImageLoader

    var imgLoader:ImageLoader = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete}); var imgLoader2:ImageLoader = null; imgLoader.load(); var tempBD:BitmapData = null; function onComplete(evt:LoaderEvent):void{ tempBD = imgLoader.rawContent.bitmapData; tempBD.dispose(); // imgLoader.dispose(true); imgLoader2 = new ImageLoader("data/img/global_ui/blue/ButtonStd1.jpg", {onComplete : onComplete2}); imgLoader2.load(); } function onComplete2(evt:LoaderEvent):void{ trace(imgLoader2.rawContent.bitmapData.height); } If I comment dispose(true), onComplete2 will give and error. GreenSock ImageLoader does not check if the bitmapData is being disposed or not before sending.
  8. hi, thank you for this great and useful tool. my xml: <data> <ImageLoader name="digital_01" url="imgs/digital_01.jpg" centerRegistration="true" width="640" height="400" twx="342" twy="391" kw="230" kh="200" load="true"/> <ImageLoader name="digital_02" url="imgs/digital_02.jpg" centerRegistration="true" width="734" height="400" twx="594" twy="389" kw="215" kh="192" load="true"/> </data> as3: var queue_xml:XMLLoader = new XMLLoader("imgs/digitals.xml", {name:"digitalsXML", maxConnections:1, estimatedBytes:5000, onChildComplete:imageCompleteHandler, onComplete:queueCompleteHandler}); queue_xml.load(); var img_xml:XML = new XML; function imageCompleteHandler(event:LoaderEvent):void { addChild(event.target.content as ContentDisplay); img_xml = LoaderMax.getLoader(event.target.name).vars.rawXML; //i want to scale down images for using them as thumbnails too TweenMax.to(event.target.content, 0, {autoAlpha:0.2, blurFilter:{blurX:5, blurY:5}, width:img_xml.@kw, height:img_xml.@kh, x:img_xml.@twx, y:img_xml.@twy}); trace("original image value:"+ img_xml.@width +", xml thumbnail size(kw) value:"+ img_xml.@kw +", current image value:"+ event.target.content.width); // trace result for first //original image value:640, xml thumbnail size(kw) value:230, current image value:820 //trace result for second //original image value:734, xml thumbnail size(kw) value:215, current image value:1095 } function queueCompleteHandler(event:LoaderEvent):void { } problem: my images bigger than its actual size but i want them smaller. when i set kw or kh to negative values, result is what i want. btw this is my first project with greensock tools.
  9. I'd like to use LoaderMax to load an xml file that will contain references to other xml files, one of which will contain nodes representing imageloaders. I don't want to add these images to the display list immediately but instead have reference to them, perhaps in an array. What's the best way to grab references to these loaded images from layers down? Put a complete function on each image loaded? Is there a simpler way I imagine the pseudo-xml something like this: _myLoaderMax.load(mainXML, onComplete:getTheImages); function getTheImages():void { _myImageArray = getTheImagesFromLoaderSomehow(_myLoaderMax); } <mainxml> <xmlloader url='imagexml' load='true'/> </mainxml> <imagexml> <imageloader url='myimage1' load='true'/> <imageloader url='myimage2' load='true'/> </imagexml> Would it be using getContent() at the appropriate level -- i.e. pseudocode _myXMLLoader= _myLoaderMax.getLoader('myXML'); _myImageContent:Array = _myXMLLoader.getContent() On another related note — what's the best practice for making sure everything loaded via LoaderMax is garbage collected? That is, I can set the main LoaderMax to have autodispose='true', but will that also dispose of all sub-loaders? I realize that if I put listeners on any loaded assets, etc, that will affect garbage collection, but do the GS loaders hold on to loaded assets in any fashion? Is there anything I need to do to make sure GC works well? I see that there are references to unload() in LoaderCore, but how does one recursively unload everything? Thanks
  10. Multiple Loaders

    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
  11. Oops, silly mistake on my behalf was to blame for the crossed out stuff below. As ever GreenSock rocks. Hi, I seem to have the same problem as described here: http://forums.greensock.com/topic/3005-xmlloader-imageloader-problem/ I'm using the v latest version of loadermax. I can load flv but cannot seem to load png or jpg. No events are firing. Strangely, if I specify the wrong location for the png or jpg, LoaderMax complains loudly. Says nothing when these locations are correct. .cotent and rawContent return null. BTW, I googled for this problem and came up with the above site. When I entered it, it said I was logged in as someone else (Abdulah?). I changed my password immediately and it said 'welcome Andy' (the right name). Thanks, Andy.
  12. I would like like to replace a spirte's image. But before that, i want to check if the image exist in the directory or not. Is there a way to do it? newImage = new ImageLoader(dir + temChild.category + '/' + temChild.productUrl + '.png', { container : temChild, height : 80, width : 80, scaleMode : 'proportionalInside', onComplete : onColorImageLoad, centerRegistration : true, noCache: true, autoDispose : true });
  13. Load image into Sprite

    Hi, I try to load into an image into a sprite with this lines of code var loader:ImageLoader = new ImageLoader(url, {name:"picture", container:spr, scaleMode:"proportionalInside",onComplete:onImageLoad}); loader.load(); It's looks like that the image is getting inside the sprite ( only X and Y pos ) but all the properties like scalemode aren't working. also when I try to removeChildAt form my the sprite flash throw an error that say that the sprite have no children. what can I do? Thanks...
  14. 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
  15. 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})
  16. 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
  17. re-use an image

    I've done a search for this , but can't seem to find an easy solution Is is possible to use an ImageLoader image more than once? I am adding an imageLoader to the stage in multiple classes, but it only appears at the last instance: addChild(LoaderMax.getContent('fs_icon'));
  18. 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