MovieClip Event.COMPLETE: Difference between revisions
From GiderosMobile
Created page with "'''<translate>Available since</translate>:''' Gideros 2012.2.1<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' Special:MyLang..." |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
''' | '''Available since:''' Gideros 2012.2.1<br/> | ||
''' | '''Value:''' complete<br/> | ||
''' | '''Defined by:''' [[MovieClip]]<br/> | ||
=== Description === | === Description === | ||
This event is dispatched when a | This event is dispatched when a '''MovieClip''' object finishes playing (by reaching its final frame or a frame with stop action). | ||
=== Example === | |||
<syntaxhighlight lang="lua"> | |||
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) | |||
</syntaxhighlight> | |||
{{MovieClip}} | |||
Latest revision as of 19: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)