Home  |  About  | Last |  Submit  |  Contact
AllQuests.com




Previous Question:  Boot Camp frustration  Windows on the MacNext Question:  [ubuntu] USB Human Interface Device HID Configuration  Absolute Beginner Talk
Question onRoll >> bubble info ( Flash Kit Community Forums Flash ActionScript )
Updated: 2010-07-21 05:55:08 (2)
onRoll >> bubble info

Hi!

I've got a set of 15 cubes representing each one a different color.
Each cube is a button so, when i rollOn one of these, i want to show a bubble message (link with the mouse position) that tell the name of the color (it's only a background with a text beside).

But the problem is that i want the background adjust with the text.
EX. If the word is ORANGE, i want the background width set with that word so the background width will be different for ORANGE that BLUE.

if the field width containing the word ORANGE is 100px, the background will be 100px .... for the field with the word BLUE (width = 50px) the back will be 60px .... understand ????

How i can do that !!

Steve

Answers: onRoll >> bubble info ( Flash Kit Community Forums Flash ActionScript )
onRoll >> bubble info

You need to dynamically create a new textField, using createTextField(). I made an example ages ago ... you can pick it apart to see if it makes things any clearer.

garbage

onRoll >> bubble info

The key property is Textfield.autosize.

When you dynamically create your text field, make sure this property is set to true.

this.createTextField(label, level, x position, y position, width, height);

this.label.autosize = true;

And once you set autosize to true, the width and height of the textfield are overwritten.

the_protectot

Previous Question:  Boot Camp frustration  Mac Forums  Windows on the MacNext Question:  [ubuntu] USB Human Interface Device HID Configuration  Ubuntu Forums  Absolute Beginner Talk

- Source: onRoll >> bubble info Flash Kit Community Forums Flash ActionScript
- Previous Question: Boot Camp frustration Mac Forums Windows on the Mac
- Next Question: [ubuntu] USB Human Interface Device HID Configuration Ubuntu Forums Absolute Beginner Talk