Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Free Developer Support
Started by jamestimberlakejr Jan 26 2012 02:27 AM

- - - - -
126 replies to this topic
[TOPIC CONTROLS]
Page 2 of 6 1 2 3 4 »
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@jamestimberlakejr,

I've been doing something similar (helping out on the forums), but I like your approach. A direct offer to help.

I will offer the same thing. Anyone that needs help can contact me at: ken[at]homebrewsoftware[dot]com

I cannot promise to solve all questions, but I will do what I can to help out.

Also, if you've already asked james for help, I don't want to interfere in any support issues he is working on. Please ask ONE of us for help, not both of us unless the first person you ask says he doesn't have time.

In general I prefer to post solutions to problems here on the forums, so other users can learn too. However, if you have something you want kept private I will respect that as long as you let me know that upfront.
uid: 16734 topic_id: 20965 reply_id: 83478


[TOPIC: post.html]
#27

@RSCdev

[GLOBAL: userInfoPane.html]
@RSCdev
  • Corona Geek

  • 1,489 posts
  • Corona SDK

WOW @Ken, that`s amazing! Thanks James & Ken for offering free help! OMG it is awesome from both of you IMHO!
Cheers,
Rodrigo.
uid: 89165 topic_id: 20965 reply_id: 83483


[TOPIC: post.html]
#28

Blickon

[GLOBAL: userInfoPane.html]
Blickon
  • Contributor

  • 269 posts
  • Guests

Hi jamestimberlakejr, thanks for all your availability, how i can send you the code?
uid: 26056 topic_id: 20965 reply_id: 83508


[TOPIC: post.html]
#29

iAZZoZiTTi

[GLOBAL: userInfoPane.html]
iAZZoZiTTi
  • Observer

  • 11 posts
  • Corona SDK

Hi James .. great idea and offer

would you like to see this :
2 Questions regarding "Page Curl" :
http://developer.anscamobile.com/node/20435

thanks alot
uid: 95767 topic_id: 20965 reply_id: 83514


[TOPIC: post.html]
#30

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

@James,

I added two variables to get the current velocity.

In my onFrame event I was checking if they went to far and did a reverse of the "power" - but that made my player just bumping around uncontrolled. Do you think you can provide some small code samples?

Joakim
uid: 81188 topic_id: 20965 reply_id: 83522


[TOPIC: post.html]
#31

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@Ken,
That's awesome. I'm glad that someone else is also doing this too. I'll send you an email.

@Blickon
You can send me your code at jamestimberlakejr[at]gmail[dot]com

@iAZZ
I'll take a look at it tonight and see what I can do.

@jk
I need to see the way you're doing it so I can point you into the right direction. Post me your code of how you're doing it and I can revise it. If you don't feel comfortable with that, then use email.
uid: 49520 topic_id: 20965 reply_id: 83553


[TOPIC: post.html]
#32

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@Ken,
That's awesome. I'm glad that someone else is also doing this too. I'll send you an email.

@Blickon
You can send me your code at jamestimberlakejr[at]gmail[dot]com

@iAZZ
I'll take a look at it tonight and see what I can do.

@jk
I need to see the way you're doing it so I can point you into the right direction. Post me your code of how you're doing it and I can revise it. If you don't feel comfortable with that, then use email.

@Rc, Thanks. I really appreciate the support.
uid: 49520 topic_id: 20965 reply_id: 83554


[TOPIC: post.html]
#33

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

Hi, well I maybe looks stupid but I couldn't think of any other direction then this.

I putted it in onFrame event....

	--============================================================
-- FRAME LISTENER
--============================================================
local function onFrame()
	Particles.Update()	

	--Check if game is running
    
	if(isPlaying) then
		
                --Check speed of player and put on brakes if he is going to fast...
		vx, vy = ball:getLinearVelocity()
	
		if(vx > 200) then
			ball:applyLinearImpulse( -200, 0, ball.x, ball.y )
		end
			

                        --Control camera movment
			gameGroup.x = (ball.x * -1)+240
				
			if(ball.y<250) then
				if(ball.y>-100) then
					gameGroup.y =  ((ball.y * -1) +250)-5
					ball.jumping = true
					if gameGroup.y < 1 then
						gameGroup.y=1
					end
				end
			end
			
		
		--Move the parallax
		myParallax:setPosition(myParallax.position.x + lastBallX - ball.x, 0)	

		lastBallX = ball.x	
		lastBallY = ball.y
		
		--Check if player is on moving platform - if so, make it follow
		if attachedPlatform then
			ball.x = ActivePlatform.x - PlatformOffset
			ball.jumping = true
 		end
	end

end

uid: 81188 topic_id: 20965 reply_id: 83561


[TOPIC: post.html]
#34

rarmstrong

[GLOBAL: userInfoPane.html]
rarmstrong
  • Observer

  • 29 posts
  • Corona SDK

@ jamestimberlakejr

Just sent you an email. Thanks!
uid: 47361 topic_id: 20965 reply_id: 83592


[TOPIC: post.html]
#35

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@jk,
Why not try modifying the velocity of the object directly then?

if(vx > 200) then                     -- use zero to stop, -200 to go backwards                        ball:setLinearVelocity( -200, vy )                end


Try this and let me know if it helps.

@iazz,

Can I see the code you're working with so I can see the problem you're having? I wasn't able to do it with the code I saw there.
uid: 49520 topic_id: 20965 reply_id: 83857


[TOPIC: post.html]
#36

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

@James, that did the trick. Thanks!

Joakim
uid: 81188 topic_id: 20965 reply_id: 83935


[TOPIC: post.html]
#37

iAZZoZiTTi

[GLOBAL: userInfoPane.html]
iAZZoZiTTi
  • Observer

  • 11 posts
  • Corona SDK

Hi james , here is the full code :

-- hide the status bar
display.setStatusBar( display.HiddenStatusBar )

-- create example pages
local page1 = display.newImageRect( "page1.jpg", display.contentWidth, display.contentHeight )
page1:setReferencePoint( display.TopleftReferencePoint )
page1.x, page1.y = display.contentWidth*0.5, display.contentHeight*0.5

local page2 = display.newImageRect( "page2.jpg", display.contentWidth, display.contentHeight )
page2.x, page2.y = display.contentWidth*0.5, display.contentHeight*0.5
page2:toBack()

local page3 = display.newImageRect( "page3.jpg", display.contentWidth, display.contentHeight )
page3:setReferencePoint( display.TopleftReferencePoint )
page3.x, page3.y = display.contentWidth*0.5, display.contentHeight*0.5
page3:toBack()

local page4 = display.newImageRect( "page4.jpg", display.contentWidth, display.contentHeight )
page4.x, page4.y = display.contentWidth*0.5, display.contentHeight*0.5
page4:toBack()
local curlPage = display.newImageRect( "curlPage.png", display.contentWidth, display.contentHeight )
curlPage.x, curlPage.y = display.contentWidth*0.5, display.contentHeight*0.5
curlPage.isVisible = false

-- group to hold the page that will be turned (as well as the "curl" page)
local turnGroup = display.newGroup()
 
-- The following function will turn the page "back"
local function gotoPrevious( curlPage, time )
	
	local time = time or 500
	
	curlPage.isVisible = true
	local hideCurl = function()
		curlPage.isVisible = false
		turnGroup:setMask( nil )
	end
	transition.to( turnGroup, {maskX=display.contentWidth*0.5+100, time=time } )
	transition.to( curlPage, { rotation=45, x=display.contentWidth+(display.contentWidth*0.10)
	, y=display.contentHeight + (display.contentHeight*0.25), time=time, onComplete=hideCurl })
end
-- The following function will turn the page "forward"
local function gotoNext( currentPage, curlPage, time )
	-- add "pages" to page turning group
	turnGroup:insert( currentPage)
	turnGroup:insert( curlPage )
	
	-- mask should match dimensions of content (e.g. content width/height)
	local curlMask = graphics.newMask( "mask_640x960.png" )	-- iPhone portrait
	--local curlMask = graphics.newMask( "mask_768x1024.png" )	-- iPad portrait
	turnGroup:setMask( curlMask )
	
	-- set initial mask position
	turnGroup.maskX = display.contentWidth * 0.5+100
	turnGroup.maskY = display.contentHeight * 0.5

	-- prepare the page-to-be-turned and the curl image
	currentPage:setReferencePoint( display.BottomRightReferencePoint )
	curlPage:setReferencePoint( display.BottomRightReferencePoint )
	curlPage.rotation = 45
	curlPage.x = display.contentWidth+(display.contentWidth*0.10)
	curlPage.y = display.contentHeight + (display.contentHeight*0.25)
	curlPage.isVisible = true
	
	-- show pagecurl animation and transition away (next page should already be in position)
	local time = time or 500
	transition.to( turnGroup, { maskX=-display.contentWidth*0.75, time=time } )
	transition.to( curlPage, { rotation=0, x=0, y=display.contentHeight+20, time=time} )
	curlPage.yScale = curlPage.y * 0.2
end

local function swipe(event)
          local swipeLength = math.abs(event.x - event.xStart) 
          local currentPage = event.target
		  if event.phase == "moved"  then
		        if event.xStart > event.x then
					gotoNext (currentPage, curlPage, 1000)
                elseif event.x > event.xStart then
				    gotoPrevious(curlPage,1000)
				end
           end
           return true
end

page1:addEventListener( "touch" , function() gotoNext( page1,curlPage,1000 ) return true end )
page2:addEventListener( "touch" , swipe )
page3:addEventListener( "touch" , swipe )
page4:addEventListener( "touch" , function() gotoPrevious(curlPage,1000) return true end )

Notes :
- Just put 4 pages in the project folder and name them as : page1.png , page2.png .. etc
- First page is registed to gotoNext() function b/c no page before .
- Last page is registed to gotoPrevious() function b/c no page after .

Thanks ^_^
uid: 95767 topic_id: 20965 reply_id: 83977


[TOPIC: post.html]
#38

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@iAZZ,

For some reason I didn't see your reply. I'll get on this evening and give you a response.
uid: 49520 topic_id: 20965 reply_id: 84964


[TOPIC: post.html]
#39

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

@James, I am having problems and posted this a couple of days....Is it possible for you to just check if you can see any strange things going on...or could this be a corona bug?

https://developer.anscamobile.com/forum/2012/02/04/vertical-and-horizontal-moving-platform-problems
Best regards, Joakim
uid: 81188 topic_id: 20965 reply_id: 85022


[TOPIC: post.html]
#40

iAZZoZiTTi

[GLOBAL: userInfoPane.html]
iAZZoZiTTi
  • Observer

  • 11 posts
  • Corona SDK

thanks james .. waiting for your response ^_^
uid: 95767 topic_id: 20965 reply_id: 85027


[TOPIC: post.html]
#41

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@iAzz,
I'm need some more time to look at it. I'll look at it again tomorrow and let you know what I come up with.

@jk,
I'll take a look at that as well.
uid: 49520 topic_id: 20965 reply_id: 85109


[TOPIC: post.html]
#42

iAZZoZiTTi

[GLOBAL: userInfoPane.html]
iAZZoZiTTi
  • Observer

  • 11 posts
  • Corona SDK

Hi james ,

I have uploaded my code file and assets in rar file on :
http://www.mediafire.com/?1gp8t4rf2m6iabh

^_^
uid: 95767 topic_id: 20965 reply_id: 86665


[TOPIC: post.html]
#43

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@iazz,

I got super busy (randomly, i might add) and I have been trying to recreate the issue you're having and I haven't been able to do it. This will surely help.

@jk,

I can't see an issue with the code you showed off hand, do you have a example project so i can recreate the issue?
uid: 49520 topic_id: 20965 reply_id: 86800


[TOPIC: post.html]
#44

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

@james, i will send you the project by mail.

Joakim
uid: 81188 topic_id: 20965 reply_id: 86809


[TOPIC: post.html]
#45

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

@jamestimberlakejr,

I had no problem duplicating @iAZZoZiTTi's issue. I have a partial solution, but need a bit more time to address a secondary issue in the code Jonathan Beebe wrote (and that iAZZ's sample is based on).

I'll devote some more time to it tomorrow.

Ken
uid: 16734 topic_id: 20965 reply_id: 86810


[TOPIC: post.html]
#46

KenRogoway

[GLOBAL: userInfoPane.html]
KenRogoway
  • Contributor

  • 272 posts
  • Corona SDK

Page Curl is now fully functional and you can find the code for it here:

http://developer.anscamobile.com/code/page-curl

Ken
uid: 16734 topic_id: 20965 reply_id: 86925


[TOPIC: post.html]
#47

iAZZoZiTTi

[GLOBAL: userInfoPane.html]
iAZZoZiTTi
  • Observer

  • 11 posts
  • Corona SDK

ken and james thanks both for spending time trying solve my problem

ken your code works great

Thanks
uid: 95767 topic_id: 20965 reply_id: 86961


[TOPIC: post.html]
#48

jamestimberlakejr

[GLOBAL: userInfoPane.html]
jamestimberlakejr
  • Enthusiast

  • 86 posts
  • Corona SDK

@Ken,

Good job man! I looked at the code too and good stuff!!

@jk,

I got the code and i'll check it out tomorrow
uid: 49520 topic_id: 20965 reply_id: 87043


[TOPIC: post.html]
#49

jkrassman

[GLOBAL: userInfoPane.html]
jkrassman
  • Contributor

  • 573 posts
  • Corona SDK

@James or @Ken,

Why the heck is this not working?

https://developer.anscamobile.com/forum/2012/02/17/removeeventlistener-not-working-it-did

Best regards, Joakim
uid: 81188 topic_id: 20965 reply_id: 87557


[TOPIC: post.html]
#50

derek12

[GLOBAL: userInfoPane.html]
derek12
  • Observer

  • 19 posts
  • Corona SDK

Hey Rarmstrong - I'm looking to build a glossary type list as well with this functionality - you get anywhere with this?
uid: 88842 topic_id: 20965 reply_id: 88687



[topic_controls]
Page 2 of 6 1 2 3 4 »
 
[/topic_controls]