Hi

My revised article is back online in the Director Dev center with all the
code revisions etc.. back in place. It can be found at:
http://www.macromedia.com/devnet/mx/director/articles/flash_in_director.html

Okay, that aside, if the goal is to simply to handle a standard link within
a Flash textfield and reroute it to a browser or for post processing in
Director then the following methodology will handle it. There is really no
need for fancy getURL event/lingo or asfunction to do this. I forwarded this
example to Michael earlier today from my Hotmail account but I'm not sure
whether he got it or not. Here goes:

In the hyperlink field of the flash property inspector, get rid of all the
asfunction, getUrl stuff and simply replace it with your
http://www.boston.com link as if you were working in Flash and not going to
be running it in Director. ie. In your textfield, select the text that is to
act as a link. Remove the getURL and or asfunction stuff and replace it with
your standard html link reference for boston.com.

Test your Flash movie standalone and see if your link works.. it should, or
at least it should do something. On my computer it opens a browser window
and displays http://www.boston.com when running as a test movie from Flash.

Cool hopefully. that works just as planned.

Next step:

Import the movie back into Director, for the heck of it, do it to a brand
new Director movie just so that it doesn't pick up any crud and keeps things
simple.

Next place it in sprite channel 1 and then add a go to frame script in the
frame channel for good measure.

Next right click on the flash sprite, choose script to generate a new
behavior. Replace the default on mouseUp handler with the following:

on getURL(me, sURL)
  put sURL
  if (sURL <> "") then
    gotoNetPage(sURL,"_blank")
  end if
end getURL

and then test the Director movie.

Click on the link should open a new browser window and display your
boston.com url. Simple quick and dirty. No messy crap to deal with.

Make sure your network preferences are set up to launch a browser window
when needed (in case like me you don't have that still set to the default
values).

Sincerely
Mark R. Jonkman

[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!]

Reply via email to