Progress bar question

i am loading a .jpg into a holder movie clip. easy enough.
but i want a progress bar that will show the progress then go away
when it is complete. im trying to use an if statement to get it to
disappear, but i dont know what i should put in the if part. here
is my code...
one.addEventListener(MouseEvent.MOUSE_DOWN,
mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
var pictLdr:Loader = new Loader();
var pictURL:String = "images/1.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
holder.addChild(pictLdr);
//loading bar
var dataPath:String = "images/1.jpg";
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest(dataPath));
var pb:ProgressBar = new ProgressBar();
pb.source = loader;
addChild(pb);
pb.x = 100
pb.y = 200
if (??????? == ????) {
removeChild(pb);
any suggestions????

well i figured it out....so ill answer my own question in
case it can help someone else. i didnt use an if statement...i used
a function statement instead. heres what it looks like...
one.addEventListener(MouseEvent.MOUSE_DOWN,
mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
var pictLdr:Loader = new Loader();
var pictURL:String = "images/1.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
holder.addChild(pictLdr);
//loading bar
var dataPath:String = "images/1.jpg";
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest(dataPath));
var pb:ProgressBar = new ProgressBar();
pb.source = loader;
addChild(pb);
pb.x = 100
pb.y = 200
//remove bar
pb.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void {
pb.removeEventListener(Event.COMPLETE, completeHandler);
removeChild(pb);
hope that can help someone

Similar Messages

  • Question about plugging in an ajax progress bar component onto a black-box.

    Hello,
    I have the following problem: I want to integrate an ajax progress bar component to a j2ee application and I am in reference to the following pattern (https://bpcatalog.dev.java.net/nonav/ajax/progress-bar/design.html). It seems I need for the "task" component to return the percent. The problem I have is that I am calling a legacy method (i.e. as400) that does not return a percent as it is to me only a black-box. Here is a snippet of what it looks like to me:
          AS400 sys = new AS400("AS400D.calyonfinancial.com");
           sys.setUserId("jmartin");
           sys.setPassword("jmartin");
           CommandCall cmd = new CommandCall(sys);
           cmd.run("my as400 command goes here");
           AS400Message[] messageList = cmd.getMessageList();
           for (AS400Message msg : messageList) {
               System.out.println(msg.getText());      
           sys.disconnectService(AS400.COMMAND);At best I can know whether or not it is completed.
    void actionCompleted(ActionCompletedEvent event) //Invoked when an action has completed.What do you advise I do bearing in mind I want to avoid using an indeterminate progress bar??
    Thanks in advance,
    Julien Martin.

    That's not a legacy method. The latest version of JTOpen was issued less than a month ago. And note that it's open-source, so you could change it yourself to provide percent-complete data. (Of course you'd have to be able to get that data from the underlying iSeries command.)
    It wouldn't be easy, but if you think about it for a minute you'll realize that you can't display percentage complete in a progress bar unless you have some way of finding out what percentage the task has actually completed.

  • Animated Progress Bar issues

    I am working with the animated progress bar from the late Carl Backstrom's demo applicaiton but to my amazement, the bar refuses to animate unless the javascript is triggered from a button press. This is not really acceptable for my purposes as I need to have it fire and work though an onLoad on the body attributes. Any Sugestions? I know some people are going to probably say ExtJS and JQuery but our development rules here will not allow us include either of these libraries at this time.

    It is actually an intermediate page with a PL/SQL process that runs on submit to cache database information from a remote db. I actually have a button on another page that routes into the page in question so that I can clear everything in the background to prevent people from being able to go to another page while loading process is under way. The way I have it setup now is you click a button to start a multistage process and you are taken to a loading page which basically takes away other links on the page and gives you a blank page with the progress bar. Once loading is finished, it branches the person to the next step.

  • HT1923 iTunes on my Windows Vista has failed to update over several weeks. Attempting uninstal/reinstall according to iTunes support page. Will not uninstall 'Apple Mobile Device Support' - goes to 99% then progress bar unwinds completely. Tried rebooting

    iTunes on my Windows Vista has failed to update over several weeks. Audio will not play out. Attempting uninstal/reinstall according to iTunes support page. Will not uninstall 'Apple Mobile Device Support' - goes to 99% then progress bar unwinds completely. Tried rebooting. Any clues??

    Hey petanque1,
    Thanks for the question. I understand that you are experiencing issues installing iTunes for Windows. The following article outlines the error message you are receiving and a potential resolution:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Some Windows customers may experience installation issues while trying to install or open iTunes 11.1.4.
    Symptoms may include:
    "The program can't start because MSVCR80.dll is missing from your computer"
    "iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
    "Runtime Error: R6034 - An application has made an attempt to load the C runtime library incorrectly"
    "Entry point not found: videoTracks@QTMovie@@QBE?AV?$Vector@V?$RefPtr@VQTTrack@@@***@@$0A@VCrashOnOverf low@@***@@XZ could not be located in the dynamic link library C:\Program Files(x86)\Common Files\Apple\Apple Application Support\WebKit.dll”
    Resolution
    Follow these steps to resolve the issue:
    Check for .dll files
    1. Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    2. If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    3. Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    1. Uninstall iTunes and all of its related components.
    2. Reboot your computer. If you can't uninstall a piece of Apple software, try using theMicrosoft Program Install and Uninstall Utility.
    3. Re-download and reinstall iTunes 11.1.4.
    Thanks,
    Matt M.

  • MacBook Pro frozen on startup screen with progress bar and then it turns off

    Hello, I have a MacBook Pro 15" of early 2012 with a i5 Intel, 4GB of RAM  and a  500 GB HD.
    I was installing the new suit of Adobe, when suddenly my Mac got frozen, vertical coloured lines appeared and the image on screen went distorted. I had to reboot the Mac by holding the power button until the screen turned off and when I turned it on, the lines appeared again and it itself automatically rebooted. Then the screen (now with no vertical lines) got frozen on the startup grey screen with the apple logo and the spinning wheel for hours with no response.
    I tried to follow the steps of the official mac forums like verifying the HD with CMD+R and then Disk Utility, it says everything's fine; the same happens with CMD+S, no errors. I reinstalled Mavericks with the same CMD+R. I already reset the PRAM, SMC  and performed a Safe Boot staring up in Single user mode and Verbose Mode and nothing, the same startup screen. I made too thins thing of holding shift until the progress bar appeared.  Three days later (Today) I repeated the steps again and finally the verbose mode. Now, when I turn it on, the startup screen appears again (Apple Log and spinning wheel) with a progress bar. When it completes, the Mac turn itself off.
    if you can help me, please. I don't know what else to do. The last thing is technical service.

    Hi again ggt15,
    You can find some more information about the Recovery Partition of your hard drive here:
    OS X: About OS X Recovery
    http://support.apple.com/kb/HT4718
    It sounds like you might be trying to reinstall your copy of the operating system. If that's the case, you may also find some helpful information here:
    OS X Lion: Reinstall Mac OS X
    http://support.apple.com/kb/PH3878
    Thank you for using the Apple Support Community. Due to the nature of your issue or question you may find more information by using another one of Apple's support resources - https://expresslane.apple.com/GetproductgroupList.action.
    Cheers,
    Braden

  • Opening macbook pro from sleep after some hours, login screen is blurry with progress bar?

    I just got my first 13'' MBP three days ago.  Both last night and the night before I closed the lid to put it to sleep overnight for about 7 hours whilst plugged into the AC as to not drain unnecessary power. In the morning when I opened the lid it was on the login page but the screen was blurry and there was a progress bar on the bottom of the screen. My sister has had a MBP for a few months but this has never happened to her. The problem only lasted about 30 seconds but is it normal? Am I maybe doing something wrong?

    Did you quit out all of your applications prior to letting the MBP sleep over night? 
    If concerned, you can either call AppleCare or return the MBP.  You have 14 days from the date of purchase to return and/or exchange w/no questions asked. 

  • HT4623 My iPhone 4 has become unresponsive during the update. It's showing a progress bar and has not moved for over half an hour can anyone help ?

    My iPhone 4 has become unresponsive during the latest update I have a progress bar about half way through the update and it hasn't moved for about an hour can anyone help???

    Hey Ali.M27,
    Thanks for the question. I understand you are experiencing issues with your iPhone during an iOS update. If your issues persist, you may need to restore your device in recovery mode:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • [JS] CS3 ScriptUI - Progress Bar

    Hi
    I know I am late to the game with ScriptUI in CS3, but I would like to use a progress bar with some of my longer scripts. 
    I have read through the relevant part of the scripting guide, but cannot seem to make things work, the guide seems to reference a script that is not in the file.
    Can anyone offer some simple guidance on what I need to do, or point me in the direction of a script that uses this feature that I can pull apart and use?
    Thanks in advance,
    Roy Marshall

    Hi Roy,
    I just looked at my archives of the old forums, and it looks like you asked the same question almost two years ago...
    Here's a quote of xbytor's response from back then:
    Here's my contribution to this thread. This function creates and returns a
    Progress Palette. You specify the window's title, the max/min for the progress
    bar, and whether or not you want to use a Cancel button. If you decided to have
    a Cancel button, you should also specify an 'onCancel' on the Palette.
    Code:
    // createProgressWindow
    //   title     the window title
    //   min       the minimum value for the progress bar
    //   max       the maximum value for the progress bar
    //   parent    the parent ScriptUI window (opt)
    //   useCancel flag for having a Cancel button (opt)
    //   onCancel  This method will be called when the Cancel button is pressed.
    //             This method should return 'true' to close the progress window
    function createProgressWindow(title, min, max, parent, useCancel) {
       var win = new Window('palette', title);
       win.bar = win.add('progressbar', undefined, min, max);
       win.bar.preferredSize = [300, 20];
       win.parent = undefined;
       if (parent) {
         if (parent instanceof Window) {
           win.parent = parent;
         } else if (useCancel == undefined) {
           useCancel = parent;
       if (useCancel) {
         win.cancel = win.add('button', undefined, 'Cancel');
         win.cancel.onClick = function() {
           try {
             if (win.onCancel) {
               var rc = win.onCancel();
               if (rc || rc == undefined) {
                 win.close();
             } else {
               win.close();
           } catch (e) {
             alert(e);
       win.updateProgress = function(val) {
         var win = this;
         win.bar.value = val;
         // recenter the progressWindow if desired
         // win.center(win.parent);
         win.show();
         win.hide();
         win.show();
       win.center(win.parent);
       return win;
    And here's an example of how it would be used. In this example, we are
    processing an array of files. We call a 'processFile' method for each file in
    the array.
    We also add an 'isDone' property to the Palette, which we set to 'true' in an
    'onCancel' method. This makes it possible for the user to terminate the file
    processing loop before all of the files have been processed.
    Sample Code (in some function):
       // we have to process an array of 'files'
       var progressWindow = createProgressWindow("Progress...",
                                                 0, files.length, true);
       progressWindow.isDone = false;
       progressWindow.onCancel = function() {
         this.isDone = true;
         return true;  // return 'true' to close the window
       try {
         for (var i = 0; i < files.length; i++) {
           // check to see if the user pressed the 'Cancel' button...
           if (progressWindow.isDone) {
             break;
           progressWindow.text = ("Processing file " + (i+1) + " of " + files.length
    + "...");
           progressWindow.updateProgress(i);
            // now process the next file
            processFile(files[i]);
       } catch (e) {
         alert(e);
       } finally {
         progressWindow.close();
    I've tested this in PSCS2 and PSCS3. It should work without change in IDCS3.
    -X
    -- for photoshop scripting solutions of all sorts contact: [email protected]

  • Progress Bar for Web -- cr version 13.0.7.1136

    Hello All..
    The report is taking few seconds to display output.,So, i want to show progress bar while loading!!
    I've found couple of threads answering this question here but those seems to be old and i could not understand where those are being pointed.The below thread result redirects to welcome page where i could not find anything!!
    how to show progress bar while loading report ? 
    please suggest!!

    I did Don... found this !! but could not see any downloadable sdk guide there!!
    SAML Response from SAP ID Service     
    anyways., I've downloaded sap crystal reports .NET sdk developer guide.. there i saw 'Report Processing Indicator'.followed that and added 'ProcessingInidcatorText' and 'ProcessingIndicatorDelay' to web.config. but report is not showing with progress bar.
    My Need: User selects some selection criteria(like username or role) from dropdown and clicks 'Show Report' button. Then it is taking nearly 15 to 20 seconds of time to display filtered data. there i need to show user that 'please wait.., data is being processed'. i could see crystal default progress bar saying 'please wait while the document is being processed' when i refresh the report or navigating from page to page but not on button click after selection criteria.
    any help would be appreciable!!

  • Lock the progress bar in the playbar (Captivate 8)

    I'm looking for a way to lock the progress bar in the playbar in Captivate 8. This has come up a few times in regards to older versions of Captivate, but I haven't seen anything for 7 or 8 yet.
    I've tried this: Captivate 6 Help me Lock the Progress Bar in the Playbar, which relates to ver 6, but seemed to kinda do what I'm looking for, but not exactly.
    However, the Playbar Lock Widget seems to do exactly what I'm looking for (Flash-Factor   » Playbar Lock Widget (Cp5, Cp5.5)) but is for 5 and 5.5 only. According to this threadCaptivate 6 playbar lock, the widget doesn't work on 6, so I assume it doesn't work on 7 or 8, either. I've emailed the developer (Whyves) the other day, but considering the last activity on that site was a couple of years ago, I'm not really expecting a response.
    Does anyone know if there is an easy-ish way to do this or if there is an updated version of this widget available?
    Thanks,
    Marc

    Lilybiri,
    Thank you very much for your response. I realize it was very unlikely that particular widget would be updated, but was hoping someone has since been able to make something like that work in Captivate 8 (or even Cp7).
    I am actually working on a project that must be completed in a linear fashion the first time through. It consists of three parts, with each part consisting of a short video presentation followed by a couple of knowledge check/quiz questions. Learners must correctly answer the questions before they can proceed to the next part, and should be able to review the video they just watched (or any previous video) at any time, but they must not be able to skip ahead to the next video until they've correctly answered the KC questions for each part, or to skip the video the first time through.
    Enabling remediation helps in that it allows learners to re-watch the video before and even during the knowledge checks without getting 'stuck' on a question they've answered correctly already. However, it seems that forcing a linear flow while still giving learners an idea of their progress through the course via a progress bar without allowing them to use it to skip ahead has proven very difficult to do.
    The widget seemed to perfectly fit the bill in that it would disable 'scrubbing' with the progress bar until learners completed the activity. Then, once they've completed it, they could now use the progress bar to review the material again if they wished.
    Oh, well... we'll keep digging and hoping that maybe someone out there with more knowledge and skill in this than us figures out a way to make it work.
    Thanks again!
    -Marc

  • Continuous Grey Screen w/ Progress Bar

    I restarted my Macbook Pro and when the Apple logo appeared, a progress bar loaded to about 45 percent then the Mac shutdown.  This happens every time I turn on my computer.  I've tried Safe-Boot, Single User Mode and COMMAND R and none of that has worked.  Any Ideas?

    I finally after about 20 minutes held down the restart button and now it just goes right to the grey screen with nothing else. no system folder question mark nothing. Great. It was working for about 5 minutes. I updated and now I am back to a non working laptop.

  • Progress Bar, or put it Busy mode

    Hi,
    I want to set the Progress bar in Busy mode,while we are going from one page to other page.
    i.e When clicking the button,it shows the process is busy.Before going to that particular page it shows the message like"The page is opened".How To put the progress bar is busy?
    Could you tell me the information.

    Hi,
    Actually the page contains one button.When Clicking that button it goes to the another page or the same page.When I click this button,during the process time it has to show some message or we have to insert some image shows that the process is in progress.Before the coming page we have to put other message like the process is completed like that.
    I think now You understand my question.

  • How to keep Progress bar in front of the main frame?

    Hi all,
    How can i keep the progress bar in front of the main frame all the time while the proggress bar is visible?

    Perhaps the question is not clear.
    I want the progress bar to remain in front of the parent frame as long as it is visible on screen.that is when i click on the parent frame,progress bar should not go behind the frame.
    Can ne1 plz help?
    Regards,
    Mansi

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Let me explain a little behind the concept I'm going for.  There are some steps in my sequences that take a relatively long time (15 minutes or so).  During this period, a requirement of mine is to have a progress bar that gets updates every so often such that by the time the step would ordinary complete, the progress bar is at 100%.  Initial attempts involved a separate VI that managed the progress bars, but having yet another window is not the ideal UI design...  Instead, I was hoping to integrate this functionality into the RTOI so that each time a new step begins executing, additional custom data (the expected step duration) is (optionally) sent to the RTOI providing the progress update portion of the RTOI code the necessary data.
    Is there any sample code out there that performs some similar task so that I can get a better feel for how the pieces fit together?  In particular, there are a few things that are befuddling me:
    1) What is a good way to store this custom information (step duration) in the sequence file?  Should I modify the basic step types to add a new duration field which can be optionally set to something greater than the default, 0?
    2) How should the step duration get passed to the RTOI?  My current thought is to override the PreStep engine callback to send the custom duration field in a custom UIMessage, but that may be partly because I'm not familiar enough with the structure of the data is that is that is accessible via the sequence context...
    3) How do I link the progress bar data to the actual execution page that is currently being viewed.  Up to 4 executions can be running using the parallel model or the batch model in my sequences, so something would clearly need to be done so that when execution 1 is visible, the associated progress bar is shown, etc...  I'm assuming I can trap on some event when the user clicks on an execution in the list bar, but there is no similar code in the out-of-box RTOI - all that appears to be managed automatically by linking the controls to the execution manager.
    Thanks for any pointers or code samples (or even suggested reading) that anyone can give.

    Thanks for the response.
    I may indeed want to use the ProgressPercent message, but I'm not so sure just yet.  I did not want to leave the responsibility of sending UIMessages up to the VIs and other code modules called by the sequence - I was hoping for a simple solution to provide a new field (ExpectedDuration) that can be set for any given step.  In this way, the RTOI can manage updating the progress simply by counting seconds.  Perhaps there is some timer callback that can be leveraged to perform this function?
    What I have so far is as follows: I have a new step type called PassFailTestWithDuration.  It is a copy of the PassFailTest step type with the addition of a ExpectedDuration property and a new PreStep which calls the PostUIMessageEx with a custom event (10001).  The expected duration and the RunState.TestSockets.MyIndex both get passed as parameters.  Inside the RTOI, I have added a UserMessage callback VI which stores the data in the appropriate slot of a global (indexed by socket index).  (The global array is implemented as what I've heard called an action engine - there are init, read, and write actions that it can perform on data stored in the VI, and it is set as non-reentrant so that race conditions cannot occur).  Each entry in the global array has 2 fields - the expected duration, and the current elapsed time.  My idea was to continually update the current elapsed time for all active executions and simply show a progress bar for the "active" execution by displaying its elapsed time/expected duration in each necessary event...
    I think my main question now is - how do you determine the RunState.TestSocket.MyIndex of the active execution in the execution manager (or application manager)?  It seems like such an obvious thing to want to know, but I don't see it anywhere.
    Thanks again for any hints you can provide!

  • Indesign CC Progress Bar Colour

    Hi
    This will probably seem like a trifling issue, and it probably is, but it does bug me a little..
    Loving the new dark UI in Indesign CC, but when I open a document I end up doing a double take that I've used the right app...
    The progress bar that comes up is a dark grey dialog with an 'Illustrator-Orange' bar, so even though I'm opening an INDD, I momentarily question if I opened it in Illustrator by mistake
    As Illustrator is heavily themed with that colour, it would seem to me that interface elements InDesign should be a shade of purple to make it clear what app the dialog relates to - or at least white / grey.
    Just a thought. Not a biggy, no one's dying because of it, but perhaps worth some consideration from a HCI standpoint...
    Does this bug anyone else or is it just me?
    K

    All of the apps use shared code for the interface.
    And no, it doesn't bother me.

Maybe you are looking for

  • ? possible to connect AEBS to existing wireless internet connection

    Hi I have a cable connection to a Netgear W614 wireless router and can connect to the internet wirelessly using my MBP. What I would like to do is have an airport extreme in a separate room with a printer connected to it connected to the same wireles

  • Windows media player does not recognize new CD when changing CDs in drive

    I have a ThinkPad R61i that was purchased with a preinstalled downgrade from Vista to XP professional.  Whenever I rip CDs using the built in DVD/CD player/burner, WMP doesn't recognize a new cd when I put one in.  I am running WMP 11 for XP.  The fi

  • With major resouces Firefox slows over a period of time rending web usage to a crawl.

    Running Debian Jessie (using lxde) on a system with major resources (well over 20 GB of RAM using 14 desktops). I tend to have lots of windows and tabs open. Use different windows for different lines of inquiry and tabs are things that I found intere

  • L2440X LCD DVI cable problem - Windows 7

    I have been running the L2440X using a VGA connection (with KVA switch) as I transitioned from an XP system to a new Windows 7 system (which has a NVIDIA Quadro FX 380 display adapter).   I have finally shut down XP and transitioned to using the digi

  • Why can't I see what is on my ipod shuffle?

    I have the old shuffle with no screen.  When I plug it into the computer I can see my shuffle in itunes under devices but cannot see what is on there for music, podcasts, etc. In other words, the shuffle appears in the sidebar but the content of it d