Re: moving and scaling an image

2012-02-11 Thread Alejandro Tejada
Hi David,


David Glasgow wrote
> 
> The only thing I can think of is that if the location moved to is closer
> than the step size in the repeat loop, then you won't get the scaling, or
> only a very little bit.  What happens when you step through in the
> debugger?
> 

Ah, now it works!
I just changed the location of the graphic and the image
and it works great. :-D

Thanks a lot for answering my question.

Al

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4379663.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-11 Thread David Glasgow

On 10 Feb 2012, at 6:00 pm, Alejandro Tejada wrote:

> Subject: Re: moving and scaling an image
> Reply-To: How to use LiveCode 
> 
> Hi David,
> 
> David Glasgow wrote
>> 
>> Thanks to all the help with this.
>> I ended up with a script that created sequential moves,
>> with an image scale in between each. 
>> I am amazed at how smooth it is.  This is the 'pull towards' script:
>> [snip]
>> 
> 
> Really nice! When i pasted this script in an image,
> it moves smoothly but dowes not change size.
> 
> What I am doing wrong?

The only thing I can think of is that if the location moved to is closer than 
the step size in the repeat loop, then you won't get the scaling, or only a 
very little bit.  What happens when you step through in the debugger?

David G
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-10 Thread Alejandro Tejada
Hi David,


David Glasgow wrote
> 
> Thanks to all the help with this.
> I ended up with a script that created sequential moves,
> with an image scale in between each. 
> I am amazed at how smooth it is.  This is the 'pull towards' script:
> [snip]
> 

Really nice! When i pasted this script in an image,
it moves smoothly but dowes not change size.

What I am doing wrong?

By the way, Scott Rossi should have a stack
with a similar effect in his website:
http://www.tactilemedia.com/site_files/software/index.htmlv 

Al 

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4376806.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-10 Thread Ken Corey

On 10/02/2012 15:23, David Glasgow wrote:

Thats the kind of thing!  Looks like I should forget about the move command, 
and just shuffle off to the destination shrinking as we go.  I am surprised at 
how smooth it is.

Just out of interest, I disabled the unwiggle line of your script, but was a 
bit disappointed not to see any obvious wiggle.


I'm very new at LiveCode and so am still learning.  While playing around 
with getting multi-touch working, I noticed a large amount of wiggle 
when I'd resize items...


In hind sight it was because of the way I was handling move events, not 
because of the way resizing works.


If it doesn't wiggle with it out, definitely leave it out.

-Ken

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-10 Thread David Glasgow
Thanks to all the help with this.

I ended up with a script that created sequential moves, with an image scale in 
between each.  I am amazed at how smooth it is.  This is the 'pull towards' 
script:

on embiggen
   put item 2 of the loc of grc "near" into tend
   put item 2 of the loc of me into tbeginning
   repeat with j=  tbeginning to tend step 100
  get item 1 of the loc of me & "," & j
  move me to it in 2 ticks
  set the width of me to the width of me *1.05
  set the height of me to the width of me *1.05
   end repeat
   move me to item 1  of the loc of me & "," & tend
end embiggen

The move after the repeat loop corrects the location overshoot because of the 
change in graphic size.  I had to chuckle, because this kludge actually looks 
like a nice little 'bounce' a la iOS.

Ha!

Thanks again,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-10 Thread David Glasgow

On 9 Feb 2012, at 9:16 pm, Ken Corey wrote:

> From:  
> Date: 9 February 2012 8:30:35 pm GMT
> To: use-livecode@lists.runrev.com
> Subject: Re: moving and scaling an image
> Reply-To: How to use LiveCode 
> 
> 
> Well, I must be missing something.  Take a look at:
> 
> http://its.ec/static/faux3d.livecode.zip
> 
> Is that the kind of thing you're after?  Seems smooth enough for me (and 
> "works" in the iOS simulator, though the Motif-themed scrollbar looks 
> decidedly odd).
> 
> -Ken

Thats the kind of thing!  Looks like I should forget about the move command, 
and just shuffle off to the destination shrinking as we go.  I am surprised at 
how smooth it is.

Just out of interest, I disabled the unwiggle line of your script, but was a 
bit disappointed not to see any obvious wiggle.  

Cheers,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-10 Thread Alejandro Tejada
Hi Ken,


