Difference between revisions of "MovieClip Event.COMPLETE"
From GiderosMobile
Line 21: | Line 21: | ||
stage:addChild(mc2) | stage:addChild(mc2) | ||
-- listeners | -- listeners | ||
− | mc2:addEventListener(Event.COMPLETE, function( | + | mc2:addEventListener(Event.COMPLETE, function() |
print("movie clip stopped") | print("movie clip stopped") | ||
end) | end) |
Latest revision as of 20:16, 22 August 2024
Available since: Gideros 2012.2.1
Value: complete
Defined by: MovieClip
Description
This event is dispatched when a MovieClip object finishes playing (by reaching its final frame or a frame with stop action).
Example
local pixel = Pixel.new(0xff0000, 1, 64, 64)
local timing2 = 300
local mc2 = MovieClip.new{
{1, timing2, pixel, {x={10, 100, "easeOut"}}},
}
mc2:gotoAndPlay(1)
-- position
mc2:setPosition(128, 128)
-- scale
mc2:setScale(1.25, 1.25)
-- order
stage:addChild(mc2)
-- listeners
mc2:addEventListener(Event.COMPLETE, function()
print("movie clip stopped")
end)