clicked button brings object to front
hi guys,
so have set of buttons when clicked, make objects visible. these objects layered on top of each other , want bring each front when button clicked, i'm struggling code snippets "bring front" - i'm pretty new actionscript child stuff little confusing
basically i'm looking this:
button.addeventlistener(mouseevent.click, showobject);
function showobject(event:mouseevent):void
{
*** code bring object front ***
}
thanks!
there 2 ways can think of make object come front...
button.addeventlistener(mouseevent.click, showobject);
function showobject(event:mouseevent):void
{
addchild(objectname);
// or
setchildindex(objectname, numchildren-1);
}
where objectname replaced whatever instance name assign object
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment