Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Text - How to Make Links 1

Status
Not open for further replies.

munkygomoo

Programmer
May 16, 2002
15
0
0
US
If I import text from a text file into a dynamic text field, can I make certain words or phrases in the text field link to either ActionScript actions or more directly to frames, like gotoAndPlay()? - JGD -
 
if you have the text box on a button (which i assume is how you want it) you can make it so on the buttons release if the button.text1 is equal to a certain variable or string then it will goto and play whatever frame you want. Its pretty simple but if you dont understand what i mean Ill make some sample code when i get home in like 2 hours just let me know.

Shenn
 
Another way is to have the text box set to "HTML Formatting" and have links coded into the text directly just link you would in a standard HTML page.

You can use <a href=...> tags to access external pages, javascript functions or internal ASfunctions which will allow &quot;gotoAndPlay&quot;s etc within your movie.
 
hold up wangbar how can you do that? with an href link! i made a question like last week asking if you could use an href link to control your movie and like no one responded! what kind of functions please let me know. and also i went to one of your sites and i just would like to know how you do the thing that when like your mouse gets further from the center of a movie it plays the movie faster and faster thanks!
 

Regards,

new.gif
 
The mouse thing is really simple.

The speed of the scrolling section is controlled by a variable - let's call it &quot;speed&quot;. You then work out where the mouse is on the screen, work out how far it is from the screen centre and move the clip by the distance from the centre divided by a number which keeps it moving at a realistic rate. The scrolling script is a bit long and involved but attach this to any clip and it will move around in reaction to your mouse:

onClipEvent(load){
speed=0;
screenCentre=375;
}
onClipEvent(enterFrame){
speed=(_root._xmouse-screenCentre)/50;
this._x+=speed;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top