Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
animation — Gideros Forum

animation

JackoJacko Member
edited July 2014 in General questions
Im new in gideros and I want to know how to create simple animation with 2 pictures that stey in one position.
please help.

Comments

  • Here you go
    local frames = {}
    	local bmp
    	for i = 1, 2 do
    		bmp = Bitmap.new(Texture.new("images/Homepage"..i..".png", true))
    		bmp:setAnchorPoint(0.5, 0.5)
    		frames[#frames+1] = bmp
    	end
    	--arrange frames
    	Animated_menu_bg = MovieClip.new{
    		{1, 15, frames[1]}, 
    		{16, 30, frames[2]}, 
    	}
    	--loop animation
    	Animated_menu_bg:setGotoAction(30, 1)
    	--start playing
    	Animated_menu_bg:gotoAndPlay(1)
    	Animated_menu_bg:setPosition(200,200)
    	self:addChild(Animated_menu_bg)
    also you can take a look at examples shipped with Gideros and also refer this site for learning http://appcodingeasy.com/Gideros-Mobile

    :)

    Likes: Jacko

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.