Ken Corey wrote
> 
> Do you have 12 images in the image directory?
> The first time I didn't...so I added some more.
> Then, I double-clicked on the card one in the App Browser, and then 
> clicked the button again. Worked fine the second time.
> -Ken
> 

Yes, 12 images is the minimun number of images
inside the "images" folder.

If possible, I would like to know if this stack
works fine in the mobile platform.

Thanks in advance!

Al

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4376500.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Bob Sneidar
Also, the images are all white. I used Preview to convert from png to jpg. 
Could that be a problem?

Bob


On Feb 9, 2012, at 2:32 PM, Ken Corey wrote:

> On 09/02/2012 22:30, Bob Sneidar wrote:
>> I followed the instructions. On the 12th loop I get an error that 
>> essentially says there is no such control as control 12.
> 
> Do you have 12 images in the image directory?
> 
> The first time I didn't...so I added some more.
> 
> Then, I double-clicked on the card one in the App Browser, and then clicked 
> the button again. Worked fine the second time.
> 
> -Ken
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Bob Sneidar
I had 13. 

Bob


On Feb 9, 2012, at 2:32 PM, Ken Corey wrote:

> On 09/02/2012 22:30, Bob Sneidar wrote:
>> I followed the instructions. On the 12th loop I get an error that 
>> essentially says there is no such control as control 12.
> 
> Do you have 12 images in the image directory?
> 
> The first time I didn't...so I added some more.
> 
> Then, I double-clicked on the card one in the App Browser, and then clicked 
> the button again. Worked fine the second time.
> 
> -Ken
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Bob Sneidar
I changed the loop max count to 11. The script finished but it appears all 
objects are off the screen. Nothing is showing. 

Bob


On Feb 9, 2012, at 11:52 AM, Alejandro Tejada wrote:

> Hi David,
> 
> Please, read this message from last year about
> my stack named Infinite zoom:
> 
> Hi All, 
> 
> Today, I found time to revisit this code, originally published 
> in 2009. Now the stack could zoom in and zoom out using 
> the mouse scroll wheel. 
> 
> If you want, read that messages thread, started back in 2009: 
> 
> http://runtime-revolution.278305.n4.nabble.com/First-test-for-Infinite-Zoom-td621701.html
>  
> 
> I created two download links to public files in my Dropbox folder: 
> 
> http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.zip 
> http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.rev 
> 
> Tell me if any of them fail. 
> 
> Still available in the web, here you could find 
> the original images: 
> 
> http://public.hbk-bs.de/~baumgarn/zoom/steps/ 
> 
> Have a nice day! 
> 
> Al
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4374155.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Ken Corey

On 09/02/2012 22:30, Bob Sneidar wrote:

I followed the instructions. On the 12th loop I get an error that essentially 
says there is no such control as control 12.


Do you have 12 images in the image directory?

The first time I didn't...so I added some more.

Then, I double-clicked on the card one in the App Browser, and then 
clicked the button again. Worked fine the second time.


-Ken

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Bob Sneidar
I followed the instructions. On the 12th loop I get an error that essentially 
says there is no such control as control 12. 

Bob


On Feb 9, 2012, at 11:52 AM, Alejandro Tejada wrote:

> Hi David,
> 
> Please, read this message from last year about
> my stack named Infinite zoom:
> 
> Hi All, 
> 
> Today, I found time to revisit this code, originally published 
> in 2009. Now the stack could zoom in and zoom out using 
> the mouse scroll wheel. 
> 
> If you want, read that messages thread, started back in 2009: 
> 
> http://runtime-revolution.278305.n4.nabble.com/First-test-for-Infinite-Zoom-td621701.html
>  
> 
> I created two download links to public files in my Dropbox folder: 
> 
> http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.zip 
> http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.rev 
> 
> Tell me if any of them fail. 
> 
> Still available in the web, here you could find 
> the original images: 
> 
> http://public.hbk-bs.de/~baumgarn/zoom/steps/ 
> 
> Have a nice day! 
> 
> Al
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4374155.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Ken Corey

Well, I must be missing something.  Take a look at:

http://its.ec/static/faux3d.livecode.zip

Is that the kind of thing you're after?  Seems smooth enough for me (and 
"works" in the iOS simulator, though the Motif-themed scrollbar looks 
decidedly odd).


-Ken

On 09/02/2012 17:53, David Glasgow wrote:

No! Honest injun! I don't want a 3d environment!  I just want to give the most 
basic impression of pulling towards and pushing away of images.  The maths 
isn't the problem, its the moving and scaling at the same time.

