PDA

View Full Version : html text box with links to a clip?


BLATZ
06-21-2005, 03:10 PM
Hi!
I made a scrolling dynamic text box that gets the text from a text file at run-time. The text is in html and I want to make links that make pictures appear in my flash movie.
Can I do that?

The text box is contained in the same movie as i want the pics to be.

Thanks!

Ruben
06-21-2005, 03:27 PM
Well I assume you would know how to display your picture using a button in flash. If so asfunction (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary073.html) will help you out. This function allows you to call actionscript-functions with hyperlinks in html-text (which is placed in a textbox in the swf).

- Ruben

BLATZ
06-21-2005, 03:59 PM
I've read about that but I cant get it to work.

I'm supposed to define a fuction that loads the movie clip but where?

and what parameters do I pass the symbol name or the instance name?

when I try it the clip is already looping before i click the link!

I'm just not that experienced in flash, I must be missing some basic concept.

Ruben
06-21-2005, 04:26 PM
well here's an example:

function showPicture(){
_root.createEmptyMovieClip("myPicture",_root.getNextHighestDepth());
_root.myPicture.loadMovie("http://ruben.studiogazal.com/clubg/i_scream(64x64).jpg");
_root.myPicture._x = 50;
_root.myPicture._y = 100;
}
myTextfield.htmlText = "this is my html-text, please click my <b><a href=\"asfunction:showPicture\">link</a></b>";

Go nuts with it

;) - Ruben

BLATZ
06-21-2005, 04:52 PM
Thanks man! Thats just what I needed.

Ruben
06-21-2005, 05:48 PM
No problem

;) - Ruben