A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Major major help needed!

  1. #1
    Member
    Join Date
    Apr 2001
    Posts
    32

    Thumbs up

    I have a bit of a problem, and I really don't know who to ask. I just learned flash a few months ago, and I know what I'm doing to a point, but I have run into a little problem. I had to do a tour for my company's webpage, and I have experimented with many ways of doing it, but the file size always ends up being HUGE. I originally had the flash movie set to load each movie as it was needed, but the preloaders kept getting all screwed up. this actually fixed the file size issue, but the movie was choppy. Then, I tried making it all one big file, this made the movie run smoothly, but it also takes about ten minutes to preload on a 14.4 modem. I tried all the stuff like making more motion tweens, and having less keyframes, and it didn't decrease the movie size at all. I was wondering if anyone knew anything I could do to make this movie smaller. I really am running out of ideas fast! By the way, i am using flash 4...the website is http://www.zodiacink.com if you'd like to see what i'm talking about. Just click on the tour button. If anyone could help me, it would be GREATLY appreciated. Thanks!

  2. #2
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192
    I had a look at your site (nice I like it :-) ), and the tour. I don't know the file size but it loaded very quickly on a T3+ connection (but then I suppose everything does) and it looks very cool.

    There isn't to much I can offer to help I am afraid, general help fourm mught be a better place to go. But I have one or two suggestions.

    Jpg's, also was increase file size drematicly, try a lower quality and see if you can get a way with it, or better yet use vector images instead. The same goes for music. I don't know if you have any sounds (I am using a University computer, which has had its speaker ripped out). It was fine with out music or sounds if you had any.

    Lack of keyframes or not will not change the swf file size. This is because of the way swf works. When exported to swf every frame in a flash movie becomes a keyframe. For example if you import an swf file into a fla file every frame is a keyframe.

    The same goes for tweens. For this reason the more frames you have the larger the file is going to be. I noticed in your tour that there were a lot of pauses (not choppy pauses, intended I imagine). See if you can set up a small symbol which will pause the movie for so long (5 secs or something) and then resume playing it. This way you can detete extranious frames. Also motion tweening, the longer the tween the lager the file size. This can actually make quite a drematic difference.

    And last but most deffinely not least, uses symbols as much as possible and edit thier colour or transparancy in the intance dialouge box. This if implemented correctly will cause file size to reduce a lot.

    Good luck, let us know how it goes.

    Allan

  3. #3
    Member
    Join Date
    Apr 2001
    Posts
    32

    Smile thanks.

    Thanks a lot! I'm going to try some of the things that you suggested. I did try to fix the whole "too many keyframes" thing a while ago. There were a bunch of things that you said in your post that I didn't know about, such as the whole pausing thing. I'll tell you how it goes though. hopefully well. Thanks!

  4. #4
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192

    Smile

    The pausing thing works well for me, but I have no idea if others use it or not (anyone else?).

    Good luck.

    Allan

  5. #5
    Member
    Join Date
    Apr 2001
    Posts
    32

    Thumbs up the pausing thing...

    I tried the pausing thing and it greatly reduced the number of frames that was in my flash movie. However...when I exported it, it was still 528k, and took FOREVER to download at 28.8. I can't figure out why this is happening. I thought for sure that it would work. When I go into the bandwidth profiler thing, it tells me that my movie is 732 frames long, and the preload is 1921 frames. How can this be, first of all, and how can I fix this. Oh my gosh, I'm gonna scream in like two seconds! My boss was laughing at me, but I don't think it's that funny at all...sigh. Well, any ideas? if so, they are greatly appreciated.

  6. #6
    hey dude,

    looks really nice.

    you don't seem to have any jpgs other than the little visa and mastercard icons and no sound either so it certainly does seem weird that it's so fat in size. are you using symbols correctly for example is the logo at the top a symbol so it only loads once - or is it a seperate piece of artwork each time it fades in and out. You'll know if you are setting up symbols correctly because like me when i first started using flash you'll end up with a whole list of 'tween' symbols when you're tweening artwork that hasn't been converted to a symbol, and you'll go hey where did they all come from.

    the other thing is... how are you doing the transition - are you fading everything on the stage to alpha zero, or do you have one symbol that is a white rectangle on top of everything that fades from alpha zero to alpha 100%. obviously the second solution would take up much less space and is easier to control.

    if you have symbols sorted sorry I blathered on about it.

    sometimes flash just makes things fat and who knows why, i really think it might have something to do with the fades for eg. i made a little flash 5 detector and all it had where two text variable fields and a fade in and out, it was a tiny 100px by 100px and it was still like 30k! (see http://www.enzymedesign.com.au)

    but hey it cranked along on my cable connection - maybe you should just put a warning on it letting >56k users know the wait they can expect.

  7. #7
    Member
    Join Date
    Apr 2001
    Posts
    32

    Smile thanks!

    I want to thank you both very much. I tried a combination of things that were mentioned, and it cut the file size by like 1/2! I also completely redid the part where the turtle's arm moved, which was like 99.9% of my size problem. I think I still have to build another preloader, so people don't get impatient waiting for the thing to load, but other than that, everything's gooe! I am so happy!

  8. #8
    Member
    Join Date
    Apr 2001
    Posts
    32

    Thumbs up okay, another problem.

    I thought I had a handle on the whole making a symbol to pause the movie thing, but apparently I don't. I uploaded my tutorial again, and the places where I told the symbol to pause it just stop it. I don't know why this is happening because the stupid thing works great in flash. Can someone you explain to me how to make a symbol that pauses the movie. I seriously thought I had it, but i guess I was wrong. Thanks!

  9. #9
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192
    It is quite simple.

    In the main timeline (or the movie that you want to pause), make a new keyframe and stick in a stop action.

    Then make a new symbol and put that on a new layer called pause.

    In the new symbol you need three frames, the first sets up a varible to be 0 (eg a=0). The second is totally blank. The third has the following actionscript:

    If (a>25)
    Tell Target (/)
    Play
    End Tell target
    Stop
    Else
    a=a+1
    End If
    Goto and Play 2

    This is a simple counter which when it reaches 25 (in this case ; change it for different pauses) will play the target (in this case the main timeline).

    I am not entirely sure about the syntax above since I don't have my copy of Flash with me, but the idea is right.

    So on the pause layer in the main movie all you need is a keyframe everywhere you want a pause with the movie (symbol)describled above in it and an empty keyframe after that to remove the movie from the timeline.

    I hope that made sence. If not just say and I'll try and walk you through it. Remember though that the lenght of the pauses depends directly on the frame rate, ie if you frame rate is 25, then the symbol above will pause the movie for 1 sec. Also this depends on the computer which is usinging it. Say it can only manage 1 frame a sec then the movie abot will take a 25 sec pause. Just something to keep in mind.

    Congrate on getting the movie size reduced by 1/2, that is no mean feat.

    Allan

  10. #10
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192
    One more thing:

    If it didn't make any difference to the movie size before try it with out the pause symbol. It works for me (but . . . ). Only do this if it is easy (or you get paided by the hour), apart from reducing file size the pause movie also keeps thing neet and tidy in the authoring environment.

    Allan

  11. #11
    Member
    Join Date
    Apr 2001
    Posts
    32

    i'm dumb

    I tried to make a pause, and it didn't work. I think it's mostly cause I have no idea what the heck i'm doing when it comes to action script. If possible, could you walk me through it. If not, it's okay. I am getting so sick of doing this stupid thing. Sigh.

  12. #12
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192
    Okay here goes (it sucks when it don't work, but when it does . . . :-) )

    In this I will assume that you have used the main time line instead of a movie clip (the thing that you want paused).

    1. Make a new layer in the main time line, name it 'puases'.

    2. Where you want a pause insert a keyframe (f6 on a mac) on the layer that you just created. Keep it blank. Double click on it to edit the frames properties and add the action 'stop'.

    3. The very next frame in the same layer, put another blank keyframe.

    4. Open the library (if not already) and using its little pop up menu select 'create new symbol'. In the dialogue box that appears select 'moive' and call it 'pause movie'.

    5. Click 'okay' and you should be in that symbols timeline. On the layer that is alrealy there insert three blank keyframes in the first three frames.

    6. Double click on the first of these keyframes, this will allow you to edit the frames properties. Click on the + meun and choose the option to 'set varible' (I think it is that, it might be something similar). Name this varible 'a' and set it to 0 (zero). Click 'okay'.

    7. Double click on the next frame. Do the same as above and set a varible, also called 'a' but the difference is that it must be equal to 'a+1', making a simple counter. Click 'okay'

    8. Double click on the next frame. Add the action 'if' and use the condition 'a>25'. Then add another action 'tell target' and in the target box type '/' (this targets the main timeline. Now add another action 'play'.

    9. Click on the 'if`' part of the actionscript and click on 'add if/else if statement. Now click on the new else statement that has appeared in the action script. And add another action, 'Goto' and clcik the option to 'goto and play'. Set this to goto and play frame 2.

    10. That's the pause movie set up. Go back to the main time line.

    11. In the first of the two keyframes set up in steps 1 and 2 (the one with the stop command) drag the newly created pause movie.

    12. Repeat steps 1, 2 and 11 for where ever you want a pause.

    13. Sit back and have a coffee.

    Good luck, I'll check back soon

    Allan

  13. #13
    Member
    Join Date
    Apr 2001
    Posts
    32

    Smile thanks!

    Okay, I did the site without the pauses, but I am going to go try the whole pause thing right now. My boss is STILL concerned that it loads to slowly, and I don't know what I am going to do about that. He wants me to build some crazy preloader into it, and I don't know how to do it. And he wants movies loading in the background. He wants me to do all this stuff, yet when I ask him how, he's like, I don't know. Sigh. But anyway, Thank you very much for your help. I'm going to try this right now!

  14. #14
    Junior Member
    Join Date
    May 2001
    Posts
    6

    preloader

    here's the actionscript for a slick pre-loader. It requires 2 movie clips. one called "loader" which can just be a box that says "loading..." the other is a bar inside the "loader" MC. The "bar" MC will scale based on how much of the movie is loaded.

    for extra slick points, put a text variable in the "loader" MC called "feedback". it will display in text, the amount loaded.

    don't forget to name your variables.

    in frame 1:

    //preloader
    bytes_loaded = _root.getBytesLoaded();
    complete = _root.getBytesTotal();
    feedback = "loaded: "+Math.floor(bytes_loaded/1000)+"/"+Math.floor(complete/1000)+"k";
    percent = 100*bytes_loaded/complete;
    setProperty ("_root.loader.bar", _xscale, percent);
    //end preloader

    frame 2:
    if (percent<99.5) {
    gotoAndStop (15);
    }


    Oh yeah, this is flash 5 syntax.

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