I took a quick look at AnimationEngine, which clearly does lots of fantastic 
things I don't need.  However, I would get it if it was the only way to solve 
this problem.  I couldn't see any commands that obviously related to scaling on 
the move though - can anyone say definitively?




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Alejandro Tejada
Hi David,

Please, read this message from last year about
my stack named Infinite zoom:

Hi All, 

Today, I found time to revisit this code, originally published 
in 2009. Now the stack could zoom in and zoom out using 
the mouse scroll wheel. 

If you want, read that messages thread, started back in 2009: 

http://runtime-revolution.278305.n4.nabble.com/First-test-for-Infinite-Zoom-td621701.html
 

I created two download links to public files in my Dropbox folder: 

http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.zip 
http://dl.dropbox.com/u/3834621/Zoom_infinite_2011_07_03.rev 

Tell me if any of them fail. 

Still available in the web, here you could find 
the original images: 

http://public.hbk-bs.de/~baumgarn/zoom/steps/ 

Have a nice day! 

Al

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/moving-and-scaling-an-image-tp4372218p4374155.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Richmond

On 02/09/2012 09:04 PM, J. Landman Gay wrote:

On 2/9/12 12:16 PM, Richmond wrote:


I made a stack 1024x768 pixels and popped an image right in the middle
of it, and
put this in the script of the image:

on mouseDown
grab me
end mouseDown

on mouseStillDown
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseStillDown

on mouseUp
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseUp

certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified
Ubuntu.


I'm not surprised. That's not a good way to do it.


Nor am I; 15 minutes after a long day with absolutely no forethought 
whatsoever.




You should ditch the "grab" command entirely and use a mousedown to 
store the object reference in a local script variable, a mousemove 
message to calculate the new rect of the object if the variable isn't 
empty, and a mouseup to empty the variable so that mousemove won't do 
anything any more. You'll get a smooth response this way.





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Richmond

On 02/09/2012 08:30 PM, Bob Sneidar wrote:

Richmond, this gave me the horrible case of the jitters. The image would shift 
positions as I dragged it. I tried locking and unlocking the screen before and 
after the sizing and positioning of the image, but apparently when the user is 
interacting with the IDE, the screen is going to unlock anyway whenever an idle 
hits. Seems there ought to be a way around this, but I don't have the time 
right now to troubleshoot it. It is however fairly quick on my Macbook Pro.


Well; I had a horrible case of the jitters after a 9 hour teaching day, 
and that code was the result . . .  :)



Bob


On Feb 9, 2012, at 10:16 AM, Richmond wrote:


On 02/09/2012 10:40 AM, David Glasgow wrote:

Hello folks,

I am trying to get an image to slide from the middle of the screen either to 
the top or the bottom.  However, the screen has a perspective, as if you were 
looking down a bowling alley, with a vanishing point somewhere above the screen.

To maintain the sense of depth, images 'pushed away' should shrink into the 
distance, and ones 'pulled' closer should embiggen.  Any suggestions how this 
could best be achieved?

The eventual destination of this may well be iPad, so any special 
considerations there would be welcome.

Cheers,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Here's the clunky version:

I made a stack 1024x768 pixels and popped an image right in the middle of it, 
and
put this in the script of the image:

on mouseDown
   grab me
end mouseDown

on mouseStillDown
   set the idleRate to 1
   put the item 2 of the loc of me into LOK
   if LOK>  0 then
   set the width of me to LOK
   set the height of me to LOK
   end if
   set the loc of me to 512, LOK
end mouseStillDown

on mouseUp
   set the idleRate to 1
   put the item 2 of the loc of me into LOK
   if LOK>  0 then
   set the width of me to LOK
   set the height of me to LOK
   end if
   set the loc of me to 512, LOK
end mouseUp

certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified Ubuntu.

AND, while I'm here, an opportunity for a faintly bi*chy note:

tried to upload the stack to RevOnline with no success 
whatsoever.

Richmond Mathewson.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread J. Landman Gay

On 2/9/12 12:16 PM, Richmond wrote:


I made a stack 1024x768 pixels and popped an image right in the middle
of it, and
put this in the script of the image:

on mouseDown
grab me
end mouseDown

on mouseStillDown
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseStillDown

on mouseUp
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseUp

certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified
Ubuntu.


