Search  

POWERFUL ONDOUBLECLICK() SCRIPT

HomeBrowse CategoriesFlashApplications and UtilitiesUtilitiesPowerful onDoubleClick() Script

Powerful onDoubleClick() Script

A very easy to use code that lets you use functions when you double click a movieclip.

Just copy the code in the timeline of your project that you need to use it and that’s all.

onDoubleClick(mc, function)

The first param, “mc”, is the target movieclip that will be doubleclicked, and the second is the name of the function that will be fired (without brackets)

Example:

Imagine that you have a movieclip called “ball” on the stage, and you want to move it 5 pixels by doubleclicking it, you just have to make your function, like:

function move(){ ball._x+=5 }

and then you just use the onDoubleClick() function and call move():

onDoubleClick(ball, move)

That’s all. The name of the function goes without the brackets.

Just 2kb.

FEATURED WORK

CLICK HERE TO SEE MORE FILES BY RANDOM

Posted 4 months ago

That’s cool. Is onDoubleClick a function or AS3 class? I have Adobe Flash CS3 but I am too confused by the new ActionScript. :(

Posted 3 months ago

2 cheap for this file:)..keep up the gaod work..

Posted 3 months ago

*Thingula *

this code is for action script 2 [AS 2.0], works in cs3 if you work on as2.

Posted 3 months ago

nice. thanks.

Posted 3 months ago

useful :)

Posted 3 months ago

so, what if I do this: on(click){doSomething()} onDoubeClick(){dosomethingElse()}

will I get a double of doSomething and a single of doSomethingelse? or will the second one overwrite the first one?

Posted 3 months ago

nope, you have to do it this way

function doSomething(){

... bla bla bla

}

onDoubleClick(my_mc, doSomething)

Posted 3 months ago