Addeventlistenerbulkloader.error
ActionScript Lines 136 MD5 Hash 509a631f16bfc6379dfbf6cea547f97e Repository git://github.com/arthur-debert/BulkLoader.git View Raw File View Project SPDX Find Similar Files View File Tree 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135package br.com.stimuli.loading.tests { import br.com.stimuli.kisstest.TestCase import br.com.stimuli.loading.BulkLoader; import br.com.stimuli.loading.loadingtypes.*; import flash.events.*; import flash.media.Sound; /**@private*/ public class AudioContentTest extends TestCase { public var _bulkLoader : BulkLoader; public var lastProgress : Number = 0; public var sound : Sound; public var sound1 : Sound; public var ioError : Event; public function AudioContentTest(name : String) : void { super(name); this.name = name; } // Override the run method and begin the request for remote data public override function setUp():void { _bulkLoader = new BulkLoader(BulkLoader.getUniqueName()); var goodSoundURL : String = "http://www.emptywhite.com/bulkloader-assets/sound-short.mp3"; var badSoundURL : String = "http://www.emptywhite.com/bulkloader-assets/badchopin.mp3" var theURL : String = goodSoundURL; if (this.name.indexOf('testIOError') > -1){ theURL = badSoundURL; } var item : LoadingItem = _bulkLoader.add(theURL, {id:"the-sound"}); item.addEventListener(BulkLoader.OPEN, onAudioStartLoading); if (this.name != "testIOErrorOnBulkLoader"){ item.addEventListener(BulkLoader.ERROR, onIOError); }else{ _bulkLoader.addEventListener(BulkLoader.ERROR, onIOError); } //_bulkLoader.add("http://www.emptywhite.com/bulkloader-assets/movie.flv", {id:"the-movie", pausedAtStart:true}); _bulkLoader.start(); _bulkLoader.addEventListener(BulkLoader.COMPLETE, completeHandler); _bulkLoader.addEventListener(BulkLoader.PROGRESS
as a group and then fire off a notification when finished. The notification would carry the loaded assets as it's body. Has anything like this already been created? What's everyone using for bulk loading of assets? puremvc: I haven't seen one for BulkLoader. If you like that utility go for it. You might also want to check out the StartupManager utility: http://forums.puremvc.org/index.php?topic=259.0-=Cliff> Groady: I had already looked at StartupManager and to https://searchcode.com/codesearch/view/3518279/ be honest I don't think it's for me. Part of the reason I thought a BulkLoader proxy could be useful is that it is not necessarily limited to being a start up resource loader but could be called anytime while the app is running. For example, I'm currently creating a site which has several 10x10 social media http://forums.puremvc.org/index.php?topic=1292.0;wap2 icons which get loaded into the footer. I consider these non start up critical items so these get loaded AFTER the navigation and start up content has loaded.Also I like the idea of a single loading proxy which fires notifications into the system over something like StartupManager which requires creating several Proxy classes.I imagine the proxy would expose methods like:addGroupItem(groupName:String, itemPath:String, itemID:String);loadGroup(groupName:String, completeNotification:String, progressNotification, failedNotification);The proxy would handle the instantiation of BulkLoader instances and route it's events to the notifications in defined by the loadGroup method. puremvc: The StartupManager is actually a misnomer, and I think we probably need to change that for clarification. You can use it anytime, not just at startup. It's name is also conflict now with the StateMachine (since people often refer to both as 'SM').-=Cliff> stinkyian: Hi, I needed to write a BulkLoader proxy and found this post in an attempt to not reinvent the wheel ;)Anyway, it's written so I thought I'd post it here in case anyone's interested. Code:package tv.stinkdigital.puremvcba
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/14294701/my-loader-doesnt-calls-complete-event-in-actionscript-3 to any questions you might have Meta Discuss the workings https://gyandas.wordpress.com/category/open-source-in-flash-and-flex/bulkloader/ and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up My loader doesn't calls complete event in Actionscript 3 up vote 0 down vote favorite In my flash & actionscript app, Bulk-Loader doesn't dispatch complete event. My load elements: private var yukleyici:BulkLoader = new BulkLoader("yukleyicii"); yukleyici.add("mouse_simge.png", {id:"mouseSimge"}); yukleyici.add("para_ikon.png", {id:"paraikon"}); yukleyici.add("arkp_puan.png", {id:"arkpPuan"}); yukleyici.add("fav2.png", {id:"tecrube"}); yukleyici.add("muzik_arkaplan.mp3", {id:"muzik"}); yukleyici.add("logo.png", {id:"logoo"}); yukleyici.add(Facebook.getImageUrl(String(uidvar), "large"), {id:"profilfoto", type:BulkLoader.TYPE_IMAGE, context:context1}); yukleyici.addEventListener(BulkLoader.COMPLETE, completeHandler); yukleyici.start(); But this code doesn't fire up my completeHandler function. actionscript-3 event-handling bulkloader share|improve this question asked Jan 12 '13 at 15:17 Mehmet Emin Acar 6411 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted You should probably set an error handler too, to see what really happens, you're only hooking up the handler for successful loading. yukleyici.addEventListener(BulkLoader.ERROR, onAllError); share|improve this answer answered Jan 12 '13 at 15:25 Joachim Isaksson 115k11133169 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name
up and running in no time. All downloads and the svn trunk have the detailed AsDoc documentation (can also be viewed online ) A more detailed guide can be found at the goolecode wiki: AvailableOptions : all the options for specifing how BulkLoader should treat those items. HowToUseEvents : lists and explains what events are fired for each item individually or for all items as a group. AcessingLoadedContents : how to fetch and use your assets. ReportingLoadingProgress: explains different methods for displaying loading progress. UsingTypes : what content types are available and how to use them. MemoryManagement: how to remove items and free memory (coming soon). CustomizingLogging: BulkLoader has a flexible and plugabble logging feature. Getting Started A quick how to guide to getting started with BulkLoader_. Using BulkLoader is simple, the workflow is very close to how you'd handle any loading operation in As3. Create a BulkLoader instance add the url(s) to be loaded add event listeners for all items together or for individual items start the loading operation retrieving content Creating a BulkLoader instance: // creates a BulkLoader instance with a name of "main-site", that can be used to retrieve items without having a reference to this instance var loader : BulkLoader = new BulkLoader("main-site"); Add urls to load: // simplest case: loader.add("logo.png"); // use an "id" so the item can be retrieved later without a reference to the url loader.add("background.jpg", {id:"bg"}); // since the url by itself can't tell us what the filetype is, use the type property to let BulkLoader know what to do: loader.add("/some-web-services?size=Large", {type:"image"}); // add an item that should be loaded first (higher priority): loader.add("/data/config.xml", {priority:20}); // add a max tries number (defaults to 3) loader.add("/unreliable-web-services.xml", {maxTries:6}); // you can also use a URLRequest object , this will load from a POST request var postRequest : URLRequest = new URLRequest("/save-prefs.php"); postRequest.method