scolling and zooming images

Hi, I'm new to Corona/lua but learning very quickly. I am writing a board game based on a map. I have different lua files for each part of the map with navigational arrows to the next section. I was wondering if there was a way to have the map bigger than the screen size and drag it around so that other parts of the map come into view. The actual screen would actually be a small window onto the map. Everything I've tried so far limits my png file to the boundaries of the screen. Pinching would also be a good idea. I've loaded down the sample "pinching" file but obviously it can't be tested on the simulator. So my secomd question is can I transfer my app to my iphone without having to go through the Apples hoops and hurdles - I just want to test it!

Also, when I try build, I only get the option for Android. How do I build for Apple? I have the Windows version of Corona and I suddenly had the awful thought that maybe you needed a Mac to build for iphones - please tell me this isn't true!!!!

Thanks

Adrian

Adrian.

I can answer the second question. Unfortunately you do need to have a developer license to build for your device. Without it, you can't build for your phone. Hoops and hurdles await :)

Thanks for your reply - I am enrolled as an Appple developer but have done nothing with it! will have to find an easy to follow guide for putting my app onto the iphone for testing pinching. Is it easier to transfer to the Android? My wife has an HTC and I could test on that.

Cheers

Adrian

Actually you DO need a Mac to build for iDevices. Sorry :(

Hey Adrian.

My friend and I are in a similar situation. I have an Iphone and my friend has an android. We are looking to write apps and test them on our respective devices.

I haven't actually got it working on the iphone yet, so can't offer much advice with that.

However my colleague is able to build for android from windows and it's an absolute breeze. I would definitely go that way for basic testing at the moment.

Hope that helps.

Hi guys, thanks for your replies - have been away for a few days so sorry about the delay in repsponding. I feel a little cheated at Peaches clarification that you do need a MAC for iphone development. I didn't see anywhere on the Corona site that said that I had to buy a Mac - something that I have NEVER EVER wanted to do! Part of the attraction of Corona for me is that you can develop on the windows platform for both Android and iPhone. Now I have to go and buy a mac which I am never going to use except for this "translation" process from Corona to Xcode. This needs to be made clearer to potential customers of Corona.

Thanks

Adrian

"NEVER EVER" seems kinda strong.

I do share your sentiment that this detail could be more prominent. However, it is detailed on the BUY page http://www.anscamobile.com/pricing/ and any research on iOS app development should yield such information. The ability to provision and profile will probably always require a Mac. Unfortunately this is the nature of the Apple Beast.

I would however put money on the fact that if you're willing to go out and buy one just for the translation process alone, then you may be willing to give that Mac an honest go. And I would put even more money on it that you may actually like it ;) Maybe not to fully switch, but who knows.

In the mean time, maybe we can get Ansca to make this a bit more obvious on a few more pages so those PC only folks don't waste their time and money.

Ok - I didn't see the MAC OSX only text. I suppose I've been on Windows based system for 25 years and having borrowed a friend's Mac laptop for a month, I thought it was horrendous!! But maybe its what you are familiar with. I have 3 PCs in my home office. Adding a 4th computer is going to be overkill. Maybe I have to bite the bullett and buy the cheapest mac I can find. I have made attempts at running Snow Leopard virtually on a PC but doesn't quite work reliably enough.

By the way does anyone know the answer to my original question. Is there a way for me to have an image that is bigger than the view window and then scroll it around with a finger (like looking at a road map)?

Thanks again

Adrian

To try and answer your original question, insert all your display objects (including your map) in to a display group then add a touch listener to the map. In the touch listener function just move the display group inside the "moved" phase using the x and y coordinates of the touch. You will probably have to utilize some math skills to get the movement right.

Thanks calebr, I'll try that and let you know how I get on.

Adrian

Actually this sample code is similar to what you are describing, I believe; http://developer.anscamobile.com/forum/2010/11/08/parallax-scrolling-module-posted-code-exchange

As to the Mac thing, as others have said, it is clearly stated in more than once place, and clearly stated on the "buy"/"pricing" page.

I appreciate you're disappointed but this is a limitation put in place by Apple, not by us - you require Xcode and App Loader to get an app on the store, meaning you need a Mac. (Again, Apple's rules.)

You may have some issues with Mac (for whatever reason) but I'd encourage you to approach this with an open mind. I used PCs for years, I got a Mac, I preferred it. I still have machines running OSX, Windows XP and Windows 7. They all have their own merits :)

Peach

Hi Peach, sorry if I seemed cross - just a bit of a shock. Corona still seems the easiest way to develop. I actually have a friend who has an Apple G5 desktop(pre intel chip) that I could have for free! Would this be adequate?

Thanks for the code and all the help I've been given - will look at the code snippet in a minute.

Adrian

Hey Adrian,

I'm very sorry to say that no :( It needs to be intel. (This is once again an Apple limitation.)

If you already have PCs you might consider a Mac mini - good condition, second hand one wont set you back too much as you already have monitors, keyboards and mice.

Peach

Peach - thanks for the advice (you must have hundreds of messages to go through!!). I'll look out for a mac mini. Meanwhile I'll test the app on my wife's android phone and assume that the results will be similar on the apple devices. Thanks again for your help.

Adrian

Hi Peach, just to say the scrolling module works a treat - thanks so much for that.

Adrian

Hey again,

First up, glad to hear the scrolling module is working well!

Second up, depending on what kind of Android your wife is using, the performance will be at least as good (often better) on iOS. (In my experience, I say that as a long term Corona user, not in any official capacity.)

Check out Mac Minis from 2010 - prices have dropped but they're still new enough that when you wont kill it when it becomes your main computer ;)

Peach

PS - I'm teasing about the main computer bit, I know you like your PCs - but a Mac Mini from 2010 is a good buy.

views:2001 update:2011/9/25 12:40:18
corona forums © 2003-2011