Problem with Preloader in my Flash AS2 Game

I have been using this tutorial to make a preloader:
http://www.republicofcode.com/tutori.../preloader_bc/
I have run into one problem though.
When I simulate the download, it just shows the background color of the game while it loads, and when it finished loading, it shows the loading screen fully loaded. I have followed the tutorial exactly, except added my file names into the AS2 code.
Here is the ActionScript in Frame 1 I have for the preloader:
if (_root.getBytesTotal() != _root.getBytesLoaded()){
stopAndGoto(1);
preloaderBar._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100;
loaderTxt.text=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";
Any hints or answers to what i'm doing wrong?
Thanks, MrA615.

Your description of what you've done and the code you show does not match what the tutorial says to do and what code to use... (there is no stopAndGoTo() function in Flash).
Right-click the second frame on the upper layer labeled Actions and select Actions. Copy and paste the code below to make our preloader functional.
if (_root.getBytesTotal() != _root.getBytesLoaded()){
gotoAndPlay(1);
bar_mc._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100;
loader_txt.text=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";

Similar Messages

  • Hi guys, problem with grey screen and flashing question mark. on top of it while in utility, i'm unable to verify, verify disc permission or repair disc0 which is obviously my main hd. any ideas where to go from here? tried to reistall osx but no luck.

    hi guys, problem with grey screen and flashing question mark. should be straight forward affair but on top of it while in disc utility, i'm unable to verify, verify disc permission, repair or even erase disc0 which is obviously my main hd. any ideas where to go from here? tried to reinstall osx but no luck, stucked when asked to chose location to install osx. would really apreciate any kind of help with this cause i'm quite new mac user. ty

    If you don't have a backup, read this:
    https://discussions.apple.com/docs/DOC-1689

  • Safari have problems with streaming radio over flash

    Hello,
    since my update on MAC OS LION have my safari problem with radio streaming over flash.
    For testing: http://shoutcast.flashradio.info/#/House/814384/
    In all browsers on all platforms will this work. Just on the combination from MAC OS LION and Safari 5.1 we get the io error #2032.

     Try changing some Advanced wireless settings on the router. Open the setup page of the router and go to Wireless tab. Click on Advanced wireless settings. Change beacon Interval to 75, RTS threshold to 2304. Save the settings.
    Change the wireless channel to 11.
    An 802.11n router can also work with 802.11g and even 11b devices. But these much slower devices force the router to slow down to talk to them, which means a big throughput hit. Fortunately, the "legacy" mechanisms are pretty efficient and reduce throughput only when the slower devices are actively transmitting or receiving. Either upgrade to all 11n clients, or use a separate 802.11g router to handle your "legacy" stuff.

  • Has anyone experience problems with loading the latest Flash Play?

    Has anyone experienced problems with loading the latest Flash Player?  I have done this several times and the same results come up - Install the latest Flash Player.  I run Microsoft Vista.

    What is your browser?  If IE see
    http://forums.adobe.com/thread/885448
    http://forums.adobe.com/thread/867968

  • Flash as2 game animation, problem.

    hello i am making a flash animation game but i have a problem, i have my guy running and everything its all gifs, so when he stops its a gif its not one picture its 4 of em (gif) which i made them all compressed into a gif and added to my library then added that to my flash made it work blah blah blah-
    well my problem is when my guy runs left he turn right after i let go of the key i no whats it is doing it using my 1 animation i have in their for standing  i to add my other animation which he standing left basically he runs left after i press left then i let go he turns right, i need to know how to make it so either when i let go of the (LEFT) key it uses my animation ('still2') which is him facing left which i need i have him running right and he stays right after so thats good, or if u know if theres a way i can make the code say like after i let go of like left it uses gotoAndStop('still2') then for running right it uses gotoAndStop('still') so he dosent turn around after i let go of left! well i hope u can find out, and its all animated, so dont just make it so it dosent stop using the animation of left or right, cause then hes running in place for enternity thanks heres my code.
          var rollSpeed = Number=14;
         ichigo_mc.onEnterFrame = function() {
          if (Key.isDown(Key.RIGHT)) {
           this._x += rollSpeed;
           this.gotoAndStop("right");
          } else if (Key.isDown(Key.LEFT)) {
           this._x -= rollSpeed;
           this.gotoAndStop("left");
          } else {
           this.gotoAndStop("still");

    no its actually not a school project just i want to know how to make a game, and i dont know really anything about flash, but i have in my picture of my guy another layer so theres each indivudual layer like i have in my pic of my guy the still still2 running animation 1 n 2 and both my attack things, if you would to see my project so far ask me and i send the file and it should show my guy and his animations...
    heres my code so far.. idk y but i like putting at the end
       var rollSpeed = Number=14;
         var facingRight = true;
         ichigo_mc.onEnterFrame = function() {
          if (Key.isDown(Key.RIGHT)) {
           this._x += rollSpeed;
           this.gotoAndStop("right");
           facingRight = true;
          } else if (Key.isDown(Key.LEFT)) {
           this._x -= rollSpeed;
           this.gotoAndStop("left");
           facingRight = false;
       } else if (Key.isDown(Key.SPACE)) {
        this.gotoAndStop("atack2");
          } else {
           if (facingRight) {
             this.gotoAndStop("still");
           } else {
             this.gotoAndStop("still2");

  • Cache problem with bigger files in Flash 15

    Hello,
    I'm playing some MMORPG game. Since two days I have problem with entering one map, it always load from server, not from my cache like other ones.
    I've talked with developers, they didn't change anything, and the only thing that makes this map special is it weight. Other game files are small, this one is biggest, it weight 15 mb.
    Is any option that I can change to cache it? Or it is some bug?
    Hope you will help me.
    Regards.

    I have the exact same problem, but with an MMO game of 1.7Mb. Clients with the newest chrome/flash cant cache the game in the browser. If I configure Chrome to use the system flash player (v14), the game files are cached as always did. The problem seems to be related with the flash 15 embedded in Chrome.
    The strangest thing is that if I create a separate html page and embed the SWF there, it seems to be cached fine. But in the original dynamic page where the game needs to be embedded it doesn't get cached.
    rzuffi, did you try embedding your flash in an static html file?
    Regards

  • Problems with Adobe Reader and Flash Player

    I had an Adobe update last Monday and, ever since then, I can't view documents (eg credit card statements) on screen and sites that I previously visited regularly without problem suddenly say that I need to have Adobe Flash Player installed. I've downloaded Adobe Flash Player and it says it's installed correctly but when I return to the site, it still says I need Adobe Flash Player. I've also tried doing an uninstall first and then an instal but the same thing happens. I've run disk first aid and it found a problem with the Head which it fixed but I still can't open documents using Adobe in Safari. Adobe Plug ins tells me that the Internet Access plug in is not loaded but when I ran 'repair Adobe Reader installation", it said there were no missing components detected and repair was not needed. I don't know if it's relevant but I've been having problems with Safari for several weeks, quitting 3 or 4 times a day, mainly when I'm switching from Safari to another programme such as Entourage or Excel.
    Message was edited by: Aileen2

    Hi Carolyn
    I don't think I made it clear on the original post that I'm having problems with both Adobe Reader AND Adobe Flash Player. Unfortunately, all the Adobe Reader sites are confidential so I can't give you an illustration on that but for the Adobe Flash Player, try www.jacquielawson.com/ - you can preview cards without being signed in. With the Adobe Reader problems, I get a picture of a blank 'piece of paper' with a small blue square in the top right hand corner that has a white question mark inside it. The first time this happened to me, I was on the UK Inland Revenue site trying to print out some end of year forms. I phoned the Revenue's helpline and they said to try doing a 'save as' to my desktop. It seemed bizarre - saving a blank piece of paper - but lo and behold, when I opened it on my desktop, the forms appeared exactly as normal. However, I've since tried this 'save as' technique with my credit card statement and I still get a blank piece of paper with a blue square and white question mark when I open the desktop copy.
    Thanks for your help and patience. I really appreciate it.
    Aileen

  • Problems with Safari, Firefox and Flash player

    Ever since I got my new iMac that has Snow Leopard I've had problems with Safari and Firefox freezing or crashing. It appears that part of the problem is the Flash plugin because sometimes a screen pops up and says something like: the flash script is having problems. I've tried uninstalling & reinstalling Flash, Safari and Firefox but the problem is still there. My browser seems to hang up or freeze a lot no matter if I use Safari or Firefox.
    Any ideas?
    I just discovered the Chrome browser from Google this morning and so far its working very well. No freezes and it appears to handle Flash video without any problems.
    How can that be?
    Thanks

    Ah! The proverbial missing information. Why the regrets? Most people are having no issues migrating from previous computers; it's the preferred method. See Best Practices and Setup new Mac. You're a long way from starting over.

  • Problem with installation of Adobe Flash Player on mac

        Hi, i have a macintosh with OsX Yosemite 10.10.2 and i can't update the software to te last version. The download always stop at 20-30%. It's not a problem of my internet connection. I tried to uninstall e reinstall flash player, but i have the same problem, with the difference that now i neither have the software... What can i do? Thank you!

    Hi,
    Ok.  So I found this and it worked:
    1.  Re: Flash download freezes at 25%. What will help?
           Jeromie Clark     Mar 18, 2015 5:00 PM  (in response to Geri J)   
    Please use the offline installer:
    http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_osx.dmg
    Download the install package from this link.  Double-click to open it from your downloads folder; when you see the red "install" folder, right-click it and select "Show Package Contents"; click on the  "Contents" folder; then click on the "Resources" folder; then double-click on the "Adobe Flash Player.pkg" file. The installation will start.  It worked for me.... FINALLY!! I hope it also works for you.

  • Problem with Windows7 and Adobe Flash freezing computer?

    Hello All, There is a problem with Windows7 and my Adobe Flash causing my computer to freeze. So, Skype, videos, etc will not work. Have tried many things to solve problem. Can Oracle VM be used to run a different operating system...such as XP or Vista where Flash will work properly? I would hate to have a new operating system installed on a new computer. thanks

    If you mean Oracle VM VirtualBox, then yes, definitely. A free download, it installs and runs great on Windows 7. http://www.virtualbox.org/

  • Quality problem with animated gif through flash

    i got a problem with making animated gif through flash.
    on html/swf publication it looks clear.
    but the weird thing is through gif publication, it wouldn't show. and exporting it as a movie as gif cause visual defect when put up on web.
    it looks better when you open it in a browser.
    this is how it looks for a profile gif in thumbnail mode. blocky and unclear.
    how do you get it to look good both in thumbnail mode and in browser mode. i seen other that have a clear gif in thumbnail mode.  are my setting wrong for flash? or should i just do gif in photshop instead. i heard rumors flash don't do gif very well.

    Change your gif export setting under publish...
              Dimensions         : Match movie
              Playback             : Animated
                                        : Loop continuously
              Options               : Optimize colors
                                        : Smooth
              Transparent         : Opaque
              Dither                 : None
              Palette Type       : Adaptive
              Max colors         : 99999

  • Problem with displaying text in flash player

    I have flash player 10.2.152.26 and opera 11.01  installed.
    The problem is that text in flash is diplayed in an awful way like this:
    http://img651.imageshack.us/img651/6918/alljo.png
    And when i choose "settings" the window appears, but it doesn't react when I click on it.
    Can anyone help, please?

    Thanks for answering
    So you have IE8 and the hardware acceleration was able to be UNchecked and FP(Flash Player) is working properly with IE.
    In IE flash works fine with any settings.
    When I unchecked "Hardware acceleration" checbox in IE it also became unchecked in opera, but nothing changed in opera's behavior.
    When you don't use the Aero it's displayed correctly but the settings do not work. What settings are you referring to?
    It's about flash settings in Opera
    With aero: http://img443.imageshack.us/i/settingsh.png/
    Without aero: http://img816.imageshack.us/i/settingswoaero.png/
    In both cases the settings dialog is displayed like in the screenshots above, but when I click on checkbox/tabs/'close' button in it nothing happens. I can't change any settings or close it (dialog disappers only after reloading page)
    Just to sum up everything mentioned above:
    - In IE flash works fine regardless of any settings
    - In Opera text is displayed wrong when using windows aero, and without aero theme it's displayed correct
    - I didn't manage to make settings dialog work in Opera
    - When I change some flash settings in IE, they are also changed in Opera
    Now Flash Player works thru the browser, do you have perhaps have an addon that is conflicting? What Anti-Virus do you have Installed? Any addons of that?
    I have 7 extensions installed in Opera, I've disabled all of them, but nothing changed.
    I use Kaspersky Internet Security 2011, disabling it also gives nothing.

  • I have a problem with my keyboard in Flash App on Android.

    I have a problem with my Flash App on Android, this app requires installing Adobe Air on Android before running. The keyboard pushing issue has troubled me for a while however I can't find a solution.
    As you know, while triggering any text box, the keyboard, no matter built-in one or others will push the screen up to a few then you can see what you are typing. However, on my app, when I trigger the built-in keyboard, it covers the half screen meanwhile I can't see what I am typing.
    Could anyone can give a light so I can completely this problem for 2 years? Is this something I can do with action script or Flash?
    Thank you.

    If you have a suggestion or answer feel free to leave a message as I will continue to check back here. Thanks.

  • Problem with internal HD upgrade- Flashing "?" over HD icon on startup

    Last weekend, I installed a Western Digital 250GB internal IDE 2.5 inch drive (WD2500BEVE) to replace the internal HD on my 15 inch G4 PB Aluminium (not sure of processor speed, but purchased new in 2004, with OSX 10.4.11). I backed up my existing HD to my friend's MacBook, as a disk image using Carbon Copy Cloner. I was very careful with the installation (using anti-static wristband etc etc). The installation appeared to go well. The newly installed internal HD could be mounted as an external HD of my friend's MacBook (using firewire Target Disk mode). Carbon Copy Cloner copied everything back to the new internal HD without any apparent problems.
    BUT THEN... when I disconnected the firewire connection and tried to start my computer on its own, the dreaded 'flashing question mark over hard drive' icon appeared.
    Can anyone suggest what the problem might be? Three things I've already excluded are:
    (1) The jumper settings on the HD are correct.
    (2) I formatted the new HD as Mac OS extended (journaled)
    (3) The problem is not with the master boot sector (i.e. the problem is not merely that the computer can see the HD but does not know how to load the system from it). My computer cannot see the HD at all -- when I insert my operating system DVDs as if to reinstall the system, my internal HD does not even appear.
    I am not panicking as I can still view the contents of my internal HD by booting it as an external HD of my friend's computer. But there seems to be a problem with my CPU communicating with my internal HD. The core of the mystery is: why can I boot my new internal HD off my friend's computer using FireWire, yet when I start my computer on its own using the operating system DVDs, the computer doesn't seem to recognise the HD whatsoever?
    Does anyone have any suggestions?

    Can we establish what model Powerbook you have? Take the battery out and look for the label.
    I have a feeling that your PB cannot recognize the 250GB drive, although I was under the impression that the older PBs that could only recognize 128GB would simply ignore the extra disk space. Perhaps the ATA specs aren't all backward compatible, although the Firewire interface can handle it.
    Other World Computing can obtusely point out which drives your model can handle, although I don't know it its 100% accurate.
    http://eshop.macsales.com/MyOWC/

  • Problem with motion tweening in Flash CS4

    Hi !
    I tried to refresh my little flash knowledge -- but I stumbled upon a problem with the new Flash CS4!
    When I try to make different blur or alpha effect on one keyframe I got after making the motion tween -- Flash adjust the other keyframe as well (got the same reaction on both keyframes as if it was the same instance of movie clip -- and not as in old flash; the keyframes created separated or independent instances)
    The only thing working for me is when I move the movie clip out of the stage on the first keyframe -- and it correctly move its position.
    What's wrong?
    Kind Regards
    Maria Olsen

    Hello Maria,
    You sort of answered your own question:)
    "got the same reaction on both keyframes as if it was the same instance of movie clip"
    That is exactly right and is the proper way of looking at new motion tweens. It is one instance of the movieclip for the duration of the tween. It takes awhile to get used to this.
    New motion tweens allow you to set up a a very simple tween initially without keyframing ending values / position. Once you start making changes after the tween is set, you are going to have to get familiar with adding "property keyframes". Property keyframes are displayed with those little diamond icons in the timeline. Poperty keyframes allow you to "lock in" certain specific properties at key points in your animation without affecting other properties. With the old classic keyframes, a keyframe placed mid-tween would create a whole new instance of a symbol with all properties (rotation, scale, alpha etc) set in stone for that point in time. The benefit was that you could easily have all properties tween TO and FROM that keyframe if that's what you wanted. Now you can make adjustments to a symbol mid-tween and only specifically adjust a single property. So you can adjust the alpha of an object mid-tween without interrupting say a rotation that you wanted to happen all the way through.
    If you simply want an object to move left to right and then you decide it should fade in
    CLASSIC TWEEN
    -place symbol on frame 1
    -keyframe frame 10
    -in frame 10 move the symbol to the right
    -add classice tween
    Ok, that works, now add alpha fade in
    -go back to frame 1 and set alpha to 0
    -classice tween automatically adjusts alpha from 0 in frame 1 to 100 in frame 10.
    -done
    MOTION TWEEN
    -place symbol on stage
    -create motion tween
    -playhead jumps to last frame
    -move symbol to the right (no need to f6 / keyframe)
         Flash automatically adds something called a "position" keyframe (notice the little black diamond)
    Ok, that works, now add alpha fade in
    -go to frame 1 and set alpha to 0
    -test movie
    -oops - wrong. As you noted the alpha will stay at 0 throughout the whole tween.
    -you need to additionally go to the last frame and set the alpha back to 100
         -this will automtically create a "color" property keyframe on the last frame
    When just doing this now I noticed something odd as well
    As soon as I do the position change and move the symbol to the right, if I try to add the "color keyframe" on the last frame of the tween, I am not allowed to do so. "color" and "filter" are greyed out. I would prefer to lock the alpha at 100 in the last frame while the playhead is in position before setting it down to 0 in frame 1. Oh well.
    Seems you are forced to
    -go back to the beginning of the tween
    -adjust the alpha
    -then go to the end and manually bring the alpha back up.
    hmm maybe i'm missing something too:)
    the best way to do this would be to have the foresight ahead of time to do the alpha
    -place the symbol
    -alpha 0
    -add motion tween
    -in last frame move the symbol  set alpha to 100 (alpha and position keyframes are automatically set)
    So if you do it right the first time, its easy. If not, well.
    Keep in mind an object will maintain the properties it has set in frame 1 unless a subsequent property keyframe enforces some adjustment.
    If you have have an object that is moving from point a to b to c to d:
    If you alter the alpha at point b, the alpha will tween from point a to b, but will maintain the new alpha to c, to d.
    If you scale the clip by 200% at point, its scale will tween from point a all the way to point d, NOT just from c to d
    To scale from point c to d only, set a "scale" property keyframe at point c (this will lock the objects scale at 100) THEN scale to 200% at point d
    It takes a good deal of practice. I found the hard way that you just can't "wing" it. It isn't very intuitive coming from a classic tween approach.
    These articles really helped me:
    http://www.adobe.com/devnet/flash/articles/motion_migration_guide.html
    http://www.adobe.com/devnet/flash/learning_guide/animation/
    Take note of the tips on "cntr-clicking" frames and "shift-dragging". You have to really get used to a few keyboard modifiers when editing the timeline.
    Stick around the forums. A lot of good info comes through daily.
    Carl

Maybe you are looking for