grouping a player object with an image

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
revmeup
Posts: 3
Joined: Sat May 12, 2007 5:59 pm

grouping a player object with an image

Post by revmeup » Tue May 15, 2007 4:13 am

I'm trying to place a player object on top of an image of a TV and group them, but whenever I click group the player enlarges and covers the entire image. I just don't get why. Someone please help me. Thanks.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue May 15, 2007 7:42 am

Hi revmeup,

Set the lockloc of the player to true.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

revmeup
Posts: 3
Joined: Sat May 12, 2007 5:59 pm

That works, but...

Post by revmeup » Wed May 16, 2007 3:03 am

My ultimate goal is to enlarge the grouped object dynamically when it moves. But it is not enlarging. Here's my code for the grouped object:

local tDragging

on mouseDown
grab me
put true into tDragging
end mouseDown

on mouseUp
put false into tDragging
end mouseUp

on mouseMove
if tDragging is true then
get the height of me
put it into h
get the width of me
put it into w
set the height of me to h + 2
set the width of me to w + 2
end if

end mouseMove

This has worked before for non-grouped objects. Any suggestions?

Post Reply