I'm not surprised. That's not a good way to do it.

You should ditch the "grab" command entirely and use a mousedown to 
store the object reference in a local script variable, a mousemove 
message to calculate the new rect of the object if the variable isn't 
empty, and a mouseup to empty the variable so that mousemove won't do 
anything any more. You'll get a smooth response this way.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Malte Brill
Hi,

if you want to move and scale at the same time, changing the rectangle property 
is your friend. You will want to do this in a send in time structure and 
calculate where the the corner points of your control need to be at the given 
time. You will want to lock screen before you set the rectangle and unlock it 
afterwards. For the iPad a frameRate of about 20 to 45 fps can be achieved, 
depending on how many objects you move and scale at the same time. It is 
advisable to not use the "best" resizequality option for the image. If you are 
choosing not to use images, there is room for a little more fps. No true 3d 
with this, as Ken already said. 

animationEngine handles this task quite effeciently I guess with 
the aeChangeRect command. You can even let your movement and scaling ease with 
it. :-) 

Cheers,

Malte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: moving and scaling an image

2012-02-09 Thread John Dixon

Bernd Niggeman posted this a a solution to scaling and moving images
http://forums.runrev.com/phpBB2/viewtopic.php?f=27&t=8042#p37952
You might get some ideas from the stack...


> > On 09/02/2012 08:40, David Glasgow wrote:
> >> I am trying to get an image to slide from the middle of the screen either 
> >> to the top or the bottom.  However, the screen has a perspective, as if 
> >> you were looking down a bowling alley, with a vanishing point somewhere 
> >> above the screen.
  
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Bob Sneidar
Richmond, this gave me the horrible case of the jitters. The image would shift 
positions as I dragged it. I tried locking and unlocking the screen before and 
after the sizing and positioning of the image, but apparently when the user is 
interacting with the IDE, the screen is going to unlock anyway whenever an idle 
hits. Seems there ought to be a way around this, but I don't have the time 
right now to troubleshoot it. It is however fairly quick on my Macbook Pro. 

Bob


On Feb 9, 2012, at 10:16 AM, Richmond wrote:

> On 02/09/2012 10:40 AM, David Glasgow wrote:
>> Hello folks,
>> 
>> I am trying to get an image to slide from the middle of the screen either to 
>> the top or the bottom.  However, the screen has a perspective, as if you 
>> were looking down a bowling alley, with a vanishing point somewhere above 
>> the screen.
>> 
>> To maintain the sense of depth, images 'pushed away' should shrink into the 
>> distance, and ones 'pulled' closer should embiggen.  Any suggestions how 
>> this could best be achieved?
>> 
>> The eventual destination of this may well be iPad, so any special 
>> considerations there would be welcome.
>> 
>> Cheers,
>> 
>> David Glasgow
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> Here's the clunky version:
> 
> I made a stack 1024x768 pixels and popped an image right in the middle of it, 
> and
> put this in the script of the image:
> 
> on mouseDown
>   grab me
> end mouseDown
> 
> on mouseStillDown
>   set the idleRate to 1
>   put the item 2 of the loc of me into LOK
>   if LOK > 0 then
>   set the width of me to LOK
>   set the height of me to LOK
>   end if
>   set the loc of me to 512, LOK
> end mouseStillDown
> 
> on mouseUp
>   set the idleRate to 1
>   put the item 2 of the loc of me into LOK
>   if LOK > 0 then
>   set the width of me to LOK
>   set the height of me to LOK
>   end if
>   set the loc of me to 512, LOK
> end mouseUp
> 
> certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified 
> Ubuntu.
> 
> AND, while I'm here, an opportunity for a faintly bi*chy note:
> 
> tried to upload the stack to RevOnline with no success 
> whatsoever.
> 
> Richmond Mathewson.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Richmond

On 02/09/2012 10:40 AM, David Glasgow wrote:

Hello folks,

I am trying to get an image to slide from the middle of the screen either to 
the top or the bottom.  However, the screen has a perspective, as if you were 
looking down a bowling alley, with a vanishing point somewhere above the screen.

To maintain the sense of depth, images 'pushed away' should shrink into the 
distance, and ones 'pulled' closer should embiggen.  Any suggestions how this 
could best be achieved?

The eventual destination of this may well be iPad, so any special 
considerations there would be welcome.

Cheers,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Here's the clunky version:

I made a stack 1024x768 pixels and popped an image right in the middle 
of it, and

