View Full Version : Flash MX - Common function???
rasarasan
November 6th, 2002, 07:08 AM
I have a movie where i have small clips which has to perform the same function on a mouseevent. Instead of attaching the same script in all the movieclips, i want to put them in a common function and just call that function everytime.
Is this possible in actionscript?
if so how?
Any help on this is appreciated.
Thanks
richie
November 6th, 2002, 07:24 AM
post here the script you plan to make a function, i can see if can help then...
h88
November 6th, 2002, 07:25 AM
Hey rasarasan,
Well, yep, this can be done! try something like:
function Link(){
//ur commands!
}
button.onRelease = Link;
yours,
h88
h88
November 6th, 2002, 07:25 AM
Originally posted by richie
post here the script you plan to make a function, i can see if can help then...
hehe, we posted at the same time =)!!
richie
November 6th, 2002, 07:38 AM
hehehe, i just started here...
well, i think in this case you have to use functions with arguments:
function links(link){
trace("This button will go to the link " + link);
}
button.onRelease = link(file1.swf);
i'm a newby, so i don't know if it is 100% correct.
h88
November 6th, 2002, 07:51 AM
Why are you going that further when u simply can use getURL!
i think she wanted that thing:
stop();
function links(){
getURL("http://www.kirupaforum.com/");
}
button.onRelease = links
The Title was "Common function???", remember :)
yours,
h88
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.