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

flash actionscript

group:

Target a button inside of a Movie Clip


Target a button inside of a Movie Clip MacJr
8/10/2006 8:24:36 PM
flash actionscript: I am trying to target a button inside a dynamically loaded movieclip, such as
the following (but is not working):

clipAnswerYesNo: Movieclip
testbutton: embeded button
Script is on main timeline.

_root.clipAnswerYesNo.testbutton.onRelease = function() {
trace(userAnswer);
}

D
Re: Target a button inside of a Movie Clip Craig Grummitt
8/10/2006 11:41:04 PM
ensure both the movieClip and the button have instance names.
also, maybe change your trace to:
trace("hit button"+userAnswer);
it is possible that the trace and therefore the button is working, it's just
the path to userAnswer is incorrect...
AddThis Social Bookmark Button