Image file to button need help?

I recently create a bunch of image file on adobe illustrator and it was a background and buttons for the game that i wanted to create for the first time, and i want to know what the exact syntax for creating an image button…  I created a button but it was a built in widget for the program…

heres my code…

leaderboardsBtn = widget.newButton{

label=“Leaderboards”, 

fontSize = 150,

labelColor = { default={255}, over={128} },

default=“images/button-exit.png”,

over=“images/button-over-exit.png”,

width=200, height=50,

onRelease = onleaderboardsBtnRelease – event listener function

}

leaderboardsBtn.x = 500

leaderboardsBtn.y = 1200

If you’re using image buttons, you don’t need label, fontSize and labelColor. Are you getting errors? Is it not working? Can you describe the problem you’re having?

Thanks

Rob

I figured it out its okay now thank you… i just need to change “default”, “over” to “defaultFile” , “overFile” my image file usually doesnt have a label so thats why i added label color and font size…

If you’re using image buttons, you don’t need label, fontSize and labelColor. Are you getting errors? Is it not working? Can you describe the problem you’re having?

Thanks

Rob

I figured it out its okay now thank you… i just need to change “default”, “over” to “defaultFile” , “overFile” my image file usually doesnt have a label so thats why i added label color and font size…