Hi Michael
There are a few ways to approach the issue:
1). In Flash 5 and MX you can use the asfunction to call a Flash function
which in turn can use the getURL method, please note the following syntax as
it is very important:
To call the behavior attached to the Macromedia Flash sprite, use the
following syntax:
<ActionScript>
getURL("Event:myDirectorFunction, \"myParameter\"")
</ActionScript>
In Director, use:
on myDirectorFunction me, param1
put "param1 = " & param1
end myDirectorFunction
-- "param1 = myParameter"
To call a Director Movie Script, use:
<ActionScript>
getURL("Lingo:myMovieScriptFunction(\"myParameter\")")
</ActionScript>
In a Director MovieScript, use:
on myMovieScriptFunction param1
put "param1 = " & param1
end myMovieScriptFunction
-- "param1 = myParameter"
Okay, so there is the asfunction method, you could also use the single quote
in Flash to enclose the overal getURL call and double quotes to enclose any
string parameters. I'm not sure I've ever used getURL calls such as these
inside of a flash text field.
2). However, you can pull a different stunt that might help:
<a href = "myDirectorFunction, param1, param2"> in the text of the field,
and on the behavior that is attached to the flash sprite, simply put:
on getURL(me, sURL)
put sURL
end getURL
and then split the string up inside of Director to get your parameters and
actual method to call, convert the method to a symbol and use a sendsprite
or call to call the appropriate function etc...
I'd suggest reading my article in the Developer area of Macromedia's website
but I just noticed tonight that all my revisions got lost between the
original version and the release version. Meaning that there are a crap load
of typos etc... I will contact Macromedia to get it updated: The general
tone of the article is still valid but some of the code references are
inaccurate, if you want to read it as it stands right now:
http://www.macromedia.com/devnet/mx/director/articles/flash_in_director.html
is the URL, but beware there are some serious issues with the current form.
Not sure if any of the above helps at all.
Sincerely
Mark R. Jonkman
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Mendelsohn,
> Michael
> Sent: Tuesday, September 02, 2003 10:47 AM
> To: [EMAIL PROTECTED]
> Subject: <lingo-l> Flash text box link not triggering Director behavior
>
>
> Hi list...
>
> I have a Flash asset with a text box that has a link in it. In the
> Flash property inspector there's a link field, and I figured you could
> type actionscript there to be executed, just like the link field in the
> text inspector in Director where you can type a lingo handler. Maybe
> I'm doing something wrong, but none of the below work when filled into
> that field in the Flash property inspector. I want the link in the
> flash text box in that Flash asset to trigger a Director handler. It's
> easy enough with getURL in Flash on a button, but apparently, this is
> not intuitively the case for text boxes!?!?
>
> Any tips are appreciated, as always.
> - Michael M.
>
> _______________________________________________________________________
>
> event: linkFromFlash(www.eqsafetysys.com) -- error comma expected
> event: linkFromFlash(me, www.eqsafetysys.com)
> event: linkFromFlash(me, \"www.eqsafetysys.com\")
> event: linkFromFlash("www.eqsafetysys.com")
> event: linkFromFlash("www.eqsafetysys.com");
> getURL(linkFromFlash(www.eqsafetysys.com)) -- does nothing, with or
> without the semicolon
>
>
>
> [To remove yourself from this list, or to change to digest mode,
> go to http://www.penworks.com/lingo-l.cgi To post messages to
> the list, email [EMAIL PROTECTED] (Problems, email
> [EMAIL PROTECTED]). Lingo-L is for learning and helping
> with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]