What is the best way to make lines/boxes move with button selection?

I am new to Flash and use Flash MX. I saw a site online that I really enjoyed and would like to make a similar one to it, though I’m not sure what is the best way to do it. The site is
http://www.morimotorestaurant.com/main.html I like how the lines and boxes appear and then the buttons. My question is, what is the best way to do this? I’ve seen lines and boxes appear and move around on a variety of flash sites, so HOW IS IT DONE? Is it better to create the entire document and have certain sections reveal with a mask or is it better to use tweening to make it look like the lines/boxes are getting longer/bigger? Should action script be used in this sort of thing? I have no idea. Any advice is really helpful! If you’ve done this sort of thing on your site, what was the best way for you? Can you give me an example? Thanks

in order as they appear:

tween, tween, mask, mask, mask.

How to do the tweens: combine scale and shape tweens.

How to do the masks: Make the masks movie clips that have lines moving down (being tweened down).

Hi Jingman,
Thanks for responding. Could you post a .fla as an example? It doesn’t have to be elaborate, just to give me a visual of what you mean. Thanks!

Also, why would I make the masks have lines that are moving down? The lines on the site are moving down and across? Thanks for your help!

I’m not at a flash capable computer at the moment, so I can’t give you an .fla example.

You can make that masking effect with a combo of AS and clips.

Scenario:

You make an MC of a rectangle (boxMC).
You make an empty MC that will be the mask.

Within the empty MC you write some AS (prolly a for loop) that attaches a bunch of the boxes in the clip, loading each one higher than the last, and farther to the left (or right, depending on where you start, just so long as you are moving across the clip to fill it up).

Now in the first frame of your boxMC, you write some AS that randomly changes the height and width of the bar, and assinges it a “speed” value when it loads. In that same AS, write a function for “onEnterFrame” that moves the boxMC (itself) down by the value of “speed” each frame (this._y += speed).

Hi again. I’ve read your reply a few times but I don’t really understand. But let me see if I can sum it up… You have MCs within a mask. The mask has action script that loads the MCs at different points. The MCs themselves are created with tween effects, etc. Is this correct?

What about the part where when you click on a button, everything reverses itself? How would you do that? Thanks for your help!

put a MC on the main timeline, a line a box whatever, then place this code in the actions on the mc.

The 200’s give you a start off position the 500’s are your scale and the last two figures are the speed of the scale/tween

play around and see what happens.

onClipEvent(load) {

_x = 200
_y = 200

}

onClipEvent(enterFrame) {
this._xscale += (500 - this._xscale) / 15;
this._yscale += (500 - this._yscale) / 10;
}

Wilma, why would you code something that is easily created w/ a tween?

Fizicst, check out the lessons (help> lessons). They are great for beginners.

not really the point though don’t you recon - it may be a simple piece of code to o a simple tween but its what you can build on to it thats the key and where that might take you.

The only way your gonna learn more complicated AS is to take the little steps first, and presumably Fizicst wants to learn AS otherwise he’d have gone to a non AS forum.