all groups > flash actionscript > june 2006 >
You're in the

flash actionscript

group:

accessing buttons within mc


accessing buttons within mc hushhurt
6/28/2006 11:58:46 PM
flash actionscript: ok, i am trying to create a mp3 player within flash.
i want to create an menu when you rollover an "audio" button. the audio mc
fades, and the stop, play, etc. buttons fade in. so i created a movieclip with
"audio" and then a tween to fade in the play buttons. I then made a large
hitArea button, then told it to play the audio mc tween. except when i roll
over the hitArea button, it plays the tween, but i dont have access to any of
the buttons.
are you able to access, buttons within the movieclip? or is the hitArea
covering it up?

hope that makes sense.
Re: accessing buttons within mc kglad
6/29/2006 12:13:47 AM
if you have button (or movieclip button) "covering" another button (or
movieclip button), it will intercept mouse events. to remedy, either don't
"cover" anything that needs to respond to the mouse or use a hitTest() for one
of the two overlapping buttons/movieclip buttons.
Re: accessing buttons within mc hushhurt
6/29/2006 2:07:47 AM
hey kglad,
thanks for responding.
i looked up the hitTest() in the Definitive Guide, and I dont see how I can
use the hitTest(); for my buttons.
i found a website of which results im trying to achieve:
http://www.iso50.com/iso50.html.
on the bottom, he has the audio section. can you figure this out?

ty
Re: accessing buttons within mc hushhurt
6/29/2006 12:07:58 PM
ok, i guess i am missing something.
if i have an area cut out around the play buttons, so the hit area does not
cover them up. if i assign a rollover and rollout function to the hit area,
will the hit area not rollout when i press the play, stop, etc. buttons that
the hit area is now not covering?
Re: accessing buttons within mc kglad
6/29/2006 3:20:26 PM
yes, your hit area will undergo a rollout. then your buttons will undergo a
rollover.

so, have your buttons counter the rollout code your hit area would otherwise
execute. to be more explicit (and helpful) i would need to know the code the
hitarea rollout triggers, but if you use a goto statement to trigger the
rollout behavior of your hitarea use another goto statement to counter that.
or you could check for a variable's value to decide if your hitarea should
trigger a rollout.
AddThis Social Bookmark Button