Paul
If you wanna pass a parameter to the function, you would do it like this:
<A HREF='asfunction:myFunctionName,myParameter'>invoke the function</A>
Due to the fact that inside the invoked function the "myParameter" is
allways a string,
you have to use a delimiter if you wanna pass more than one parameter.
The fuction called will use the delimiter to split up the string into
seperate values.
Something like this:
<A HREF='asfunction:roleCall,Lisa|Bob'>invoke the function</A>
and then myFuntion would have to look something like:
function roleCall (name) {
var bothNames = name.split("|");
trace ("first name: " + bothNames[0]);
trace ("second name: " + bothNames[1]);
}
These examples a losly copied from the master himself Colin Moock, and his
book "Actionscripting: The Definitive Guide".
I strongly recommend visiting his site, read som of the free chapters, and
then buy the book.
http://www.moock.org/asdg/
Hope this helps you out
/peo
p...@bandage.dk
www.bandage.dk
"Paul" <pa...@sixzeds.com> wrote in message
news:9iel8f$b52$1...@forums.macromedia.com...
thanks alot for that and thanks to Mr Moock.
Paul
> I strongly recommend visiting his site, read som of the free chapters, and
> then buy the book.
I would totally second that. It will accelerate your understanding of AS,
especially the OOP end of things, immensely.
Sincerely,
Adam Burtch
Macromedia Tech Support
a lot of users report that using the asfunction command will crwash
their browsers.
another alternative is to store all of your functions in an
associative array, and then just call the array index by name that you
want to run.
you can do this because functions are treated similar to variables and
this you can store them in arrays.
here is some more info on this:
http://i-technica.com/flashlist/index.asp?n=1375
hope that helps...
mike chambers
On Tue, 10 Jul 2001 15:32:48 +0200, "Michael Peo" <p...@bandage.dk>
wrote: