PDA

View Full Version : can you achieve this effect via code


rye69uk
12-20-2007, 09:13 AM
Hello all,

Does anyone have an idea how this affect was created?

http://www.designgalaxy.net/show/1638/index.html (click on any of the menu items to see the transition effect on the green background)

I think it is scripted and that's what I am trying to achieve, not just tween the whole thing.

Sorry if this is already somewhere on the forums, but for the life of me, I can't think of an accurate description for the transition effect so searching for it is prooving a little tricky :p

Thanks for your help,
Ryan

Alexus
12-20-2007, 09:37 AM
Nice effect. :)
As you can see, when effect starts there are only green rectangles. So you can can createnumber of them, put them into the array and then process in onEnterFrame.
I prefer to make a classes in such case.
class MyGreenRect
{
var clip:MovieClip;
var speed:Number;
var pos_x:Number;
var pos_y:Number;
...

function ProcessStates(dt:Number)
{
// cfll this function in the onEnterFrame event
// and make transition here
}

}

You can see this approach at our Open Source Menu (http://flashmenulabs.com/opensource) code

rye69uk
12-20-2007, 11:27 AM
Hi Alexus,

Thanks for the quick response!

I've not really used the OOP side of actionscript much before and have little experience with classes.

Would you be able to provide a basic example of this in action based on the example below (the opensource example you pointed me to was fairly hard to follow)?

Thanks a lot for your help

Ryan

thomas88
01-10-2008, 07:29 PM
well i need too the code which you get

horse portraits (http://www.paintyourlife.com/galleries/horse-portraits.asp)