Scripting the loading bar without a UILoader...

So I was using a UILoader to load my swf, but was having issues with the component, so I got rid of it, and am now using the following AS to load the file instead:
var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
var loader:Loader=new Loader();
var defaultSWF:URLRequest=new URLRequest("CMO.swf");
loader.load(defaultSWF);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);
My problem however, is that before when I was using a UILoader component, I had some dynamic text and a little animation running while the clip loaded and I need to rescript it to work without the UILoader component.  The AS I had for that was worked into the UILoader instance name:
loadFile();
loadAnimation.stop();
function loadFile():void {
CMOLoader.load(new URLRequest("CMO.swf"));
CMOLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
CMOLoader.addEventListener(Event.COMPLETE, completeHandler);
function progressHandler(e:ProgressEvent):void {
prog_txt.visible=true;
var percent:int=CMOLoader.percentLoaded;
prog_txt.text=percent+"%";
function completeHandler(event:Event):void {
currentFrame+1;
prog_txt.visible=false;
loadAnimation.visible=false;
CMOLoader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
CMOLoader.removeEventListener(Event.COMPLETE, completeHandler);
So now I'm trying to figure out how to extract and rescript the animation (loadAnimation) and the text (prog_txt) to fit my new AS that loads the file now.
Thank you for any ideas!

oops.  that should be:
kglad wrote:
var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progressHandler );
var defaultSWF:URLRequest=new URLRequest("CMO.swf");
loader.load(defaultSWF);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);
CMOLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
function progressHandler(e:ProgressEvent):void {
prog_txt.visible=true;
var percent:int=Math.round(100*e.bytesLoaded/e.bytesTotal);
prog_txt.text=percent+"%";
function completeHandler(event:Event):void {
currentFrame+1;
prog_txt.visible=false;
loadAnimation.visible=false;
// remove the above listeners
CMOLoader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
CMOLoader.removeEventListener(Event.COMPLETE, completeHandler);

Similar Messages

  • How do I restore the "close tab" button to the END of the tab bar, WITHOUT USING AN ADDON

    Up until FF31, I used to have the following setting configured which moved the little 'X' button that closed tabs off of the tabs themselvs and onto the far right of the tab bar.
    browser.tabs.closeButtons; User Set; Integer; 3
    No, this no longer works. It has still moved the close buttons back to the tab buttons. Until I can figure out how to fix this, I will be moving back to a previous version. I can't for the life of me see why this feature was removed, other than Mozilla's seemingly arrogant insistence that it knows what people want better than they do.
    I was since told by someone that I can use an addon to fix it, yet the problem is THEY DO NOT WORK. The addons that supposedly solve this all have intermittent failures where they don't load correctly, leave random dead tabs open, and in one case it even seemed to open new tabs when I tried to close one.
    It's absolutely inexcusable that the dev team is so arrogant to take away a feature that has fundamentally no impact on the rest of the browser, other than, as I said before, they THINK they know what we want better than we do. It's no small wonder that FF is losing market share. The only thing keeping me on board was really this function, as I prefer this layout, and if it's gone, I see no reason to stick with FF over others.

    unfortunately it is not possible to restore the close button to have only one (customizable) close button on the Tab bar without using an extension.
    The extension is necessary because you need to create a new toolbar button and bind the proper code to it to make the button act as a tab close button (command: BrowserCloseTabOrWindow()).
    *tabs closebutton restored: https://addons.mozilla.org/firefox/addon/tabs-closebutton-restored/
    * http://cat-in-136.blogspot.co.uk/2014/05/note-do-same-without.html

  • My phone is stuck on the loading bar

    my torch 9810 is stuck on the loading bar i have tried the safe mode and it didnt work and i wanted to know if there is any other thing i can do..........its been 2 days without my phone and its hell.......i need all my contacts someone help me plz

    Hi and Welcome to the Community!
    I cannot tell, from "it didnt work", what exactly happened. Did it not get into Safe Mode? Did it get into Safe Mode but you couldn't do anything about the situation? Something else? How many times did you try to get into Safe Mode? How long did you wait before deciding that the loading bar is indeed stuck?
    So, all I can recommend is that you continue to attempt to boot into Safe Mode:
    KB17877 How to start a BlackBerry smartphone in Safe Mode
    It may take you multiple attempts to get the ESC key sequence (press/release/hold) correct, so be patient. When successfully into Safe Mode, see what happens.
    If the behavior ceases, then think carefully...what happened just before this behavior started? A new app? An update? A Theme? Something else? Think carefully as the smallest change could be causal...and attempt to undo whatever that was.
    But if the behavior continues in Safe Mode or you cannot get into Safe Mode, then you may need to consider more drastic actions -- WIPE, OS Reload, BBSAK Wipe/Reload, and the "Bare Bones" OS Reload Process. To prepare, you should be sure that you have a full backup to your PC...please review the Backup link in my auto-sig on this post for instructions. If, as you hint, you have no backup, then you likely have already lost that data...backups, like insurance, are neither a reactive nor an optional activity.
    You may also need the use of these tricks:
    KB10144 How to force the detection of the BlackBerry smartphone using Application Loader
    KB27956 How to recover a BlackBerry smartphone from any state
    http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • The loading bar at the bottom of my browser has disappeared and I want to reinstall or reactivate it. How do I do this please and what is this bar called? I use the lastest version of Firefox 3.6.3 and Windows XP.

    The loading bar at the bottom of my Firefox browser has suddenly disappeared and I want to reinstall or reactivate it. How do I do this please and what is this bar called? I use the latest version of Firefox 3.6.3 and Windows XP. I have many add ons and I usually automatically install the recommended updates. This problem has never happened before and switching my browser on and off again does not solve the issue.
    == This happened ==
    Every time Firefox opened
    == I am not sure why this suddenly happened. I think it may have been after my usual updates but I am not sure if that has anything to do with it at all.

    Loading Bar? Maybe the URL/address bar where you type sites you want to go to (like www.google.com)? See Navigation Bar below. You may also need to see the first item "Can't see the Menu Bar".
    <u>'''Can't see the Menu Bar'''</u> (File, Edit, View, History, Bookmarks, Tools, Help)?
    Turning the Menu Bar on and off is a new feature in version 3.6.
    ''(Linux & OSX see: [[Menu bar is missing]] )''
    <u>''Windows'' Method 1.</u> '''''Hold down''''' the key and press the following letters in this exact order: V T M
    <u>''Windows'' Method 2.</u> Press and release the key. The Menu Bar will be displayed; then choose ~~red:V~~iew > ~~red:T~~oolbars and click on ~~red:M~~enu Bar.
    The Menu Bar should now be displayed permanently, unless you turn it off again using View > Toolbars. Check mark = displayed, NO check mark = not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
    <u>'''Navigation Toolbar, Bookmarks Toolbar and other Toolbars'''</u> under View > Toolbars. Clicking on one of them will place a check mark (display) or remove the check mark (not displayed).
    <u>'''To display the Status Bar'''</u>, View, then click Status bar to place a check mark (display) or remove the check mark (not displayed).
    <u>'''Full Screen mode'''</u>
    http://kb.mozillazine.org/Netbooks#Full_screen
    Also see:
    ''' [[Back and forward or other toolbar buttons are missing]]'''
    '''[[Navigation Toolbar items]]'''
    You can un-install the Mozilla ActiveX control as Firefox no longer uses it and hasn't since, as I recall, version 2. See: [[ActiveX]]
    To remove Tools > Add-ons > Extensions, click on the item, click Uninstall, click Restart Firefox in the Extensions window.
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Install/Update Adobe Flash Player for Firefox (aka Shockwave Flash)'''</u>: your ver. 10.0 r45; current ver. 10.1 r53 ('''important security update 2010-06-10''')
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer.
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • I've updated and restored my ipod touch. But when i turn it on, it stays frozen on the screen with the apple icon and the loading bar.  How do i fix it?

    I went to update my ipod touch and it said it may take an hour. so i left it plugged in over night. in the morning the ipod was frozen. it had the apple logo and the loading bar. i reset the ipod and it stays at the same screen. i just restored it, reset it again, and restart my computer, but everytime it turns on it stays on that screen with the logo and loading bar. how do i fix it?

    Were all the apps bought under the same Apple ID? For example if a husband and wife share the same computer but have different apple ID's what he buys won't play on her iPad and vice versa. However if they shared the same Apple id for both devices then any compatible apps would transfer and work on both.

  • Todays update! After todays update I can no longer send Safari or Spotify to the task bar without it cutting out (dropping audio in and out). Streams normally if I keep the window open on my desktop. This needs to be fixed immediately.

    Todays update! After todays update I can no longer send Safari or Spotify to the task bar without it cutting out (dropping audio in and out). Streams normally if I keep the window open on my desktop. This needs to be fixed immediately.

    Nevermind. I figured it out.

  • I reinstalled iPhoto on my MacBook Pro. It opens, but only shows the loading bars and does not allow me to add pictures. How can I fix this?

    I reinstalled iPhoto on my MacBook Pro. It opens, but only shows the loading bars and does not allow me to add pictures. How can I fix this?

    Mac 101: File Sharing
    Mac OS X 10.7 Help: Transfer files between two Mac computers
    Mac OS X 10.7 Help: Set up a Windows computer to share files with Mac users
    Mac OS X 10.7 Help: Use iDisk to share files
    Mac OS X: Sharing your files with non-Apple computers
    How to share a Mac's files with a PC and vice versa.

  • My iMessages freezes when it gets through about 90% of the loading bar. Then the message doesn't send at all. My iPod's only about 2 week old, what's wrong and how can I fix it?

    My iMessages freezes when it gets through about 90% of the loading bar. Then the message doesn't send at all. My iPod's only about 2 week old, what's wrong and how can I fix it?

    Maybe:
    iOS: Troubleshooting Messages

  • Every time i sync in my music in my iphone 5 it would have to back up my iphone and every time i back up the loading bar would freeze then my itunes with crash pls help my iphone 5 coat a lot from my savings

    every time i sync in my music in my iphone 5 it would have to back up my iphone and every time i back up the loading bar would freeze then my itunes with crash pls help my iphone 5 cost a lot from my savings

    Syncing requires a backup as part of the sync process.
    Delete any existing backups in iTunes under Edit > Preferences > Devices (or simply move them to a different folder on the computer) then try a backup or sync.

  • On start up my mac book pro shows a white screen with a folder with a ? in it then switches to the apple symbol with the loading bar under it but it freezes about half way any ideas

    My mac book pro on start up shows a white screen with a folder with a question mark in it then switches to the apple symbol with the loading bar under it but it freezes about half way. Only started to have problems since upgrading to yosemite any ideas.

    I do hope you have recent backup, because it look like your hard disk is failing. You can start up in Recovery Mode, and run Disk Utility to see if the disk can be fixed:  OS X: About OS X Recovery - Apple Support

  • When starting up, Apple logo is present with loading bar underneath. No spinning wheel. After aprox 1 min the loading bar stops half way

    When starting up, Apple logo is present with loading bar underneath. No spinning wheel. After aprox 1 min the loading bar stops half way and shuts down completely. Any advice appreciated.

    Which model MacBook Pro do you have (e.g., "15-inch Late 2011") and which version of OS X are you running?
    You may want to try resetting your SMC -> Intel-based Macs: Resetting the System Management Controller (SMC).
    If no joy there, call back with th requested information.
    Clinton
    MacBook Pro (15-inch Late 2011), OS Mavericks 10.9.4, 16GB RAM, 960GB SSD, 27” Apple Thunderbolt Display

  • I'm trying to update my iPhone 4s to iOS 7.1.2 and it just froze on the screen with the apple and the loading bar, it won't move and it's been like 45 minutes PLEASE HELP!

    I'm trying to update my iPhone 4s to iOS 7.1.2 and it just froze on the screen with the apple and the loading bar, it won't move and it's been like 45 minutes PLEASE HELP!

    iOS updates can take a while, try back in an hour or so. My iPad took half an hour for an incremental update. And that was on a fast home WiFi.

  • I am running Mac OS X Lion 10.7.5 when I try to go to some sites(amazon,best buy, )to make a purchase the page seems to freeze.the loading bar goes so far and stops.whats up with that?

    my mmcbook sometimes freezes up it seems when I am trying to shop on the internet.the page will half load then nothing happens.I have wated for 15 min or more and still the load bar is approxamently half way or so ?

    Hello,
    It isn't the fw in Network you want o use or look at, that's for something completely different.
    My first suspect is the Power Adapter on the LaCie has gone.
    At the Apple Icon at top left>About this Mac, then click on More Info, then click on Hardware>Firewire, what is listed there?
    Reset the Firewire bus
    If your Firewire or USB isn't recognizing any device.  A solution which has worked for some whose hard drive became invisible in 10.4 was simply to follow these four steps to reset the Firewire/USB bus:
    1. Shut the machine down.
    2. UNPLUG the power lead to the computer and any firewire/USB drive or devices.
    3. leave it for 10 minutes.
    4. Connect back up and reboot.
    http://www.macmaps.com/firewirebug2.html

  • I was updating my phone to iOs 6 and an error occured on my computer. My phone has been frozen on the apple logo with the loading bar right below it. I cannot restart my phone because my power button doesn't work. HELP!!

    After the error occured, my phone was stuck on the apple logo with the loading bar below it. I cannot restart it because my power button is broken, and it will not be recognized on my iTunes. Any help how i can get my phone off or back to working again?! HELP PLEASE!!!

    Looks like a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is required...
    Be sure to make an appointment first...

  • Adobe story online isn't loading. I just get the loading bar going on for hours. I've restarted my browser, deleted my cookies, installed the newer version of Flash and still no loading.

    Adobe story online isn't loading. I just get the loading bar going on for hours. I've restarted my browser, deleted my cookies, installed the newer version of Flash and still no loading.

    Nope still nothing going incognito, or doing it through different browsers. I guess the other thing is a an online picture editing program told me I needed to update my flash, so I tried to install it several time but am not sure if it actually did. Now some video players (that had previously worked) command me that I need a newer version of Flash. What happened?

Maybe you are looking for