A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Basic animation (?) question

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    19

    Basic animation (?) question

    I've got a site with 3 buttons (each button represents one section). let's say 'news', 'contact' and 'gallery'. After I press 'contact' button i want news to dissapear and my contact information to appear. When I press gallery button I want an actual content dissapear and pictures from my gallery appear.

    Could anyone explain me basically how should i start? Do I have to make every section a movieclip and then after pressing button let certain movie clip dissapear and another one appear? Or am I tottaly out? I would appreciate even simple hint.

    Thanks

  2. #2
    Senior Member eraser_ad's Avatar
    Join Date
    Apr 2004
    Posts
    189
    basically, make each section a separate .swf and make main scene .swf which will contain the buttons and other general graphics.
    and on pressing one of the buttons (i mean on(release){ ) make the appropriate .swf load into the main .swf using loadMovie. if you make all your .swf's load into the same level before the next one loads it will kick out the one in there and take its place.
    I hope it makes some sense, I just woke up.
    some smart citation is coming here soon

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Location
    finland
    Posts
    1
    it makes perfect sense. thank you. i would like to know yet that how to make an effect where e.g. when 'news' are 'kicked out' they slowly scroll down off the site and 'contact info' will scroll up and takes the same place as 'news'.

    (hopefully i'm making a sense with my english)

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Your buttons should be movie clips, with the animation built in. The slide down should stop at the bottom and it should have button code on it at that frame. Then, the finish animation should slide back up and stop. Then, on each button, you use an if statement to make sure the others are up, and if not, make them play the up animation part. The code would look something like this:

    if(_root.news._currentframe == 33){
    _root.news.play();
    }
    if(_root.gallery._currentframe == 33){
    _root.gallery.play();
    }

    if(_root.contact._currentframe == 33){
    _root.contact.play();
    }

    Frame 33 would be the bottom of the tween, where they stopped at the bottom. The play() call, sends them back to the top, where they stop, "if" they were down to start with.

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