- トレース開始フレーム
var mc = shine;
var xcoords = "";
var ycoords = "";
var widths = "";
var heights = "";
var alphas = "";
addEventListener(Event.ENTER_FRAME,traceMc);
function traceMc(event:Event) {
xcoords += (mc.x + ",");
ycoords += (mc.y + ",");
widths += (mc.width + ",");
heights += (mc.height + ",");
alphas += (mc.alpha + ",");
}
- トレース終了フレーム
trace( "xcoords = { " + xcoords.slice( 0, -1 ) + " }");
trace( "ycoords = { " + ycoords.slice( 0, -1 ) + " }");
trace( "widths = { " + widths.slice( 0, -1 ) + " }");
trace( "heights = { " + heights.slice( 0, -1 ) + " }");
trace( "alphas = { " + alphas.slice( 0, -1 ) + " }");
removeEventListener(Event.ENTER_FRAME, traceMc);
stop();
- Corona
(Paste coords trace info from Flash)
local i = 1
local function moveObject()
if i <= #xcoords then
object.x = xcoords[i]
object.y = ycoords[i]
object.width = widths[i]
object.height = heights[i]
i = i + 1
else
Runtime:removeEventListener( "enterFrame", moveObject )
end
end
Runtime:addEventListener('enterFrame', moveObject)