Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Oct 2006
    Posts
    197
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Lightbulb Loading bar newbie help

    Hey guys,

    Im a serious newbie at flash, i followed a basic tutorial to get a preloader on my site, and it works, but i want to make the loading bar much larger and i cant figure it out.

    As it stands it goes something like this:

    Loading <percent>
    <small loading bar>

    I want to make the loading bar stretch almost the whole way across my document but i cant see any properties that determine how wide the bar is.

    I have uploaded my FLA here: Link

    I would really, really, really appreciate it if someone could have a quick look and tell me where i can define the width of the loading bar.

    James

  • #2
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    What version of Flash are you using? Its telling me that the file is of unexpected format. You change the width and height in the properties window. You'll see them on the left side next to the _x and _y information. Sometimes, the width and height options are collapsed (hidden) and you have to make them available. There are two ways you can do this. Have a look at the gif file I'm attaching.
    Attached Thumbnails Attached Thumbnails Loading bar newbie help-flash-properties-box.gif  
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #3
    Regular Coder
    Join Date
    Oct 2006
    Posts
    197
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Thank you for the help. I saved the file in flash 9 (cs3).

    Im able to make the starting block wider (starts at 1px width) using your method above, but the code involved in tiling / stretching the loading bar across in relation to the percentage loaded doesnt change, i want to change the width of the bar when it is 100&#37; loaded and make it proportionate to the percentage loaded.

    The trouble is i cant find that code, there doesnt seem to be any code to tell that bar to tile across the more that it has loaded, which is crazy because there must be.

    Edit: Here is what im after if i didnt explain it very well above-
    Last edited by spadez; 02-04-2008 at 10:19 PM.

  • #4
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    I only have Flash 8 is there an option to save for older compatibility in CS3? Usually, there is an layer labeled 'Actionscript' or 'Actions' or something in the timeline. Keyframes that have a lowercase "a" in them contain actionscript. Since its a preloader it will be somewhere in the first few frames.

    This is how I do my basic preloader in AS2.

    - I have an instance movieclip named 'preloader' that is 165px wide.
    - I also have a dynamic text field named 'loadText'.

    Code:
    //Frame 1
    var amountLoaded:Number = _root.getBytesLoaded() / _root.getBytesTotal();
    preloader._width = amountLoaded * 165; //165 is the total width of my movieclip
    loadText.text = "loading..." + Math.round(amountLoaded * 100) + "&#37;";
    Code:
    //Frame 2
    if (_root.getBytesLoaded()==_root.getBytesTotal()) {
    	gotoAndPlay(3);
    }
    else {
    	gotoAndPlay(1);
    }
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #5
    Regular Coder
    Join Date
    Oct 2006
    Posts
    197
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Hi,

    Thanks again for the help, call me picky but i really want a loading bar, the one i have is perfect it just doesnt look good how it is in my opinion.

    I have uploaded a flash 8 compatible version here: Link

    Could you please have a look?

    Regards,

    James

  • #6
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    That would have a loading bar (preloader is the instance name of it where as you have it named loadbar).

    Here is a quick video that will clear everything up for you.
    Watch Lee Brimelow's Basic Preloader Video
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #7
    Regular Coder
    Join Date
    Oct 2006
    Posts
    197
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Ive got a preloader, and its working, its just not very wide, i want to make it wider. I can just adjust the width of the image, but there is some kind of code im assuming that adjusts the width of the bar, and i want to work out how to make the width of 97% loaded 600px instead of 180px that is at the moment for example.

  • #8
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    I downloaded the .fla that you've uploaded. I wasn't able to make sense of what was going on with the preloader. I was able to have it start off as wide as you wanted but it would then contract back down to the smaller size. In addition, the preloader would be simulated every time I played the movie even tho it was loading locally.

    You are correct. Currently, you have a preloader that does work. However, it does not work in the way which you'd like it too. Nay do you have a way to get it to work in which you intend. You can spend another two days trying to figure out why on this forum.....or you can use another method that is adaptable to your needs. If you insist on correcting your method I'd suggest that you try out actionscript.org or another forum for further assistance b/c I personally don't use flash enough to correct it. (Even though I'm sure its simple.) Or wait until someone more comfortable with flash enters your thread.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •