Is LiveCode for me?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ScoopsUK
Posts: 4
Joined: Tue May 10, 2011 8:39 pm

Is LiveCode for me?

Post by ScoopsUK » Tue May 10, 2011 8:44 pm

Hi all!

I wonder if someone will be able to give me an answer on this...

I am considering getting back into LiveCode (I have a Dreamcard license!) but wonder if it will be able to deal with the project I have in mind. Specifically I want to have a canvas which is much larger than the screen itself and be able to display objects in it, scroll around it and zoom in and out to my hearts content. Can LiveCode do this? I was going to try again in DC but I guess it has been so long and LiveCode itself may have progressed somewhat so I thought I would ask the question first.

Many thanks for your replies!

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Is LiveCode for me?

Post by doc » Tue May 10, 2011 10:36 pm

Hello and welcome!
Yes! LiveCode can do what you're asking and it's simple to do.
(Not sure about the "zooming" that you described, but scrolling the oversize canvas is simple to do)

All that is required is to "group" your over-sized canvas/image, lock it in place and set the horizontal and vertical scrollbars for the group. At that point, you can whatever you wish to the group in the location of your choice and it will be accessible by scrolling. Should be doable in Dreamcard I would think.

Best regards,
-Doc-

ScoopsUK
Posts: 4
Joined: Tue May 10, 2011 8:39 pm

Re: Is LiveCode for me?

Post by ScoopsUK » Wed May 11, 2011 6:57 am

Thanks for the quick reply. The zooming I refer to is the ability to use the scrollwheel to literally zoom into items on the canvas. For example, you may want to pull back to look at the information as a whole or just look at one specific thing. I know many programs have a selectable view control where you can say you want to show the information as so many percent but I was thinking of something a bit more dynamic. Any ideas how you would be able to handle the resize/scaling of text and images in this way?

Many thanks!

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Is LiveCode for me?

Post by doc » Wed May 11, 2011 1:07 pm

Okay... on the zooming part.

Yes I do believe that it is possible, but you would need to script the desired action for each object. Unfortunately, that is well past my current experience with LC, so maybe someone with more knowledge can chime in here. I put together a very simple demo stack that shows how to set up scrolling using a "grouped" background image:

http://tinyurl.com/3josh5q

The stack is pretty "hefty" in size due to the graphic I used... about 1.74MB, which is way too large to attach here at the forum.

HTH,
-Doc-

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Is LiveCode for me?

Post by FourthWorld » Wed May 11, 2011 3:13 pm

ScoopsUK wrote:Thanks for the quick reply. The zooming I refer to is the ability to use the scrollwheel to literally zoom into items on the canvas. For example, you may want to pull back to look at the information as a whole or just look at one specific thing. I know many programs have a selectable view control where you can say you want to show the information as so many percent but I was thinking of something a bit more dynamic. Any ideas how you would be able to handle the resize/scaling of text and images in this way?
Scrolling window content is a snap in LC, but scaling it is much more work, and scaling dynamically on the fly is somewhere between seriously challenged and impractical in the current engine.

Dynamic scaling is being considered by the team at RunRev, but it's hard to say when it will find its way into the engine. On the one hand, it poses a very difficult challenge in terms of overhauling the pixel-based rendering scheme used currently, but on the other hand everyone recognizes that with the tremendous variance in resolutions across different devices the engine needs to become independent of pixel-based metrics anyway.

In the meantime, scaling in LiveCode can be done by calculating the scaling factors and adjusting the control rects in script. This is a lot of work, and if you have a lot of controls the result will be at best choppy.

If dynamic scaling is absolutely essential for your app's design, you may have to consider a tool like Flash or AIR which are well optimized for that.

But if your app can afford a redesign which avoids dynamic scaling, I think you'll find the productivity in nearly all other aspects of development pretty much unbeatable with LiveCode.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ScoopsUK
Posts: 4
Joined: Tue May 10, 2011 8:39 pm

Re: Is LiveCode for me?

Post by ScoopsUK » Mon May 16, 2011 2:26 pm

Thanks for the reply. I thought large canvases wouldn't be too much trouble but that is sad news on the zooming front. I was really needing dynamic zooming in the way Prezi does, which is programmed in Flash. I didn't want to go down that route though as I couldn't deploy that to an iOS device (of course). Still, I will keep my eye on LC and see what happens in the future.

neo42
Posts: 83
Joined: Tue Mar 01, 2011 10:20 pm

Re: Is LiveCode for me?

Post by neo42 » Thu Jun 23, 2011 3:03 pm

Perhaps you can still do it. Try something simple like adding a Zoom 2x button and a regular scale button. Put some graphics on there and a couple other things and then when the button(s) is(are) hit change the rectangle of everything to be bigger or smaller (and in some cases, change font sizes). Depending on what you're scaling and how many things you're scaling, it wouldn't be too hard. I think dynamic scaling of one image could even be fluid/real time, but I'd have to try it.


Also, to make things simpler, you can give each object it's own "rescale me function" so that each object knows how to rescale itself properly.


Livecode is powerful. You just have to know how to tap into it the right way.

Post Reply