Hey guys.
I am using the moveclip library to show some animations for my app.
when I use it twice (2 instances) it causes my graphics not to show and others to get pushed off the screen.?
Any ideas? Code below :
[code]
module(…, package.seeall)
soundImg = movieclip.newAnim{
“resources/images/Sounds/Airplane_Cabin.png”,
“resources/images/Sounds/Crickets.png”,
“resources/images/Sounds/Heavy_Rain.png”,
“resources/images/Sounds/Heavy_Rain_2.png”,
“resources/images/Sounds/Heavy_Rain_3.png”,
“resources/images/Sounds/Lashing_Rain.png”,
“resources/images/Sounds/Light_Rain.png”,
“resources/images/Sounds/River.png”,
“resources/images/Sounds/Seashore.png”,
“resources/images/Sounds/Thunder.png”};
durationImg = moveclip.newAnim{
“resources/images/Duration/30_Mins.png”,
“resources/images/Duration/1_Hour.png”,
“resources/images/Duration/2_Hours.png”};
soundImg.x = 160; soundImg.y = 86;
durationImg.x = 160; durationImg.y = 140;
local button1Press = function( event )
if soundNo < 2 then
soundNo = 11
end
soundNo = soundNo - 1
soundImg:previousFrame()
end
local button1Release = function( event )
end
local button2Press = function(event)
if soundNo > 9 then
soundNo = 0
end
soundNo = soundNo + 1;
soundImg:nextFrame()
end
local button2Release = function(event)
end
function new()
local g = display.newGroup()
local background = display.newImage(“resources/images/Background.png”, 0, 0);
local button1 = ui.newButton{
default = minusImg[1],
over = minusImg[2],
onPress = button1Press,
onRelease = button1Release,
id = “minusButton”,
text = “”,
emboss = true
}
local button2 = ui.newButton{
default = plusImg[1],
over = plusImg[2],
onPress = button2Press,
onRelease = button2Release,
id = “plusButton”,
text = “”,
emboss = true
}
button1.x = 22; button1.y = 87
button2.x = 298; button2.y = 87
g:insert(background)
g:insert(button1)
g:insert(button2)
g:insert(soundImg)
g:insert(durationImg)
function g:cleanUp()
–g:removeSelf()
end
return g
end
[/code] [import]uid: 6981 topic_id: 2132 reply_id: 302132[/import]