ImageSheets and Widgets

Is there a way, or will there be a way, to reference an ImageSheet frame as a default or over image for a button widget?
[import]uid: 44647 topic_id: 22989 reply_id: 322989[/import]

Not sure if I changed the code myself, or if it was already possible to just send a displayobject instead of a string. :slight_smile: [import]uid: 5942 topic_id: 22989 reply_id: 91915[/import]

You can’t send a displayObject but you can send an ImageSheet – I don’t see how to specify a frameNumber, though. I suspect the acceptance of an ImageSheet is coincidental rather than intentional because of the behavior of the factory functions being invoked on the backend.
[import]uid: 44647 topic_id: 22989 reply_id: 91986[/import]

I changed smoething like this:
[lua] if params.over then
over = display.newImage( params.over )
over.isVisible = false
button:insert( over, true )
end
– into:
if params.over then
if isDisplayObject(params.over) then
over = params.over
else
over = display.newImage( params.over )
end
over.isVisible = false
button:insert( over, true )
end[/lua]
Not entirely the same as what I have, but you get the picture [import]uid: 5942 topic_id: 22989 reply_id: 91992[/import]