Twokinds ARCHIVE Forums

This forum is for the preservation of old threads from before the forum pruning.
It is currently Tue Apr 15, 2025 5:19 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: FlashCS3 Help Again. Scrollbars and buttons
PostPosted: Fri Jul 18, 2008 5:22 pm 
Offline
Merchant
User avatar

Joined: Wed Jul 19, 2006 8:38 pm
Posts: 155
Location: Florida.
My boss wants some text in a box with a scrollbar thing. He wants certain words in the text to link to another page on the site. I have no idea how to put a button inside of a text box. He showed me a site that had a scrollbox with buttons inside, so it must be possible. Does anyone know how to do it? D:

I've tried searching for tutorials and such on Google but couldn't find anything...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 5:26 pm 
Offline
Templar Inner Circle
User avatar

Joined: Wed Jan 17, 2007 12:33 pm
Posts: 2879
Location: Nebraska, USA
Buttons, or hypertext? I mean, is it actually a button, or is it just a hyperlink like on a website?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 5:27 pm 
Offline
Merchant
User avatar

Joined: Wed Jul 19, 2006 8:38 pm
Posts: 155
Location: Florida.
I guess it can be either. The only way I know how to link to something is through an invisible button... If I can create hyperlink, that'd be great..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 5:39 pm 
Offline
Templar Inner Circle
User avatar

Joined: Wed Jan 17, 2007 12:33 pm
Posts: 2879
Location: Nebraska, USA
Okay. A hyperlink is relatively easy. You can format the text in a TextField as HTML (the attribute is htmlText).

I'm going to have to play with it and get back to you (I'm actually about ready to go home from work, so I can't do much with it at the moment), but in AS3, you'd start with something like:
Code:
var box:TextField = new TextField();
box.htmlText = "<a href=\"http://2kinds.com\">Go To Two|Kinds</a>";


It should work just by setting the htmlText property of the TextField to an HTML version of what you want it to say, with the link in it, just like it was a website.

Without some more checking, I can't say how to do it from a timeline object, I'm afraid, but it should be pretty straightforward.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 5:42 pm 
Offline
Merchant
User avatar

Joined: Wed Jul 19, 2006 8:38 pm
Posts: 155
Location: Florida.
Well, I'm using ActionScript2. Would it be the same?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 5:44 pm 
Offline
Merchant
User avatar

Joined: Wed Jul 19, 2006 8:38 pm
Posts: 155
Location: Florida.
Actually, I just realized.. It needs to go to a certain frame in the flash file. The website is going to be completely Flash based. That's how my boss wants it. So the person needs to be able to click a word, and it will take them to another "page", which will be another frame..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 7:23 pm 
Offline
Templar Inner Circle
User avatar

Joined: Wed Jan 17, 2007 12:33 pm
Posts: 2879
Location: Nebraska, USA
Adobe Help Files wrote:
Use one of the following two steps to enable HTML formatting for the text field:

Select a text field and click the Render Text as HTML button in the Property inspector.

[...]

When you use HTML formatted text with a text field (not components) on the Stage, you must assign the text to the text field's htmlText property instead of the text property.

You can do a hyperlink to another place in your Flash animation. To do that, use the htmlText, and put something like this for the htmlText property:
Code:
... <a href='asfunction:gotoAndStop, 1'>Go to Frame 1</a> ...


For more information, search the helpfile for "asfunction."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group