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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding flash rollover buttons

Status
Not open for further replies.

monkeymeister

Programmer
Mar 17, 2005
58
GB
what is the syntax for adding a rollover button as an image button? I have saved the button as a .swf file and put it as the ImageUrl, but since it isn't an image, do I need to save it as an image in flash rather than a button?

Cheers,

Mike
 
I tried using .swf's for rollover buttons as well, but I found it to be a bit of a pain to worry about the placement of the object & embed tags. If you want to use a rollover .swf button, you'll be better off surrounding the object & embed tags with a hyperlink.

If you want to add rollover states to an ImageButton using flat images, you'll need to add attributes:

Code:
ThisBtn.ImageUrl = "images/edit.gif";
ThisBtn.Attributes.Add("onmouseover","src='images/edit_f2.gif'");
ThisBtn.Attributes.Add("onmousedown","src='images/edit_f3.gif'");
ThisBtn.Attributes.Add("onmouseout","src='images/edit.gif'");

hth

tigerjade

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top