if you visit this guys site, you will see that the pages rescale to different sizes. I cannot figure it out:
http://www.pimago.de/flash_en.html
I’m sure this has been asked here before but I’m not sure what to type in the search option.
I use flash mx6 not 2004.
Thank you and I hope you will get time to look into this
I’ve seen a similar effect at http://laco.wz.cz/tween/?page=examples but the FLA’s are MX2004. I’m going to contact the webmaster and ask for a MX FLA. I’ll let you know what I find out.
thanks cool, you’re a star
That is somewhat simple provided you are familiar with actionscripting.
There is several ways of achieving the effect; you’ll have to decide what is best for you.
The simple way:
- create a movie clip (mcSquare) and a button (btn1)
- add this code the the mcSquare mc (not to the frame)
onClipEvent (load) {
end = 3 ;
isHeight = 28 ;
isWidth = 519 ;
//play();
}
onClipEvent (enterFrame) {
height = isHeight-_height;
_height+= height/end;
width = isWidth-_width;
_width+= width/end;
}
- then, add this code to the button btn1:
on (release) {
_root.mcSquare.isWidth = 300;
_root.mcSquare.isHeight = 400;
play();
}
No matter the size of you initial Square, when you load the movie, it will take the shape/size isHeight = 28 ; isWidth = 519 ; Then, when you click your btn, it will take the shape/size _root.mcSquare.isWidth = 300; _root.mcSquare.isHeight = 400;
From here you can just use your imagination and have fun.
THE OTHER WAY…
Or my favourite way of performing easing (the one I use for every single easing effect) would be the Penner Easing Equations.
The Penner Easing Equations is more complex, but can achieve more spectacular easing effect (bouncing, exponentials etc) and would be too complicated and too long to explain here, however, if you are willing to learn by understanding how it works through examples, he is distributing his work for free (crazy): http://www.robertpenner.com/easing/
Hope this help ya, or at least put you on the right track.
JFHoule
jfhoule,
I used your first method and that works great. Ok now i need to figure out how to get different text in the differently sized clips.
I hve three buttons in my sample fla, home, links, contact.
When I press say the links button, i need link text etc.
Thank you for your time, i’m very new to this.
Again, there are several ways for this,
easy way:
you can add a gotoAndPlay(frame # contianing your text or whatever) to your “on (release)” action for your btn1 , then it will send you to a specific frame, but in your time line, the mcSquare will still be there, but you can have however many keyFrames, each containing a different text.
So you have a layer for your buttons (links), a layer for your text, and a layer for your mcSquare…
(fun and easy)
Other ways:
load external movie.swf “onclick()”, or perhaps create another mc with an external xml data.
enjoy!