A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: global LoaderContext

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    996

    global LoaderContext

    I have a setup where I'm loading files from another server and I wanted to setup a global contextLoader. Here is how I'm doing it.
    My Globals class is just a public class that has an object called param so I store the loaderContext in there.

    localMode just has a boolean value if you are testing from your desktop of from a server.

    So what I'm doing is checking if I'm on the server then store a global loaderContext.

    Actionscript Code:
    Globals.param.loaderContext = ( !localMode ) ? new LoaderContext(true, ApplicationDomain.currentDomain, SecurityDomain.currentDomain) : null;

    My question is can I do this. Have one contextLoader for all my load methods throughout my site or do I have to create a unique one for each load method. I don't see why I would have to do that but just wanted to make sure what I am doing is valid

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    Anyone ?

  3. #3
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    if the question is: "can i use the same LoaderContext instance for multiple load operations from different Loader objects", then yes

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    Perfect thats the answer I was looking for.

    Thanks

  5. #5
    ___________________
    Join Date
    May 2004
    Posts
    3,174

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center