all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Dynamic Text Linking


Dynamic Text Linking army gd
6/9/2004 10:09:59 PM
flash actionscript:
I need to know if there is a way to link individual lines of text within a
scrolling text box to specific frames (within the same movie) or other movies
without turning each line into a stand-alone button. The text box is being used
as a menu selection area.

Thanks
Re: Dynamic Text Linking kglad
6/9/2004 10:26:55 PM
Re: Dynamic Text Linking army gd
6/10/2004 6:15:19 PM
I'll see if I can figure out how to do that. I don't know very much about action script (just fairly basic stuff).

Re: Dynamic Text Linking kglad
6/11/2004 4:04:33 AM
here's some sample code:

_root.createTextField("tbox", 1, 0, 0, 200, 100);
tbox.html = 1;
tbox.multiline = 1;
tbox.wordwrap = 1;
tbox.htmlText = "<A HREF=\"asfunction:firstF,frameX \">this is the first line
of text</A><br><A HREF=\"asfunction:firstF,frameY \">this is the second line of
text</A>";
function firstF(arg) {
gotoAndPlay(arg);
}
Re: Dynamic Text Linking army gd
6/14/2004 5:05:16 PM
I'll paste this in and check it out. I figured out how to write the function and am currently working on setting multiple parameters for it. Sometimes just need a little boost.

Re: Dynamic Text Linking kglad
6/15/2004 1:15:41 AM
Re: Dynamic Text Linking army gd
6/15/2004 3:41:30 PM
this is the code i ended up with (FlashMX), just incase anyone needs it. there
are a couple of buttons i had to turn off/on as well. i already had the
scrolling text box created in the timeline.

function menuFunct(param) { // function name and parameter //
gotoAndPlay(param); // action to be taken //
pauseB._visible = 1; // pause button turned
on //
playB._visible = 0; // play button turned
off //
}


text box properties (parameter for URL Link is different for each line
depending on the frame it goes to)

dynamic text, instance name, multiline, selectable, render text as html
url link: asfunction:menuFunct,1135 // function:function
name,parameter (frame number)
AddThis Social Bookmark Button