hy daniel!
If i remember ... onInit run when the the program start... try to
define the model when the marker was added...
i think if you use ezflar he gonna handle that for you, he started the
animation from beggining every time the marker was found:
import com.tchatcho.EZflar;
import com.transmote.flar.FLARMarkerEvent;
private var _ezflar:EZflar;
private var _symbols:Array = new Array();
//put dae in models folder, pat in resources (with the others)
_symbols.push([[“marker.pat”, “sombrilla.dae”]]);
_ezflar = new EZflar( _symbols );
_ezflar.mirror();
_ezflar.initializer(stage);
_ezflar.onAdded(function(marker:FLARMarkerEvent):void {
_ezflar.getObject(0).rotationX = -90;
_ezflar.getObject(0).z = 90;
});
i hope you enjoy!!
[]s
Tcha=Tcho