Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Saulius Gaižutis
  3. 2018-06-04
  4. PC nr.23
  5. EGZAMINAS
  6.     */
  7. app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
  8. app.newProject();
  9. var aR = 1;
  10. var compDuration = 5;
  11. var fps = 25;
  12. var backgroundColor=([255,255,255]/255);
  13. var compWidth;
  14. var compHeigth=prompt("Ivesti kompozicijos auksti",1080);
  15. if(isNaN(compHeigth)||compHeigth==null || compHeigth==''||compHeigth % 1 !==0){
  16.     alert("blogai ivesti duomenys  bus palikta default reiksme",1080);    
  17.     compHeigth=1080;    
  18. }
  19. compWidth=compHeigth*16/9;
  20. compHeigth=parseInt(compHeigth);
  21. var myComp=app.project.items.addComp("myComp",compWidth,compHeigth,aR,compDuration,fps);
  22. myComp.openInViewer();
  23. var shapeEllipse=myComp.layers.addShape();
  24. shapeEllipse.name = ("Ellipse");
  25. var checkBox=shapeEllipse.property("Effects").addProperty("ADBE Checkbox Control");
  26. var checkBoxName=checkBox.name=("Enable layer");
  27. var chEnable=prompt("Layer pradzioje isjungtas-0 ijungtas-1",1);
  28. if(isNaN(chEnable)||chEnable==null || chEnable==''||chEnable % 1 !==0){
  29.     alert("blogai ivesti duomenys  bus palikta default reiksme",1080);    
  30.     chEnable=1;    
  31. }
  32. shapeEllipse.effect(checkBoxName).property("Checkbox").setValue(chEnable);
  33. var ellipseShapeGroup=shapeEllipse.property("Contents").addProperty("ADBE Vector Group");
  34. var ellipse=ellipseShapeGroup.property("Contents").addProperty("ADBE Vector Shape - Ellipse");
  35. shapeEllipse.property("Transform").property("Position").setValue([compWidth/2,compHeigth/2]);
  36. var ellipseSizeValue=100;
  37. ellipse.property("Size").setValue([ellipseSizeValue*2,ellipseSizeValue]);
  38. shapeEllipse.property("Transform").property("Scale").setValue([80,80]);
  39. var ellipseFill=ellipseShapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");
  40. ellipseFill.property("Color").setValue([0,255,255]/255);
  41. shapeEllipse.property("Transform").property("Opacity").expression='''
  42. var chState=effect("Enable layer")("Checkbox");
  43. if(chState==true){
  44.    [100];
  45. }
  46. else{
  47.    [0];
  48. }
  49. ''';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement