GithubHelp home page GithubHelp logo

assetmanager's People

Contributors

stevewoolcock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

assetmanager's Issues

Sometimes AssetQueue listener doesn't dispatch the 'complete' function.

It might be some bug, but sometimes AssetQueue just freezing and doesn't call the "Complete" function(but all files were completely loaded). And if i just restart my app AssetManager just working properly again. There are no errors in console... I'm loading a few ATF and PNG files. What it might be?

Code:

private function LoadAssets():void{
AssetMan = AssetManager.getInstance();
AssetMan.addEventListener(AssetEvent.QUEUE_START, onQueueStarted, false, 0, true);
AssetMan.addEventListener(AssetEvent.QUEUE_COMPLETE, onQueueComplete, false, 0, true);
// Add assets to load
for(var j:int = 0; j<CARDSDATA.card.length();j++){
AssetMan.add("base/" + dev_suffix + "/" + CARDSDATA.card[j].attribute("pic"));
}
AssetMan.add("base/" + dev_suffix + "/icons.png");
AssetMan.add("base/" + dev_suffix + "/ui.atf");
AssetMan.add("base/" + dev_suffix + "/mainback.atf");

function onQueueStarted(e:AssetEvent):void{Console.type("Queue started:" + e.target,Console.COMMENT_FLAG);}

function onQueueComplete(e:AssetEvent):void{
//FOLLOWING CODE DOESN"T CALLED SOMETIMES...WHY?
Console.type("---------------------------");
Console.type("Master asset queue complete");
Console.type("---------------------------");
AssetMan.removeEventListener(AssetEvent.QUEUE_COMPLETE, onQueueComplete);
}//END OF onQueueComplete
}

Whitespace in empty object declaration causes IDE errors.

I know this isn't strictly a problem with the code, but I noticed that for some reason Flash Builder 4.6 doesn't like the whitespace on line 364 of AssetQueue.as:

args ||= { };

Code thereafter is peppered with warnings and code-completion/type-checking doesn't work. I removed the space between the braces and all is well again. Odd I know, but other Flex devs may also experience this.

Remove unused assets

Nice manager! But how it can remove unused assets when they aren't already needed? Can't find that in doc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.