A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Very Quick Script!

  1. #1
    Member
    Join Date
    Feb 2004
    Posts
    69

    Very Quick Script!

    Hey all i need a script, which i think is very simple, like a preloader, but not nearly as complicated. I just need the code to say something like, if frames 1-46 have loaded, goto and play frame 2.

    But in actionscript for the first frame!

    Thanks Matt
    Matt

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Have the first frame empty and have this on the second frame.

    if(_framesloaded==46){
    gotoAndPlay(47);
    }else{
    gotoAndPlay(1);
    }

    You need two frames as the code has to be repeated.

    If you have to use just one frame, you can have the code on a moveclip within a onClipEvent(enterFrame) handler.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    69
    I have made the firs frame blank, and the second frame blank with this actionscript, but when play it, frame 46 just flickers. Why? Did do something wrong, thanks for your help so far!

    Matt
    Matt

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The code works only if its placed in the main timeline in the second frame of the first scene. Try this...

    if(_root._framesloaded==46){
    // Frame to where you want to go
    gotoAndPlay(3);
    }else{
    // Its not loaded yet, go back and try again
    gotoAndPlay(1);
    }

    ..and change the framenumber if you dont want it go to frame 3 when its done loading.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Member
    Join Date
    Feb 2004
    Posts
    69
    I actually worked that out after i posted, but thankyou very much anyway! And ur sites really cool aswell! Can you take a look at my site i am doing, as of yet there is no loading animation so it is blank for a few seconds while it loads the whole thing. Can you tell me what you think of it and how much i should charge for something like this, if i were to sell it?

    http://uk.geocities.com/mattdempsey@...oformance.html

    Thanks, Matt
    Matt

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    If you keep it at that size ( 3.4 mb is 11 minutes of download for a modem user ) I doubt if its possible to sell in the first place. You should load the photo gallery only when needed. And the thumbnails are way to light, you can hadly see what they are. As thumbnails generally are small and hard to see anyway, dimming them is not a good idea. To make them dimmed on rollOver is better.

    The opening screen look very pale exept for the logo.

    You should also consider embedding the font so you know what it will look like. I got the standard Times font. using the font you have on the buttons would be a good idea as it will add to the general profile.

    If you are loading the text from a textfile you can still have different size and color on text using regular html. The text is kind of dull, even if its good to have capitals on headlines.

    The gradient that moves over the images has no function and seem unnecessary. It does not add anything to the images.

    Otherwise its clean and nice.

    Its really hard to give a general price for something like this. What is the minimum hourly rate you can accept? How long did it take you to do ( hours )?
    rate*howLong
    Last edited by pellepiano; 04-07-2004 at 08:41 AM.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Member
    Join Date
    Feb 2004
    Posts
    69
    Hey, thanks for the reply, i accept that 3.4 megs is a lot but it is needed, and the guy im doin it for wants it. I will put into practice your idea of having a seperate loader for the photo gallery, that would be good. I will embed the font but how do it do it?

    The guy that im doiong it for seems to like the rollover, and disagrees with your estimate that its not worth money! Which is good!

    As i say, i am not going to charge him as such, and i have not kept track of how long i spent, but if you had done this, and i know you would have done it better, but how much approx would you charge?

    Matt
    Matt

  8. #8
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I would have done it in less than a day which is why I have fixed prices. I dont think its good practice to discuss pricing on this board ( Im not shure we are allowed either, according to some earlier threads ), so you can email me privately if you want to know some specifics.

    Select the textfield and click the CHARACTER button in the property panel to embed the font.

    I generally do all my sites where every section is a separate swf file that is loaded only when needed. All my sites also have a administration swf where the client can update the texts for all sections from any computer that is online. I dont think I have ever done a page where the initial page is over 100kb, and I still use bitmaps and lot of graphics......

    The biggest ( in kb ) I made is 111 kb....
    www.driftwood.nu

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center