Vcam in Adobe Animate CC is not working correctly. PLEASE HELP :(
hi guys,
i used use vcams animations in versions of flash , worked fine. adobe has renamed flash "animate cc" , scrapped as2 (as3 thing available) no vcams seem working. have tried bunch of different ones on web including forum posts here , "draw jazza".
yes, have been using as3 ones. have tried resizing rectangle inside symbol have suggested warps artwork.
this draw jazza's as3 vcam in animate cc in 1920px x 1080px stage. code @ bottom too.
1. how have set up: https://s11.postimg.org/uf8s88a6r/vcam_setup.png
2. how displays when preview movie: https://s11.postimg.org/oscfar7o3/vcam_result.png
3. can see here settings of vcam: https://s11.postimg.org/flyq17rtf/vcam_settings.png
4. , shows inside of symbol - registration in centre (but acts though it's in bottom right or when preview it??): https://s11.postimg.org/7hqlwh5eb/vcam_symbol_settings.png
5. , finally, how exporting... not playing correctly either: https://s14.postimg.org/buawvz2gx/export_settings.png
i don't know actionscript cannot recognize mistakes in code, have used vcam many times before old versions of flash , has worked fine. here code below:
import flash.events.event;
import flash.geom.matrix;
import flash.geom.rectangle;
import flash.geom.point;
visible = false;
addeventlistener(event.enter_frame, handleenterframe);
function handleenterframe(event:event):void {
if (parent) {
parent.scalex = 1 / scalex;
parent.scaley = 1 / scaley;
if (rotation == 0) {
parent.x = (width / 2 - x) / scalex;
parent.y = (height / 2 - y) / scaley;
parent.rotation = 0;
} else {
var bounds:rectangle = getbounds(this);
var angle:number = rotation * math.pi / 180;
var midx:number = -x / scalex;
var midy:number = -y / scaley;
var rx:number = -bounds.width / 2;
var ry:number = -bounds.height / 2;
var cos:number = math.cos(angle);
var sin:number = math.sin(angle);
var rotatedx:number = rx * cos - ry * sin;
var rotatedy:number = ry * cos + rx * sin;
var cornerx:number = midx - rotatedx;
var cornery:number = midy - rotatedy;
cos = math.cos(-angle);
sin = math.sin(-angle);
parent.x = cornerx * cos - cornery * sin;
parent.y = cornery * cos + cornerx * sin;
parent.rotation = -rotation;
}
}
}
addeventlistener(event.removed, handleremoved, false, 0, true);
function handleremoved(event:event):void {
removeeventlistener(event.enter_frame, handleenterframe);
removeeventlistener(event.removed, handleremoved);
}
thank
hi all!
update, have gotten working!!! not code though... had make own vcam using tutorial: http://bitey.com/smf/index.php/topic,705.0.html
in animate cc, appears can't choose registration point when making new symbol. so, make sure when draw rectangle inside symbol, align vertical , horiztonal centres crosshairs in centre of rectangle. , voila! sure put below code on same frame rectangle inside symbol
<strong>i used as3 code:</strong>
var cameratrans:transform = new transform(this);
var stagetrans:transform = new transform(parent);
visible = false;
stage.addeventlistener(event.enter_frame, updatestage);
function updatestage(...rest) {
parent.filters = filters;
stagetrans.colortransform = cameratrans.colortransform;
var stagematrix:matrix = cameratrans.matrix;
stagematrix.invert();
stagematrix.translate(stage.stagewidth*.5, stage.stageheight*.5);
stagetrans.matrix = stagematrix;
};
updatestage();
addeventlistener(event.removed_from_stage, resetstage);
function resetstage(...rest) {
stage.removeeventlistener(event.enter_frame, updatestage);
stagetrans.matrix = new matrix();
stagetrans.colortransform = new colortransform();
parent.filters = new array();
}
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment