Using the vanilla/default preloader to load additional assets?

I have a Flex application that automatically loads the SWF and it's contents and displays the default progress bar like in all Flex apps. Currently I have a class in the application using a Loader instance to load a few external bitmaps to be added to the stage/canvas as well as an MP3. I'd like to handle the loading of these assets in the Flex default preloader and get rid of the Loader instance entirely.
How can I do this?

At least for the images, and perhaps for the sound, you need to not use loader, and instead embed the assets, because if loader is used the assets load at the same time as the SWF, which is too late.
So in the createChildren method you override when you override DownloadProgressBar:
//global var
[Embed("Logo1.png")]
[Bindable] public var logoCls:Class;
private var logoDO:DisplayObject;
// in createChildren() method
logoDO = new logoCls();
logoDO.x = (stageWidth/2)-(borderRect.width/2)+_logoX;
logoDO.y = (stageHeight/2)-(borderRect.height/2)+_logoY;
addChild(logoDO);
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex / AIR Development, Training, and Support Services

Similar Messages

  • Can Firefox be set to use the system default printer?

    I would really like it of Firefox would use the system default printer set in the control panel, similar to the way office programs do. Is there no setting in about:config to do this? Or an add-on perhaps?

    I really, really wish Firefox would change this, but I did find one thing.
    In about:config I set:
    print.print_printer to null
    print.save_print_settings to false
    Now it seems to use the system default. And it doesn't remember any changes with in a session, or from one session to the next. It always uses the system default printer.
    I realize different people have different preferences. But on my system the default printer changes automatically depending on what wireless network I'm on at the moment. I wanted Firefox to reflect that.

  • Can I use the source adapter 10W to load the ipod touch 4 generation? The same used to Ipad.

    Can I use the 10W power adapter to load the ipod touch 4 generation? The same used to Ipad?

    Yes.

  • Order Import failing with error "The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory."

    Hi All,
    I am getting this error while importing an internal sales order.
    “The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory.”
    I have tried to set mentioned profile as ‘Yes’. But still getting same error.
    Also, provided subinventory is present and active in given inventory organization.
    Please share if anybody encountered this before and have a solution.

    Hi 2878342
    Please refer the following metalink note, it should resolve your problem.
    Order Import Interface.Error Message Specified Subinventory Is Invalid To Use (Doc ID 406411.1)

  • How do I use the location bar to automatically load the top google hit?

    I recently re-installed Firefox 3.6.12 and created a new profile because my old one was malfunctioning. Before, when I typed something in the location bar (say "nyt") it would automatically load the first Google hit (so I didn't have to type "nytimes.com"). Now, it simply performs a Google search without loading the first page hit. I loved being able to save time this way. How do I restore this feature?

    I had this problem in FF4 and found the answer here: http://support.mozilla.com/en-US/questions/756711#answer-
    To quote TonyE:
    Current release versions of Firefox by default use the Google "browse by name" search option for the location bar, but Firefox 4 beta 6 no longer uses this. You can restore it by changing a hidden preference. In Firefox 4 beta 6 it should have defaulted to a Google search rather than what you got.
    Type about:config into the location bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    In the filter box type keyword
    Double-click on the preference keyword.URL and change it to the one shown below
    http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

  • Does using the Embed in Flash CS4 load all Embed content first?

    I'm using the Embed in a Flash CS4 AS3 game.  the code looks like this:
    [Embed(source="stuff.swf", symbol="a_mc")]
    This is great, cause I can load large sounds and swf files at runtime and not have to sit there and wait for the swf to compile while developing and testing.  But I've noticed that my swf loads all these embed files on the first frame, and loads them first so the user doesn't see my preloader until almost everything is loaded. 
    I have to have all my assets, including the preloader, in one swf.  Most game sites want everything in one swf. 
    Is there a way to force the embedded content to load in a later frame?
    Thanks!

    PS
    It doesn't even load the stage color, the swf sit there all white until all the embedded content is loaded, then it shows the stage color.  This is not desirable behavior.

  • Using the OSPF default-information originate command with two ISPs

    I am working for a company that has two Internet circuits with different ISPs at two different locations for redundancy, and both Internet circuits run at different speeds. I'd like to be able to direct the majority (but not all) of the traffic through the ISP with the larger bandwith, but then failover all traffic to one ISP when the other goes down. We're currently using the "default-information originate" command, which fails over OK, but I haven't figured out how to do the load balancing. I'd appreciate your thoughts. Thank you.

    One thing that you could consider is advertising the default route as and
    external 1 route instead of an external 2 route(cisco default). If you advertise it as an E1
    route, all routers will take into consideration the cost associated with the
    default route to the router advertising the default route plus the cost of the
    default route itself. Whereas if it is an E2 route, the routers just use the
    cost associated with the external cost and not the path to get to the router
    advertising the default route.
    If you made the default route E1, then the routers closest to the advertised
    routers will prefer the closest default route and their preference could then be
    tweaked by adjusting the interface costs for the default route with a routemap.
    By using this method, you could then control which routers use which internet
    connection on a per router basis because you could control the cost the internal router
    sees for the path from the internal router to the ASBR advertising the default route. The
    path with the lowest cost will be prefered.
    router ospf 1
    default-information originate metric-type 1

  • Using the DateField in an Externally loaded SWF

    Hello,
    I have been having major trouble trying to get a basic PHP
    contact form to work within an externally loaded SWF file inside of
    a parent SWF. When I test the movie on its own it seems to work
    fine (example: I'm able to select a date from the DateField
    component). However, when I open up the parent SWF file and call
    the external SWF file with the form the DateField is basically
    unusable (example: when you click on it nothing happens, no
    calendar pops up to select a date).
    I have no ActionScript on it yet, simply because I figure I
    need it to work before I tell it what to do with the PHP file. The
    instance name on the DateField is "theDate". Any help is very much
    appreciated. Thank you.
    Also, I have just successfully used the contact form on the
    web. But, the only user interface components I am able to edit are
    the input text boxes, not the DateField or the ComboBox I have in
    it as well. This is very odd, I was not aware that anything special
    had to be done using these UI components within an external file.
    Elijah

    Hello 2m,
    Maybe if you were to see it, it may help you out a bit. If
    you
    click
    here for the external file you will see that the components are
    working. However, if you
    click
    here for the parent file and then click on "Meetings" on the
    top menu you will see that they do not work at all. However, if
    someone were to hit the "send" button, the PHP code would actually
    interact with the form. Let me know if that helps at all. Thanks
    again for replying.
    Elijah

  • How can I use the database default time rather than Java supplied time

    I've searched over and over and nobody seems to have this issue so maybe its just me!
    When inserting a record I would like the a create_date column to automatically use the database time rather than a supplied time via JPA. That was all times a relative to the database which makes sense.
    The trouble is I cant figure out how to do this in a sensible manor.
    If I specify an column like :
         @Temporal(TemporalType.TIMESTAMP)
         @Column(name = "CREATE_DATE")
         private Date createDate;
    and IDL
    CREATE_DATE TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_DATE NOT NULL
    If I leave createDate null I get an exception. If modify the column to allow Nullable then column is set as Null.
    If I leave the column out of the entity bean and then and create a row then the database current time is inserted. The trouble then is that if I want to read the date I'm going to have to create a copy of the bean but with the CREATE_DATE in it, and this doesn't make sense.

    I should also mention that TopLink has always supported the ability to retrieve the current time from the database for use in optimistic locking. The TimestampLockingPolicy offers the ability to configure the next value being retrieved from the database instead of using the local time from the JVM. Our extended optimistic locking configuration does not currently support setting this option but it could be done using a descriptor customizer which can be configured in your persistence unit properties.
    Using optimistic locking may be a good solution for the last modified date since it will also ensure that you do not corrupt the database if someone else has incremented this value since your last read.
    Doug

  • How to use the Observer when a page loads

    Anybody know how to use the
    Spry.Utils.addClassName('DivName','selected') and then fire the
    Spry.Utils.addClassName with onLoad?
    I am loading a page with the selector utils in it into a div
    and then I think I must need an Observer to get the
    Spry.Utils.addClassName to work when this page loads in a div.
    Any help would be greatly appreciated.
    Thank you,
    Bisser.

    I added Spry.Utils.addClassName('DivName','selected') in the
    Script after the constructor and after the effects and it works
    fine. Thank you for your help to get me going.
    Well after the fact, this solution was a problem because it
    loads the selector each time I loaded the file.
    kinblas had the correct answer that I was looking for.... as
    it loads the selector as a 3rd argument.
    ie:
    Spry.Utils.updateContent('mainDIV','/menu.php', function() {
    Spry.Utils.addClassName('DivName','selected'); });
    Thanks to both of you for your continued support.
    Bisser.

  • Can Lightroom3 use the Lightroom 4 RAW file loader?

    For those who can't run Windows 7, who bought a new camera and wrongly assumed that support for that camera wouldn't require an upgrade of LIghtroom AND an upgrade of the operating system (and RAM and graphics card and ...) is there a way to use the LR4 RAW loader in LR3 ?
    And no, the thought of adding another workflow step by going through DNG does not appeal in any way.

    Both, the graphics hardware wasn't up to it and there are hardware components there aren't drivers for - and it can't be upgraded.
    Seems the computer is well past its sell by date.
    Every system at work I try the MUA tells me it can't be upgraded and needs a fresh install, even the HP XW series workstations.
    But my own computers seem to be too old and bandy-kneed to run Windows 7 at all.
    I guess the pace of change in laptop hardware has been faster than I thought.
    Now, if I could use work's computer that'd be a temporary solution until I have a budget.
    But it's in Belgium via remote desktop from the UK

  • I'm using the portable ver of Firefox, loaded onto my thumb drive. What is the lastest ver of it? Is the mobile ver the same?

    When I started up Firefox Portable on my system from my thumb drive, I got a notice to update the software to a more current version. The software referenced was Firefox, not Firefox Portable. I'm wondering if there is a newer version of the Portable software, or if I can continue to use the one I have.

    Go to the portableapps.com site for Firefox Portable information and updates
    *http://portableapps.com/apps/internet/firefox_portable
    *Support forum for Firefox Portable: http://portableapps.com/forums/support/firefox_portable
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Can I use the same inport profile to load multiple dimemsions?

    Hi,
    I am trying to create an Import Profile that will allow me to load multiple ADS files, at seperate occasions, and thereby create or update different dimenssions. I have created multiple Import Profiles,
    1.I have ticked both the Options : Create dimensions for all non-mapped dimensions...and Select All - merge as shared.
    2. Only - Create dimensions for all non-mapped dimensions
    3 Only - Select All - merge as shared.
    Neither seem to work.
    Any advice would be greatly appreacited.
    Thanks,
    Charlie

    Since the laptops are the same model-yes, you can use your Recovery Discs on both.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • How to safely remove version of firefox that uses the system default locale?

    I have Firefox with Greek locale due to my location.
    I want to use Firefox in English, so I downloaded the English version and installed (in another HDD).
    I've already set it as a default browser, and thus, clicking at the firefox quick launch icon opens the english locale version.
    Now I would like to clean my system, simply removing the greek locale version (located at C HDD) but without losing any data/extensions/etc.
    How can I do that?
    Thank you for your time.

    Installing the English (en-US or en-GB) version over the top of the Greek version would have been easier as that would have been replaced the Greek language pack (located in the omni.ja archive).
    You can check the general.useragent.locale pref on the <b>about:config</b> page to make sure that it is set to the correct en-US (or en-GB) locale
    If you have the Greek version listed in Control Panel > Programs then you can uninstall this version here.<br />
    Make sure that you aren't removing your personal data when uninstalling as this will remove all Firefox profile folders.

  • Map issue using the old/default std

    Please, help with the following simple compilation
    // print_routines.cpp
    #include <map>
    #include <string>
    int main()
    std::map<const std::string, bool> fred;
    return 0;
    -bash-3.00$ CC print_routines.cpp
    "/opt/SUNWspro/prod/include/CC/Cstd/./map", line 251: Error: Multiple declaration for std::map<const std::string, bool, std::less<const std::string>, std::allocator<std::pair<const std::string, bool>>>::insert(const std::pair<const std::string, bool>&).
    "print_routines.cpp", line 6: Where: While specializing "std::map<const std::string, bool, std::less<const std::string>, std::allocator<std::pair<const std::string, bool>>>".
    "print_routines.cpp", line 6: Where: Specialized in non-template code.
    1 Error(s) detected.
    Thank you very much.
    stephen

    Your problem is discussed in the Library Compatibility section of the Sun C++ FAQ:
    http://developers.sun.com/sunstudio/documentation/ss11/mr/READMEs/c++_faq.html#LibComp                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for