flash q: buttons
- Started
- Last post
- 6 Responses
- Fariska
I'm attaching from the library a trasparent button.
Is possible for a button to set the _widht and _height proprierties or not? (actually seems it's not possibile specifying mybtn._width = value)
- UndoUndo0
you'll need to specify where it is
so on the root it would be
_root.mybtn._width = value;
- cram0
if you are attaching them with attachMovie() use the same path. avoid _root when you can. so...
this.attachMovie("btn_symbol","m...
mybtn._width = 100;
should work.
- joyride0
to piggyBack off of cram you could just put:
this.attachMovie("btn_symbol","m... _height:200} );you can attach position within the {} too
Just a bit cleaner ;)
- Fariska0
Worked it.
I noted that after an attachMovie with transparent btns you get width and height = 0, cause the frame in which there is content is the 4 (hit area)
I worked it using a movie clip with a transparent fill.Anyway thanks for your help
- UndoUndo0
fariska, look at the onPress,OnRelease and onRollover events for a button, it removes the need to have items 'inside' the button and you do it with code instead
- cram0
yikes. i didn't even catch the invisible button trap when i posted.
glad you found a solution that works for you.