Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads | All Downloads

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Swish Templates
   SWiSH Climax
   GimpTalk
   Idea Designs
   Sposatoettore
   Try Acai Berry Diet
   Download Free Ringtones
   Swishzone

Manage your site with Flax Article Content Management System
Creating Elastic button
Category : SWiSHMax | Level : Intermediate | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Hi guys,

this is my first tutorial for creating the elastic button using the advance method of Swishmax scripting!

Elastic Button Preview

Here it is:

1.Open Swishmax and in the file menu click new.

2.In the current scene (Scene_1) do this:
-create the shape object of your choice. and name it "roller".
-group it as sprite and name it as "roller" again.

3.For the shape in the sprite, add this code:

on (rollOver) {
jump = false;
xskal = xskal * 2;
yskal = yskal * 2;
roller = 1;
}
on (rollOut) {
xskal = 100;
yskal = 100;
roller = 0;
}

4. For the Sprite object, add this action:

onLoad () {
xskal = 100;
yskal = 100;
jump = false;
sX = 0;
sY = 0;
multiplikator = 0.800000;
ratio = 0.300000;
}
onEnterFrame() {
if (!jump) {
sX = Number(sX * multiplikator) + Number((xskal - _xscale) * ratio);
sY = Number(sY * multiplikator) + Number((yskal - _yscale) * ratio);
_xscale = _xscale + sX;
_yscale = _yscale + sY;
}
}


5.That's all.

6.Test your button!

Download Example

ENJOY wink.gif


All rights reserved - swish-db.com