My image appears, and i put the following code in,
(that is only a little section of the code) I want to know, how to make it so that, after two seconds, the image disappears, and then the Director Class transitions to level1. Please tell me how. Thanks.
[code]
local mainGroup = display.newGroup()
local image = display.newImage(“loading.png”)
image.x = display.contentWidth/2
image.y = display.contentHeight/2
local function main()
mainGroup:insert(director.directorView)
local tmr = timer.performWithDelay(2000, main, 1)
director:changeScene( “level1” )
return true
end
[/code] [import]uid: 19768 topic_id: 6642 reply_id: 306642[/import]
Yea I fixed it. I just added a new timer. I put a timer to wait ty’ll 1500 miliseconds before transitioning. And then I did a removeImage function, and set it to the same timer. [import]uid: 19768 topic_id: 6642 reply_id: 23533[/import]
Speaking of timers. Do you know what Ricardo is referring to when he states we must clean our own Timers? I am a bit lost about this because that is the biggest part of the code that has changed over the course of the revisions to the Director Class.
I have just created the following code with the timer at the end. Is this the kind of timer he is talking about and if so how are we supposed to clean it?
Thanks
Rob
[code]local touchObject1 = function (event)
if event.phase == “ended” then
local chalkbdImage = display.newImageRect( “zImages/chalkbd.png”, 825, 568 )
chalkbdImage.x = 512; chalkbdImage.y = 384
localGroup:insert(chalkbdImage)
audio.play( slideSound )
local removechalkbd = function()
chalkbdImage:removeSelf()
end
I would not be the person you should ask. Haha i read your comment, looked at the code and was like, “umm…yea… don’t know” haha
But I do need your help that you possibly might know, go to my other thread, Collision Function Help!
Where others are submitting their ideas for the same thing! So if you know how to fix that problem in there, you fix your problem! [import]uid: 19768 topic_id: 6642 reply_id: 23541[/import]