Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Saulius Gaižutis
- 2018-06-04
- PC nr.23
- EGZAMINAS
- */
- app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
- app.newProject();
- var aR = 1;
- var compDuration = 5;
- var fps = 25;
- var backgroundColor=([255,255,255]/255);
- var compWidth;
- var compHeigth=prompt("Ivesti kompozicijos auksti",1080);
- if(isNaN(compHeigth)||compHeigth==null || compHeigth==''||compHeigth % 1 !==0){
- alert("blogai ivesti duomenys bus palikta default reiksme",1080);
- compHeigth=1080;
- }
- compWidth=compHeigth*16/9;
- compHeigth=parseInt(compHeigth);
- var myComp=app.project.items.addComp("myComp",compWidth,compHeigth,aR,compDuration,fps);
- myComp.openInViewer();
- var shapeEllipse=myComp.layers.addShape();
- shapeEllipse.name = ("Ellipse");
- var checkBox=shapeEllipse.property("Effects").addProperty("ADBE Checkbox Control");
- var checkBoxName=checkBox.name=("Enable layer");
- var chEnable=prompt("Layer pradzioje isjungtas-0 ijungtas-1",1);
- if(isNaN(chEnable)||chEnable==null || chEnable==''||chEnable % 1 !==0){
- alert("blogai ivesti duomenys bus palikta default reiksme",1080);
- chEnable=1;
- }
- shapeEllipse.effect(checkBoxName).property("Checkbox").setValue(chEnable);
- var ellipseShapeGroup=shapeEllipse.property("Contents").addProperty("ADBE Vector Group");
- var ellipse=ellipseShapeGroup.property("Contents").addProperty("ADBE Vector Shape - Ellipse");
- shapeEllipse.property("Transform").property("Position").setValue([compWidth/2,compHeigth/2]);
- var ellipseSizeValue=100;
- ellipse.property("Size").setValue([ellipseSizeValue*2,ellipseSizeValue]);
- shapeEllipse.property("Transform").property("Scale").setValue([80,80]);
- var ellipseFill=ellipseShapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");
- ellipseFill.property("Color").setValue([0,255,255]/255);
- shapeEllipse.property("Transform").property("Opacity").expression='''
- var chState=effect("Enable layer")("Checkbox");
- if(chState==true){
- [100];
- }
- else{
- [0];
- }
- ''';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement