dcsimg
A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: banner advice

  1. #1
    Member
    Join Date
    May 2004
    Posts
    78

    banner advice

    Hi I have been asked to create a banner ad - mostly just moving text but there are also 3x images which I want to pan across during the movie.
    I have a few problems which Im desperate for help with if someone would be so kind...

    1.The play back is really jerky for the images - how can I fix this? At the moment, the image is on the time line and I have just motion tweened it to create the panning movement. Frame rate is 24fps.

    2. The whole animation is roughly 15 seconds long but coming in at 62kb. I read somewhere that it would be better to split this up into smaller movies and load seperatly? Is this a good idea? If so, how would I do it?

    Thanks so much....

  2. #2
    Junior Member
    Join Date
    Jul 2007
    Posts
    29
    Hi, unless you've already cut the images down to the lowest common denominator (in my case usually a png with transparencies when parts not essential) I'd think the best step may possibly be to script the animations, from what I've learnt so far there's a chance you may be throwing in a little overhead.

    This thread I found may help:
    Tween vs script

    As for the splitting up I'm unsure but someone will have an opinion on it

    One small little question I had was this panning you speak of is just 3 images linked together right?
    (like this outdated and inefficient heap of junk I made ages ago )
    ..or each of the images panned separately being wide images?
    Last edited by mikel83; 07-24-2007 at 09:32 AM.
    Ledwoon - Random Website for personal development, feel free to look about

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    29
    Just to get back to you again on it, I made a mini ad banner now & despite no effort of the tween vs script just yet (will do later) I found the export settings made my file movie look just as good yet 25% of the size. I've been 100%ing a lot recently but setting the quality to 80% gave me a 16kb file instead of the 59kb at 100, 50% gave me a 9kb file & still looked ok. Here's a link but hopefully you're on your way there anyway.

    http://www.freewebs.com/ledwoon/temp/ads.html

    Ok, jerky too
    Ledwoon - Random Website for personal development, feel free to look about

  4. #4
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    In your library right click on the images you've imported and go to properties. There you can choose a custom jpeg quality for export and degrade it as much as possible. You can load in external swf's. However, keep in mind you banner is only 15 seconds; loading in external swf's can cause unpredictable behavior at slower speeds and create one ugly banner. This technique is not recommended for animations that must be played from beggining to end without interuption. You can script the animation. It will most likely only shave a few kb off depending on how much is going on with your animations on the timeline. To do that you use the Tween method that you have to import

    import mx.transitions.Tween;//this is your tween animation class shipped with flash
    import mx.transitions.easing.*//this is the easing which is not necessary but most likely you'll use it

    var tw:Tween = new Tween(myMC,"_x",Bounce.easeOut.myMC._x, 500,1,true);
    //store the tween to tw then input params(movieClip,property,easing,start,finish,time ,true=seconds-false=frames for time

    tw.onMotionFinished = function(){
    trace("Your tween has finished");
    }

    this will tween an animation across the x axis from wherever it is to 500 and it will bounce out for an ease. You can tween any property. You can also do multiple properties at once. If you really want to get into using actionscript for tweens then you can use something like Fuse which is an external engine for flash and it's free. It's better at doing multiple tweens at once than flash is.


    PS. Sometimes you just can't get the full effect you want when designing a banner. Try to keep it below 35kb, and if that isn't possible then maybe you'll have to change your design. That is one of the complications of banners.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  5. #5
    Member
    Join Date
    May 2004
    Posts
    78
    thanks so much for replying and all your help so far. I will look at this again tomorrow and let you know how I get on!
    I wasnt sure what the general rule was when it came to file sizes..
    62kb seemed a bit big and I wasnt sure what would happen if my client (or the people who will upload the file) come back to me and ask for it to be reduced.

    Also - the panning movement im doing is with 3X still imageS which have been imported to the stage - they are all slightly bigger than the document size to allow for the panning to happen -
    Basically some text fades up and an image - all fade away - then more text fades up and another image - fading away and finally same thing - text then image fadeout

    Ill try out what you said about using the scripting though. Im assuming this will atleast smooth out the movement?

    Am I wrong in thinking that because my banner will have 3 parts to it I couldne make these as seperate swfs and load them in some how?

  6. #6
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    It should smooth the movement. 3 images and some text shouldn't take up that much space. It's all going to come down to the compression. If the image is slightly bigger than the stage make sure to trim the image as much as possible before putting it in.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  7. #7
    Member
    Join Date
    May 2004
    Posts
    78
    Thanks again for all your help. This is really great. I really appreciate it!

    Could someone help me with being able to use action script to move my jpeg across the stage?
    The code that was posted earlier:
    mport mx.transitions.Tween;//this is your tween animation class shipped with flash
    import mx.transitions.easing.*//this is the easing which is not necessary but most likely you'll use it

    var tw:Tween = new Tween(myMC,"_x",Bounce.easeOut.myMC._x, 500,1,true);
    //store the tween to tw then input params(movieClip,property,easing,start,finish,time ,true=seconds-false=frames for time

    tw.onMotionFinished = function(){
    trace("Your tween has finished");
    }

    do I turn my jpeg into a symbol and attach this code to it?
    Im not having much joy with it at the moment....

  8. #8
    Member
    Join Date
    May 2004
    Posts
    78
    actually heres my flash file to explain further:
    basically the file is like this:

    1st part :
    text flies in - which is all fine
    image is suppost to fade in and pan up - then fade out (at the moment it just pans as I dont know where to place the fade in and out script)

    2nd part:
    text flies in - all fine
    image then fades in and zooms in - halts then fades out
    (i desperatly need help with this one!)

    Im sure its quite easy but I just cant seem to get it working?
    Id appreciate any help on this! thanks
    Attached Files Attached Files

  9. #9
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    The code works on movie clips. Take anything that you have that you want to tween and make it a movie clip. Then give it an instance name and put that same name in the section of the code that says myMC. You can use that same code to make something fade. The only line you have to duplicate is the var tw:Tween line. Change tw to something like tw2. If you put those lines one after the other they will all happen at the same time. That is why I gave you the onMotionFinished. Anything you put inside those brackets will happen after the Tween assigned to var tw has finished. There is a whole list of commands like that. If your on a pc you can go to C:/program files/macromedia/flash/en/first run/classes/mx/transitions and open the Tween.as located in that folder. That is the class that you are importing with the first line of the code I gave you. In it you can scroll down the code and see all of the different capabilites it has. I'm not sure if you can also search Tween in the help files but I don't think so.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  10. #10
    Member
    Join Date
    May 2004
    Posts
    78
    thanks again for your help. Im not sure if Im being really thick but I cant seem to get it to work?

    import mx.transitions.Tween;//this is your tween animation class shipped with flash
    import mx.transitions.easing.*//this is the easing which is not necessary but most likely you'll use it

    var tw:Tween = new Tween(myMC,"_x",Bounce.easeOut.myMC._x, 500,1,true);
    //store the tween to tw then input params(movieClip,property,easing,start,finish,time ,true=seconds-false=frames for time

    tw.onMotionFinished = function(){
    trace("Your tween has finished");
    }


    It keeps saying syntax error for some reason on the 1st and 2nd lines of the code?

  11. #11
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    which verson of flash are you using. I'll post up a fla in a second.
    Last edited by mneil; 08-22-2007 at 12:08 PM.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  12. #12
    Member
    Join Date
    May 2004
    Posts
    78
    I have Flash cs3 so I guess this can read all files

  13. #13
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Take a look at that fla that I uploaded. You shouldn't get an error. Are you using AS3 or AS2?
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  14. #14
    Member
    Join Date
    May 2004
    Posts
    78
    Im using as2 - the fla you uploaded seems to work just fine thanks!

    Ive managed to make the box fade on as its moving but I dont suppose you know how to make it remain at 100% opacity for a few frames and then fade off again before the box reaches its final destination?

    Sorry is this isnt straightforward? Im not sure whats easy, basic actionscripting and whats complicated!

  15. #15
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    The easiest way would probably be to use setInteval to delay the fade:
    var Int = setInterval(go,1000)//Int is for reference,go is the function,1000 is time in milliseconds
    function go(){
    clearInterval(Int);
    //put your fade tween here
    }

    forgot to clear the interval, otherwise it will loop
    Last edited by mneil; 07-25-2007 at 01:33 PM.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

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