-
Great, Daddy-O!
Colouring certain words in a textfield
Hey folks, I was wondering if something like this was possible
I'd create a textfield, and in another layer I add buttons I put over certain words in the textfield
and then via actionscripting I address these words, and dynamicly give these words a diffrent color (mouseover effect)
for instance:
on mouseover
textfield.word "blabla" color #111111
hope its a bit clear and thanks =)
-
FK'n_dog
if using buttons, why not put text in button frames
ie ..
"up" frame - blabla - black text
"over" frame - blabla - red text
-
Great, Daddy-O!
well because I was planning to only use the 'hit' state so I could reuse 1 button over and over, and it saves me the button positioning in the text area's. sorry should have added that.
-
FK'n_dog
you probably have to go the movieclip and positioning route
Last edited by a_modified_dog; 12-23-2007 at 09:41 AM.
-
Great, Daddy-O!
[edit] thats almost it, but I kinda wished it was possible the actual text in the textfield could change, because this way I still have to position the 'button' text very precicely over the previous text
if not possible I'm still thankfull for this, cheers =)
Last edited by Hippyscum; 11-23-2007 at 03:29 PM.
lalalalalalala
-
FK'n_dog
the only other method i can think of is to count the
chars. in the textfield to apply a text format to -
PHP Code:
this.createTextField("mytext", 10, 300, 200, 10, 10);
mytext.autoSize = true;
mytext.text = "Hello Mum :) Hello World";
mytext.textColor = 0xFF0000;
btn.onRollOver = function(){
blue = new TextFormat();
blue.color = 0x0000FF;
mytext.setTextFormat(6,18,blue);
};
-
Great, Daddy-O!
that'll be a bit too hard to work with, but I'll use your first suggestion, it will save me quite some button making time, thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|