Flash Question
- Started
- Last post
- 24 Responses
- CygnusZero4
I have a text box that scrolls using a component. Is it possible to put links within the scrolling text box?
- ifeltdave0
yes, a dynamic text field accepts HTML formatting. simply use standard syntax for it.
OR.. an easier method
Select the text you want to use as a link, open the properties inspector, roll down "Options" tab, and enter a link in the box.
- CygnusZero40
Giddy up. Thanks man.
- CygnusZero40
Sorry another question. Looks like doing it through the options makes all the text in that text box clickable, I dont want that. Just want 1 word to be clickable.
So I'm trying the HTML method, but I have no idea where the HTML syntax gets entered. Doesnt look like it's the actions window. It appears that Flash wont let you put actions on a text box that is rendered in HTML.
- fyoucher10
Set the textfield as HTML text.
Wherever you want to add a link do the following
myTextField.htmlText =
"This is some text with a <A HREF = "www.lemonparty.org" target = "_blank"> link </A>";You can even fire off Flash functions with A HREF using asfunction (look it up in Help)
- CygnusZero40
Flash will not let me put actions on an HTML text field. I'm trying it right now.
Where exactly does that mytextfield code go?
- fyoucher10
Give the textField an instance name, set it to a dynamic textfield, and set it to html Text (there's a checkbox in the character inspector).
Then in your Actions layer, put the code mentioned above but just make sure the keyframe with those actions are on a frame where the textfield is available.
Works the same as AS2 or AS3 (but I think asfunction works differently in AS3, can't remember...you're probably not implementing that anyway)
- myTextField would be your instance name, for examplefyoucher1
- CygnusZero40
This isn't working at all. Is there any other ways to do this? Like maybe have the copy and a button in a movieclip, then scroll that movieclip?
- ifeltdave0
hey man, are you sure you didn't select just the word you wanted to link, before adding the link in the properties inspector?
you should be able to just highlight your text and apply the link exclusively.
other wise, put the text field on a layer, on top of that, put a button with a getURL call. put both of those into a clip, and add that clip to your scroll component. Should get you where you need.
- fyoucher10
This is how you do it. It's pretty basic actually. If it's not working, you're not doing it correctly. Make sure you're putting the AS on a keyframe in the timeline and not attaching it to a movieclip or textfield.
- And make sure the text is HTML Textfyoucher1
- and make sure u're targeting the textfield correctlyfyoucher1
- Did all of these things. The text simply will not show up.CygnusZero4
- CygnusZero40
Using the link option in properties doesnt work. It makes all the text in the field a link. There's no way around this. Tried selecting just the word and entering the link, it makes ALL of the text a link.
- NONEIS0
I just tried this real quick and it dos in fact turn all the text into a link – must be a new error in 5.5.
Simple workaround though, make your link, then select everything BUT the link and delete the URL, it will correct itself!
- CygnusZero40
^ Not working. It deleted the entire link from all of the copy.
This is nuts. I just need to have a scroll bar, some text, and a damn link in the text. Can't even make it happen. It's amazing to me how retarted flash is sometimes. Im here scouring the internet for solutions to this.
- CygnusZero40
Did they get rid of the Vscrollbar component from CS5? It was this cool looking scroll bar. I used it on an older project of mine. Trying to copy that scroll bar into this new project and it tells me the scroll bar component can't be found.
Lol nothing is working for me today.
- Give me an error when I try to publish. Ridiculous. Guess I have to use the standard ugly scrollbar.CygnusZero4
- fyoucher10
The method I mentioned above should work fine. You're probably not targeting the textfield correctly. You may want to trace the path to the textfield to make sure the path ur using is correct.
I use this method on my site. Check the XML for my site (scroll all the way down the XML until you get to the nodes for News (the news scroller is in the About section on my site). You'll see the HTML strings used for asfunction and for making links.
http://www.davi-t.com/files/xml/…
- CygnusZero40
Did everything exactly as you said, Im getting an error telling me the syntax is wrong. Something about what you posted it doesnt like.
- fyoucher10
What's the error?
- Symbol=main, layer=Layer 3, frame=2, Line 2 Syntax error.
CygnusZero4 - This is exactly where the code is that you sent me.CygnusZero4
- No other code in that frame, so it doesnt like what you sent.CygnusZero4
- Symbol=main, layer=Layer 3, frame=2, Line 2 Syntax error.
- CygnusZero40
I want to try something else, maybe someone can point me in the right direction to making this work.
I have a UI scrollbar component, and a movieclip with text and a link in it called "copy1". How would I get that component to scroll that movie clip, or is that something very complicated?
- Prolly too complicated to try and mess with a component. Easier to do something that that with ur own scrollerfyoucher1
- fyoucher10
Ahhh crap...you need to use single quotes for the URL link and double quotes for the whole string.
Here's a FLA with it. Works fine.
www.davi-t.com/misc/qbn/textfiel…...
- CygnusZero40
^ link isnt working
- fyoucher10
QBN is breaking the long link. Try this instead >
http://goo.gl/ud7Dz