problem with external preloader bar with percentage number?

Hello!
I'm learning just AS3 with flash cs5 and I used the template "preloader for external file" with the big red bar. The bar is progressing very well! But then, I wanted to add a percentage number so I tried a number of things with the code. The result: the bar does not move forward and the percentage number works allright. I leave the code. Can someone help me?



var contentLoader:Loader;
loadContent ("painting1.swf");

function loadContent(url:String):void
{
contentLoader = new Loader();
contentLoader.contentLoaderInfo.addEventListener (P rogressEvent.PROGRESS, loading);
contentLoader.contentLoaderInfo.addEventListener (vent.COMPLETE, contentLoaded (E);
contentLoader.load (new URLRequest (url));
}

function contentLoaded(evt:Event):void
{
removeChild (progressbar);
removeChild (myLoadText);
addChild (contentLoader);
}

function loading(evt:ProgressEvent):void
{
var loaded: number = evt.bytesLoaded / evt.bytesTotal;
load = Math.round(loaded * 100);
myLoadText.text = String (uint (loaded)) + '% ';
setBarProgress (loaded);

}

function setBarProgress(value:Number)
{
progressbar.bar.scaleX = value;
}

You want to set the progress bar scaleX from 0 to 1, but you set it to 0 to 100 so that your bar is 100 times larger than it should be.

You can change your function of loading in order to:

...
var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
myLoadText.text = Math.round(loaded * 100) + "%";
setBarProgress(loaded);
...

Tags: Adobe Animate

Similar Questions

  • Unable to contact the Service Adobe, I have a problem with the number.

    Hello

    I would like to have more information about the Adobe domain controller. My intention is to buy the product and use it in my office, we are a small company (4 PCs).

    If I am wrong, I have to take the standard networks for Business Plan, but I can't organize any request for payment for more information, because I don't have a problem with the number I'm supposed to call.

    Y at - it another way to know if this software is very suitable for me and my business and most of all the how much it will cost.

    Thank you for your attention.

    Good day!

    I look forward to hear from you.

    Best,

    Augusto

    Hi Avgvstvs67,

    Please see this link: https://acrobat.adobe.com/in/en/pricing/business-pricing.html

    Kind regards

    Rahul

  • Problem with the number of lines in the channel

    Dear community LabView,

    I'm relatively new to labview and I came across a problem that (I assume) can easily be resolved with your help.

    I need to create a digital signal to trigger a camera, but I have a problem with the configuration of my lines or exit lanes. I would not use that line output to trigger the camera. (I use a card NI PCIe-6353). LabVIEW is telling me that the number of lines in the channel does not have the number of rows of data:

    Possible reasons:

    Specified read or write operation failed because the number of rows in the data of a string is not the lines in the channel.

    If you use the digital waveform data type, make sure that the number of lines in the digital waveforms is the number of lines in the channel. If you are using Boolean data, make sure that the dimension of the array for the rows of the data is the number of lines in the channel.

    Number of lines in the channel: 1
    Number of data lines: 2

    Task name: _unnamedTask<11>

    How and why the number of data rows is connected to the resolution of my analog digital converter?

    I would appreciate your help! Labview code and a screenshot attached.

    Thank you

    Beff

    I got it to work by changing the "data format" "binary not signed" OR by plugging is not the "offset" for the Square Wave VI.  I think that the default "offset binary" data format works correctly if there is a negative value.

  • Problem with the number of files?

    Hello guys,.

    I have a problem with the compilation of some projects...

    I realize that when my project 201 records in total (including the file config.xml, Active Directory and directory ext) they do not compile.

    If I delete all the files (if the project has 200 files in total), the success of occours compilation.

    See:

    E:\BlackBerry WebWorks Plug - in Eclipse\plugins\net.rim.browser.tools.wcpc_1.5.1.201010291444-22\wcpc>bbwp.exe "C:\Documents and Settings\Softwell\Desktop\blackberryhtml5.zip".

    [INFO]                  Parsing of the command line options

    [INFO]                  Bbwp.properties analysis

    [INFO]                  Validation of archive application

    [INFO]                  The analysis of config.xml

    [INFO]                  The application of filling source

    [INFO]                  Compilation of application BlackBerry WebWorks

    java.io.IOException: cannot run program ""E:\BlackBerry"(in the"C:\DOCUME~1\Softwell\CONFIG~1\Temp\widgetGen.4723774651307629071871.tmp"directory): error = 87, Parometro incorreto CreateProcess.

    [ERROR]                 CAP exception has occurred

    Can someone help

    Hello tneil,

    Well, I found the problem and a solution.

    The thing is: my project was not limited by the size, this is the number of files (200).
    I realized that BB has released an SDK 2.0 (I used 1.5) and I tryied to compile with the 2.0 and everthing works fine!
    The problem is how bbwp.exe communicate with rapc.exe, maybe he tryies to send files by command line and it has a limit. With the new sdk, it uses a file temp with all orders. This is why it works.

    The maximum size of 7MB, I can't say anything, because my apps are about 3-4 MB. But good to know, if I can put in my documentation.

    That's all.
    CYA

  • problems with serial number

    I downloaded adobe illustrator cs6 before I created an account, so I don't have a serial number. I was wondering if you can help me with this problem.

    Hello

    Please check the help below document:

    Quickly find your serial number

    In the case of the volume license product, please visit: site Web of Adobe License | Serial numbers | Orders | Accounts

    Kind regards

    Sheena

  • Problems with serial number for upgrade installation

    I am trying to upgrade photoshop cs2 to cs4 with a upgrade disc purchased (on my imac). The installer asked my cs2 serial number and it tells me that the serial number does not match the product. I know for a fact that this series number, as I installed cs2 on all my macs without problem. What am I doing here? The only other option it gives me is to operate as a 30 day trial, and it is unacceptable.

    You must contact Adobe Support by chat or phone when you have the serial number and activation problems.

    Here are some links to help get in touch:

    http://www.Adobe.com/support/chat/ivrchat.html

    http://www.Adobe.com/support/download-install/supportinfo/

  • Problem with page number display

    Hi, need some help please.


    I changed without intention some settings or something, but I can't fix it. I have documents (book chapters) that do not start with page 1 but the spirit 230 or 130 or some other number, but I see the sign where you ca see pages or master pages, the only pages starting with 1 (as in "the first page of this document and so on".) On another computer, no problem, the same file number in this Panel page corect.

    Can someone please help and tell me how corect this?

    I almost forgot; I am working on Windows and with InDesign CS3.

    I thank the of to help.

    IonP

    Check your settings on each computer in Edit > Preferences > General > Page numbering. Chances are it's different on both computers.

  • Problem with display number

    Hello

    I wrote the following code:

    screen_create_context(&m_screen_cxt, SCREEN_APPLICATION_CONTEXT);
    screen_get_context_property_iv(m_screen_cxt, SCREEN_PROPERTY_DISPLAY_COUNT, &count);
    

    I am surprised because when I run the present with the phone not attached to an external display, the value of count is always 2. AFAIR, it was 1 in 10.0.9 SDK. I wrote a code that take advantage of dual display with cascade. How can I be sure that a second screen is attached to the camera?

    Thanks for any help.

    Fred

    Yes, I could discover whether or not the screen is fixed.

    What puzlles me is that I don't see any use to this call, if it always returns 2. And my code was working in the previous version, I had to check if the screen is attached or not.

  • I have problem with serial number for 2 PC

    I bought Adobe Design Standard 5.5.5 MLP Upgrade License UKR OF CS5. (with CS6 upgrade)

    In the center of my license, I find new license for CS6, but on the second PC Acrobat do not run after update.

    you have licensed cs6 is a cs5.5 upgrade which is an upgrade of cs5, correct?

    If so, install cs6.  You will be asked your cs6 serial number.  you will then be presented with a drop-down list.  Select cs5 and ask the serial number cs5.

    Enter the correct number at the right time and to proceed with the installation.

  • problem with serial number for Photoshop CS 6

    I installed Photoshop CS 6 on my new PC, I have a serial number, but got the answer that is wrong (I checked with my Adobe and it's OK). I also tried the serial numbers for 5 CS and CS 4, but with the same results. What to do?

    Error "serial number is not valid for this product". Creative Suite

    http://helpx.Adobe.com/Creative-Suite/KB/error-serial-number-valid-product.html

  • Problem with percentage

    Hi Experts,

    I have a column with a formula, and I did it in the format of data in percentage.
    This percentage is the display... fine...
    but here, for example, I'm 70,65%, it is rounded up to 71%.
    but I need to cut only 0.65% and 70% is expected.

    How can I get this... Please help me

    Hello

    You can check the box Replace default data format.
    for the digits after the decimal point, drop, please select 0.

    Please check the useful/correct!

    Thank you
    Vineeth

  • Problem with serial number in LR

    Hi I have to reinstall lightroom on my computer. Last year, I bought a version of lightroom, but now I can't find the executable file on my computer, I followed the suggestion of a helpdesk chat on the site which gave me the link to the trial version and che series to get the full version. This series is the same, I had in the first, now I'm tryng to adapt to this series, but the program says (English translation) "the serial number is not valid" has someboy a suggestion to solve this problem! Thanks for any answers, regarding the King!

    What version of Lightroom you bought last year?

    I guess your new download is 5.6, so you will need to have a serial number for 5.x.

    If your serial number is an earlier version, you must upgrade or download a new copy of the version to which you are licensed.

    If your license is in 5.x then it is possible, that you have been sent a link to the CC version rather than the stand-alone version.  If this is the case you need to uninstall cela a download of one of the following links instead.

    Adobe - Lightroom: For Windows: Adobe Photoshop Lightroom 5.6

    Adobe - Lightroom: For Macintosh: Adobe Photoshop Lightroom 5.6

  • Problem with a number

    Hello

    I have a number (12.3). The value of this field is as:

    1833,9

    But I need to export this information in a SQL Server database, using a PL/SQL procedure, using a link to the DB, using the following format:

    1833.9-> number (12.3)

    How can I handle this? I am trying to use

    SELECT trim (to_char(TSALIPRIX,'9999999990D000','NLS_NUMERIC_CHARACTERS=''.,'''))
    OF TST_FLOBCA_ANALIS
    WHERE nvl(TSALITRT,0) = 0
    AND ID_NUM = 1;

    So I ' 1833.9', but I have a lot of problem when I try to convert char in number, for example:

    INSERT INTO PRICES (TSALIPRIX) VALUES (SELECT trim (to_char(TSALIPRIX,'9999999990D000','NLS_NUMERIC_CHARACTERS=''.,'''))
    OF TST_FLOBCA_ANALIS
    WHERE nvl(TSALITRT,0) = 0
    AND ID_NUM = 1))

    I ORA-06502: PL/SQL: digital error or value.

    Can someone help me please?

    Thank you very much

    Hello

    If we have spaces in when converting it to the Type of number, we get also error as number not valid.

    For Ex:

    SELECT TO_NUMBER (290. 90')
    FROM DUAL;

    Then, there is no spaces, to eliminate it.

    And you say that the field is of Type Money. Oracle does not such a Type for that.

    While converting if the chain is something like this $ 290.90 CUT then it 290.90 and after conversion
    use the symbol "$" to the result.

    Thank you
    Shankar

  • Problem with serial number on simple edition

    Hello

    We bought a simple editing with the account: [email protected]

    We received, the serial key, but unfortunately we used it on another account: [email protected]

    Everything was fine for the IPA and zip files. We uplaoded file on itunes to sync with the ipad, the app icon can be seen on our itunes but not on the ipad, is it possible to reset the serial key for use with the right account?

    Thank you

    When you sync the app with ipad via itunes, you get an error message?

    Contact technical support Adobe DPS or you can PM information for me.

  • Problem with serial number

    Hi guys!

    I don't know you understand me because I am not good in English, but...

    I installed Adobe Illustrator CS6 and asking me the serial number. Before about 3-4 years, I installed Adobe Flash, and then I had and he knew. Now I can not find anywhere. I followed the instructions from Adobe, but it doesn'tt help, because under the 'plans and product' is nothing.

    Everyone help? I need to finish work at the school.

    http://helpx.Adobe.com/x-productkb/global/find-serial-number.html

    You can try to contact the Adobe Support via chat and ask them if they can help.  They may not be able willing but it can't hurt to try.

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

Maybe you are looking for

  • Satellite Pro R50 - B - 10 K - SSD & Windows installation - missing pilot

    Hello I have a problem during the 8.1 windows x 64 installation pro. Just after the departure of Assistant installation, an error message appears: "no hard disk found. Click on load a driver to provide a driver for installing mass storage. » My confi

  • How to combine two different bookmarks lists into a single list?

    I try to combine the two lists of bookmarks. One of the IE and the other of Google Chrome. I created two HTML Firefox files for each and they are listed in my tab of Firefox bookmarks separately, but I want to combine and more written duplicate or ma

  • Blue Screen on Satellite P100 - need to recover data

    Putting on my laptop yesterday, I was faced with a blue screen error message that even after running chkdisk keeps appearing, even on reboot in safe mode. The problem is I only have the Toshiba recovery disks (not a disc XP - XP was preinstalled on y

  • HP Photosmart 3310: Using only the black cartridge

    Suffice it for the most part to print text in black, but it seems to exhaust all my color at a speed that is ridiculous and expensive cartridges.  How can I use the black cartridge only?  I use an iMac and iPad (for remote printing)

  • devices & printers fails to tell [play anything

    When "devices and printers" are selected in the Control Panel, there is no evidence that installed; devices or printers. Printers are selectable from software such as Excel or Word. However, I can't access any printer to make the default. Have remove