Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS2 Tweener Button Help

Status
Not open for further replies.

papalazarou78

Technical User
Apr 28, 2007
3
GB
Hi

I'm using Tweener to create rollovers (changing the text colour) with the following text;

Code:
movMenuBar.movServicesBtn.onRollOver = function() {
   Tweener.addTween(movMenuBar.movServicesBtn.txtServices, {_text_color:0x990000, time:2});
};


movMenuBar.movServicesBtn.onRollOut = function() {
    Tweener.addTween(movMenuBar.movServicesBtn.txtServices, {_text_color:0x999999, time:2});
};

movMenuBar.movServicesBtn.onRelease = function() {
	Tweener.addTween(movMainContent, {_x:0, time:1.5, transition:"easeInOutBack"});
	movMainContent.movServices.gotoAndPlay("services_start");
    Tweener.addTween(movMenuBar.movServicesBtn.txtServices, {_text_color:0x990000});

};

The rollover works great, but I want the button/text to remain in the rollover colour of red (990000) when the button is pressed, but can't seam to get it working. I have tried added the last tweener command into a onPress function as well with no luck.

Has anyone any pointers??

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top