put this in the script of the image:

on mouseDown
   grab me
end mouseDown

on mouseStillDown
   set the idleRate to 1
   put the item 2 of the loc of me into LOK
   if LOK > 0 then
   set the width of me to LOK
   set the height of me to LOK
   end if
   set the loc of me to 512, LOK
end mouseStillDown

on mouseUp
   set the idleRate to 1
   put the item 2 of the loc of me into LOK
   if LOK > 0 then
   set the width of me to LOK
   set the height of me to LOK
   end if
   set the loc of me to 512, LOK
end mouseUp

certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified 
Ubuntu.


AND, while I'm here, an opportunity for a faintly bi*chy note:

tried to upload the stack to RevOnline with no success 
whatsoever.


Richmond Mathewson.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Richard Gaskin

David Glasgow wrote:

I just want to give the most basic impression of pulling towards and pushing 
away of images.  The maths isn't the problem, its the moving and scaling at the 
same time.


You and me both.

The moment I can make anything close to News360 in LiveCode, ah, the UI 
possibilities that open up


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread David Glasgow

On 9 Feb 2012, at 2:57 pm, Ken Corey wrote:

> From: Ken Corey 
> Date: 9 February 2012 10:54:06 am GMT
> To: use-livecode@lists.runrev.com
> Subject: Re: moving and scaling an image
> Reply-To: How to use LiveCode 
> 
> 
> On 09/02/2012 08:40, David Glasgow wrote:
>> I am trying to get an image to slide from the middle of the screen either to 
>> the top or the bottom.  However, the screen has a perspective, as if you 
>> were looking down a bowling alley, with a vanishing point somewhere above 
>> the screen.
>> 
>> To maintain the sense of depth, images 'pushed away' should shrink into the 
>> distance, and ones 'pulled' closer should embiggen.  Any suggestions how 
>> this could best be achieved?
>> 
>> The eventual destination of this may well be iPad, so any special 
>> considerations there would be welcome.
> 
> Oh go on, just say it: you want a 3D environment.
> 
> I've read interesting things about Franklin3d.com, but that doesn't seem to 
> work on an iPad.
> 
> If you don't care about true 3D, you might be able to get away with cheating 
> with a 2D solution and a little extra effort to make things "appear" 3D, but 
> not /really/ be 3D.
> 
> You could calculate the math for this yourself, but there's always 
> AnimationEngine for moving stuff around.
> 
> -Ken

No! Honest injun! I don't want a 3d environment!  I just want to give the most 
basic impression of pulling towards and pushing away of images.  The maths 
isn't the problem, its the moving and scaling at the same time.

I took a quick look at AnimationEngine, which clearly does lots of fantastic 
things I don't need.  However, I would get it if it was the only way to solve 
this problem.  I couldn't see any commands that obviously related to scaling on 
the move though - can anyone say definitively?

David G
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: moving and scaling an image

2012-02-09 Thread Ken Corey

On 09/02/2012 08:40, David Glasgow wrote:

I am trying to get an image to slide from the middle of the screen either to 
the top or the bottom.  However, the screen has a perspective, as if you were 
looking down a bowling alley, with a vanishing point somewhere above the screen.

To maintain the sense of depth, images 'pushed away' should shrink into the 
distance, and ones 'pulled' closer should embiggen.  Any suggestions how this 
could best be achieved?

The eventual destination of this may well be iPad, so any special 
considerations there would be welcome.


Oh go on, just say it: you want a 3D environment.

I've read interesting things about Franklin3d.com, but that doesn't seem 
to work on an iPad.


If you don't care about true 3D, you might be able to get away with 
cheating with a 2D solution and a little extra effort to make things 
"appear" 3D, but not /really/ be 3D.


You could calculate the math for this yourself, but there's always 
AnimationEngine for moving stuff around.


-Ken

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


moving and scaling an image

2012-02-09 Thread David Glasgow
Hello folks,

I am trying to get an image to slide from the middle of the screen either to 
the top or the bottom.  However, the screen has a perspective, as if you were 
looking down a bowling alley, with a vanishing point somewhere above the screen.

To maintain the sense of depth, images 'pushed away' should shrink into the 
distance, and ones 'pulled' closer should embiggen.  Any suggestions how this 
could best be achieved?

The eventual destination of this may well be iPad, so any special 
considerations there would be welcome.

Cheers,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode