×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Hyperlink in text cast member

Hyperlink in text cast member

Hyperlink in text cast member

(OP)
I am reading an external text file and putting some of the text into a text cast member. I would like to use html formating and have hyperlinks show - with a mouseover hand, etc. - and automatically launch a browser from my projector (the executable will be distributed on a DVD-ROM). The hyperlink formating does not show; nor do I know how to set up my project so that it detects the default browser on the user's computer. I would appreciate any help you can provide. Thanks.

RE: Hyperlink in text cast member

Set useHypertextStyles to TRUE

You don't need to specify the default browser. Just place this MovieScript:

CODE

on hyperlinkClicked(me, data, range)
  if offset("http://", data) then
    gotoNetPage(data)
  end if
end hyperlinkClicked

Kenneth Kawamoto
www.materiaprima.co.uk

RE: Hyperlink in text cast member

(OP)
Thank you. I attached the above behavior to the sprite of my text cast member.

What I am trying to do is to pull up, based on choices I click on a menu, different html files residing on my hard drive into my text cast member. I use the command member("whatever").filename=<filename>

This is, apparently, not working because the hyperlinkclicked handler is not being called. Please tell me what I am doing wrong. How can I get my links to work when I pull in external linked html files into a text cast member?  

RE: Hyperlink in text cast member

(OP)
Yes, please. I would appreciate that. Again, I am attaching the behavior to the sprite of the text cast member, but when I click on the sprite nothing happens. Thanks.

RE: Hyperlink in text cast member

Create a new movie in 320 x 240. Then put this in the frame 1:

CODE

on exitFrame(me)
  _movie.go(_movie.frame)
end exitFrame
Create a HTML file called "external.htm" and place next to the DIR file:

CODE

<html>
<head></head>
<body bgcolor="#FFFFFF">
    Thank you. I attached the above <a href="http://www.google.com/">behavior</a> to the sprite of my text cast member.
</body>
</html>
Create a Movie Script, then run the movie:

CODE

on prepareMovie()
  mem = new(#text)
  mem.fileName = _movie.path & "external.htm"
  mem.name = "externalHTML"
  mem.width = 300
end prepareMovie

on startMovie()
  channel(1).makeScriptedSprite(member("externalHTML", "UI"), point(10, 10))
end startMovie

on stopMovie()
  channel(1).removeScriptedSprite()
  member("externalHTML").erase()
end stopMovie

on hyperlinkClicked(me, data, range)
  if offset("http://", data) then
    gotoNetPage(data)
  end if
end hyperlinkClicked

Kenneth Kawamoto
www.materiaprima.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close