I’m having a problem with my app while trying to make it run in android… Galaxy Tab.
I’m able to build it… and in the simulator every thing goes really well. But when I try to run it in my galaxy tab the app… i’m not sure but it looks like it has a delay… a really long delay…
It has a button that should change screen and i must click it many times to work and only in the same spot of the button.
I have no idea of what’s the problem if someone could help me I really need it.
Thanks! [import]uid: 32005 topic_id: 6774 reply_id: 306774[/import]
How large images are you trying to load?
Try to comment out some image loads and do some debugging to narrow down where the problem is. Without seeing your code its really hard to tell you what it might be. [import]uid: 8872 topic_id: 6774 reply_id: 23772[/import]
The code is not mine… I’m using one I downloaded as a Sample but here it is…
Main.lua
– EASY SCENE TRANSITIONS
– ©2011 X-PRESSIVE.COM
Scene1 = require(“scene1”)
Scene2 = require(“scene2”)
Scene3 = require(“scene3”)
CurrScene = Scene1.CreateScene()
function ChangeScene(NextScene)
– MAKE A SCREENSHOT OF THE SCENE TO REMOVE,
– CENTER & SCALE SCREENSHOT TO CORRECT SIZE
local Screenshot = display.captureScreen( false )
Screenshot.yScale = (display.contentHeight/ Screenshot.height)
Screenshot.xScale = Screenshot.yScale
Screenshot.x = display.contentWidth *.5
Screenshot.y = display.contentHeight*.5
– REMOVE THE CURRENT SCENE (SCREENSHOT STAYS)
CurrScene:removeSelf()
– CREATE A NEW SCENE AND LET IT FLY IN
CurrScene = NextScene.CreateScene()
transition.from (CurrScene, { time = 0, y = -500 } )
– PUT THE SCREENSHOT TO FRONT AGAIN
display:getCurrentStage():insert(Screenshot)
– ANIMATE THE SCREENSHOT (FLY OUT)
transition.to(Screenshot, {
time = 0,
xScale = 0.1,
yScale = 0.1,
rotation = 360,
transition = easing.inQuad,
onComplete = function() Screenshot:removeSelf(); Screenshot = nil end
})
end
Screen1.lua
module(…, package.seeall)
local Rand = math.random
local screenW = display.contentWidth
local screenH = display.contentHeight
function CreateScene()
Group = display.newGroup()
local Shape = display.newRect(Group, 0,0, screenW,screenH)
Shape:setFillColor( Rand()*128,Rand()*128,Rand()*128,255 )
for i = 1,20 do
Shape = display.newCircle(Group, Rand()*screenW, Rand()*screenH, Rand()*50)
Shape:setFillColor( Rand()*128,Rand()*128,Rand()*128, 255 )
end
local Text = display.newText(Group, “SCENE 1”, screenW*.25, screenH*.4, native.systemFont, 60)
Text:setTextColor(255, 255, 255)
local Button = display.newImage(Group, “button.png”, screenW*.32, screenH*.7)
Button:addEventListener(“tap”, function()
ChangeScene(Scene2)
end)
return Group
end
This is actually the original code… I tried running just it, but still doesn’t work…
Ideas are welcome!
Thanks! [import]uid: 32005 topic_id: 6774 reply_id: 24248[/import]