flAsh and bones
trace("AKA: Biro Barna");
Hint: don't look for tutorials, learn programming instead ( only if you ever want to actually be able to do something with AS 3.0 ).
Attached Files
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog: http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum : http://www.flashforum.ro/ | By perseverance the snail reached the ark. |
flAsh and bones
thanks a lot! currentTarget FTW!!!
how do i turn cursor into a hand when im hovering over a button though? buttonMode = true doesnt seem to work
Code:
var menuLabels:Array = ["About", "Services", "Showcase", "Clients"];
var menuItems:Array = ["bFlameButton1", "bFlameButton2", "bFlameButton3", "bFlameButton4"];
for (var i:int = 0; i < menuItems.length; i++)
{
var button:MovieClip = this.getChildByName(menuItems[i].toString()) as MovieClip;
button.ButtonText.text = menuLabels[i].toString();
button.buttonMode = true;
button.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
button.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
}
function onButtonOver(event:MouseEvent):void
{
event.currentTarget.gotoAndPlay("over");
}
function onButtonOut(event:MouseEvent):void
{
event.currentTarget.gotoAndPlay("out");
}
Last edited by socreative.tv; 04-04-2009 at 03:05 PM .
trace("AKA: Biro Barna");
It's not working because the text field is stealing the event. Use button.mouseChildren = false; button.buttonMode = true;
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog: http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum : http://www.flashforum.ro/ | By perseverance the snail reached the ark. |
flAsh and bones
you're the man! cheers!
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width