Adobe script for rotation and position

I am new to adobe script and actions (very new. like starting today, right now).
First I just want to know if what I'm trying to do it even possible.
Imagine a simple rectangle in photoshop.
I have a table of angles and coordinates (could be an an excel file or any kind of text file). let's say 10 rows. column A = angles and columns B and C are x and y coordinates, respectively.
I want to somehow have photoshop read this list, and make 10 layers that have the rectangle at the position and angle specified by each row of the table.
then, I want a timeline with 10 frames, each one having only the appropriate, sequential layer visible.
Is that possible?
If so, does anyone have any suggestions. I've never written script in adobe, but do have some programming experience in other oldschool languages.
and maybe a link that explain how to use the script once it's written?
thanks

It is not so good to provide the first post in a thread one has started oneself. Edit: At least that’s my opinion on this issue.
The Forum has been made worse recently in some regards, one of which makes it less easy to notice that the OP has posted a reply and not someone else.
Anyways, maybe this helps.
It uses and array or arrays of the basis of the transformation of the active layer.
// 2014, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var originalRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var myDocument = app.activeDocument;
var theLayer = smartify2010 (myDocument.activeLayer);
var theW = theLayer.bounds[2] - theLayer.bounds[0];
var theH = theLayer.bounds[3] - theLayer.bounds[1];
var theCenter = [theLayer.bounds[0] + theW/2, theLayer.bounds[1] + theH/2];
var theValues = [[0, 0, 15], [100, 100, 30], [300, 300, 45]];
for (var m = 0; m < theValues.length; m++) {
myDocument.activeLayer = theLayer;
duplicateMoveRotateScale (theValues[m][0] - Number(theCenter[0]), theValues[m][1] - Number(theCenter[1]), 100, 100, theValues[m][2]);
app.preferences.rulerUnits = originalRulerUnits;
////// duplicate and transform layer //////
function duplicateMoveRotateScale (theX, theY, theScaleX, theScaleY, theRotation) {
try{
// =======================================================
var idTrnf = charIDToTypeID( "Trnf" );
    var desc10 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref6 = new ActionReference();
        var idLyr = charIDToTypeID( "Lyr " );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref6.putEnumerated( idLyr, idOrdn, idTrgt );
    desc10.putReference( idnull, ref6 );
    var idFTcs = charIDToTypeID( "FTcs" );
    var idQCSt = charIDToTypeID( "QCSt" );
    var idQcsa = charIDToTypeID( "Qcsa" );
    desc10.putEnumerated( idFTcs, idQCSt, idQcsa );
    var idOfst = charIDToTypeID( "Ofst" );
        var desc11 = new ActionDescriptor();
        var idHrzn = charIDToTypeID( "Hrzn" );
        var idPxl = charIDToTypeID( "#Pxl" );
        desc11.putUnitDouble( idHrzn, idPxl, theX );
        var idVrtc = charIDToTypeID( "Vrtc" );
        var idPxl = charIDToTypeID( "#Pxl" );
        desc11.putUnitDouble( idVrtc, idPxl, theY );
    var idOfst = charIDToTypeID( "Ofst" );
    desc10.putObject( idOfst, idOfst, desc11 );
    var idWdth = charIDToTypeID( "Wdth" );
    var idPrc = charIDToTypeID( "#Prc" );
    desc10.putUnitDouble( idWdth, idPrc, theScaleX );
    var idHght = charIDToTypeID( "Hght" );
    var idPrc = charIDToTypeID( "#Prc" );
    desc10.putUnitDouble( idHght, idPrc, theScaleY );
    var idAngl = charIDToTypeID( "Angl" );
    var idAng = charIDToTypeID( "#Ang" );
    desc10.putUnitDouble( idAngl, idAng, theRotation );
    var idIntr = charIDToTypeID( "Intr" );
    var idIntp = charIDToTypeID( "Intp" );
    var idbicubicAutomatic = stringIDToTypeID( "bicubicAutomatic" );
    desc10.putEnumerated( idIntr, idIntp, idbicubicAutomatic );
    var idCpy = charIDToTypeID( "Cpy " );
    desc10.putBoolean( idCpy, true );
executeAction( idTrnf, desc10, DialogModes.NO );
} catch (e) {}
////// function to smartify if not //////
function smartify2010 (theLayer) {
// make layers smart objects if they are not already;
  app.activeDocument.activeLayer = theLayer;
// process pixel-layers and groups;
      if (theLayer.kind == "LayerKind.GRADIENTFILL" || theLayer.kind == "LayerKind.LAYER3D" || theLayer.kind == "LayerKind.NORMAL" ||
      theLayer.kind == "LayerKind.PATTERNFILL" || theLayer.kind == "LayerKind.SOLIDFILL" ||
      theLayer.kind == "LayerKind.TEXT" || theLayer.kind == "LayerKind.VIDEO" || theLayer.typename == "LayerSet") {
  var id557 = charIDToTypeID( "slct" );
  var desc108 = new ActionDescriptor();
  var id558 = charIDToTypeID( "null" );
  var ref77 = new ActionReference();
  var id559 = charIDToTypeID( "Mn  " );
  var id560 = charIDToTypeID( "MnIt" );
  var id561 = stringIDToTypeID( "newPlacedLayer" );
  ref77.putEnumerated( id559, id560, id561 );
  desc108.putReference( id558, ref77 );
  executeAction( id557, desc108, DialogModes.NO )
  return app.activeDocument.activeLayer
  if (theLayer.kind == LayerKind.SMARTOBJECT || theLayer.kind == "LayerKind.VIDEO") {return theLayer};

Similar Messages

  • Can you change the units used for size and position in layout editor?

    Hello,
    In Aperture 3.4, does anyone know if you can change the units used for size and position in layout editor?  The page is set in inches, but the image size and position are given in centimetres and I would prefer to work all in inches to create custom layouts.  I can't see any way to change this.  If anyone knows how it would be much appreciated.  Thanks!

    Aperture uses the unit settings defined in the System Preferences.  Set the "Measurement Units" in the "Region" tab of the "Language & Text" preferences to "US"; the Aperture will display the Size & Position in inches, if it is the "Book" layout manager you are asking about.
    Merry Christmas!
    Léonie

  • Shell Script  for Startup and Shutdown the database

    Hi,
    i want Shell Script for Startup and Shutdown the database in Solaries.
    could any one can hep me where i can get this script. or send to me to [email protected]
    Thanks & Regards,
    Gangi reddy

    SHUTDOWN
    SHUTDOWN ABORT]
    Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
    Terms
    Refer to the following list for a description of each term or clause:
    ABORT
    Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
    Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
    You must use this option if a background process terminates abnormally.
    IMMEDIATE
    Does not wait for current calls to complete or users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    NORMAL
    NORMAL is the default option which waits for users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    TRANSACTIONAL [LOCAL]
    Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
    No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
    The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
    Usage
    SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
    You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
    Joel Pérez

  • Does Adobe Reader for iOS and Android Support Encryption with PKI Solution?

    Hello there,
    I have been searching for an answer whether or not Adobe Reader for iOS and Android can read encrypted PDF files by public key infrastructure solution (encrypted by a public key, to be decrypted by its private key pair), but to date I have not found the answer.  From the Adobe web site, I understand that Adobe Reader for Android supports to read encrypted document by AES256 but it does not mention about PKI.  I had to guess that it does not support encryption with PKI but I would just like to get a formal answer, and would like to know whether Adobe Reader Mobile will support it. 
    Thanks!
    Masaya

    Hi there,
    Now we have Acrobat DC Mobile but I am still wondering if encryption/description using PKI solution (digital certificates) is supported.  Could anyone let me know?  Thank you.
    Masaya

  • Need steps to create ant scripts for publishing and deploying projects.

    Need steps to create ant scripts for publishing and deploying projects.
    Have got ant, Oracle BPM Enterprise WL edition installed , Need to know what are the other configurations to be done.
    Any working example would help me to understand, please do mail me at [email protected]
    Thanks in advance.
    -Sree

    Sreekant,
    Please find the build file to publish and deploy.
    <project name="deployProject"
    xmlns:fuego="antlib:fuego.tools.ant.enterprise"
    xmlns:fuego.j2ee="antlib:fuego.tools.ant.j2ee" default = "publish">
              <property file="./Properties/fuego_deploy.properties"/>
              <fuego:passport id="fuego.passport"
    directoryid="${fuego.directoryid}"
    preset="engine" />
    <target name="publish" description="Publish and deploy processes" depends = "takeInputs">
    <!-- Open a session to the Oracle BPM directory -->
    <fuego:session
    passportref="fuego.passport"
    verbose="true"
                   properties="${fuego.basedir}/conf/directory.xml"
    haltonerror="true" >
    <!-- Publish processes -->
    <fuego:publish fpr="${fuego.project.name}"
    deploy="true"
    engine="${fuego.engineName}"
                        importdata = "${fuego.importdata}"
                        automaproles="${fuego.automaproles}"
                        automapbuspars = "${fuego.automapbuspars}"
                        automapvars="${fuego.automapvars}"
                        automapconfigs = "${fuego.automapconfigs}">
    </fuego:publish>
    </fuego:session>
    </target>
    <target name= "takeInputs" >
    <input
    message="Please enter admin-username:"
    addproperty="fuego.participant"
    />
    <input
    message="Please enter admin-password:"
    addproperty="fuego.password"
    >
    </input>
    </target>
    </project>
    and find the properties I have used..
    fuego.basedir=C:\OraBPMEnterpriseHome
    fuego.directoryid=default
    fuego.engineName = bpmengine
    fuego.project.name = E:/antExamples/Project/CommonUtilities
    # If the below property is true then ant script imports data from the project, as defined in Studio.
    # This includes importing:
    #      •Holiday and Calendar rules
    #      •Organizational Units
    #      •Roles
    #      •Resource configurations
    #      •External Variables
    fuego.importdata = true
    #If the below property is true ant script automatically map abstract roles to real ones with the same name.
    fuego.automaproles=true
    #If the below property is true ant script automatically map business parameter variable names (as defined in the project design) to an business parameter variable id with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapbuspars = true
    #If the below property is true ant script automatically map external variable names (as defined in the project design) to an external variable id with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapvars=true
    #If the below property is true ant script automatically map External Resources configurations (as defined in the project design) to real Configurations with the same name (as defined in the Fuego Enterprise directory).
    fuego.automapconfigs = true

  • I have upgraded my Adobe acct for $89 and am trying to send a signed document.  How do I send this pdf?

    I have upgraded my Adobe account for $89 and am trying to send a signed pdf.  How can I do this? I am logged in.

    Hi paulo54376809,
    Go to Adobe Send webpage.
    Sign-in using your Adobe ID.
    Click on the big blue 'Select files to send' button.
    Choose the files you want to send
    Enter recipient e-mail address and customize your message (If you want to.)
    Review your options and click 'send'
    Please revert back if you face any challenges.
    Regards,
    Rahul

  • Am using Adobe acrobat for iPad and pictures are showing JPEG and not PDFs

    I Am using Adobe reader for iPad and converted pictures from camera to ipad and pictures are showing JPEG and not pdf

    Hi bsmigs23,
    I'm not sure that I follow. You have the Adobe Reader app for iOS, and converting photos to PDF? Where are the photos showing up as JPEG? Do you see the converted PDFs when you look at the Recents List?
    Best,
    Sara

  • Hi. I was trying to open some pdf files and got a message my adobe reader was deinstalled. I installed a new version of Adobe Reader for Mac and when trying to open a PDF file I am getting a message in a foreign language. Any suggestions?

    Hi. I was trying to open some pdf files and got a message my adobe reader was deinstalled. I installed a new version of Adobe Reader for Mac and when trying to open a PDF file I am getting a message in a foreign language. Any suggestions?

    Are you launching Pages from an icon in your Dock? Installing the update does not change the Dock icons & it does not remove the older versions. Go to your Applications folder & launch the new Pages from there.

  • Need training material / test scripts for MRP and Supply Chain module. Can anyone hel

    Can anyone out there provide me with sample test scripts they may have used for upgrading to Oracle Financials 11i? Need sample scripts for MRP and Supply Chain management. Looking for good test scenarios for testing these modules. Appreciate any help. Email at [email protected]

    Can anyone out there provide me with sample test scripts they may have used for upgrading to Oracle 11i? Need sample scripts for MRP and Supply Chain management. Looking for good test scenarios for testing these modules. Appreciate any help. Email at [email protected]

  • Hi, I want to buy Adobe Connect for 25 and maybe more attendees by one host (teacher), but I cant find the price of this set up?

    Hi, I want to buy Adobe Connect for 25 and maybe more attendees by one host (teacher), but I cant find the price of this set up?
    Can anybody help me pls?

    Hm, it seems the new website has obscured the option for purchasing the smaller monthly accounts. You can purchase it here. Adobe Connect | Meetings.
    If you need more than the 25 per meeting limit, you can reach out to a reseller of your choice that covers your area, Adobe Connect | Strategic Partners.

  • Adobe Revel for ipad and iphone won't update

    Adobe Revel for ipad and iphone won't uodate. It downloads about 3/4 of the update and then stops. I have tried it many times.

    Hi countrylifejohn,
    Please refer to the post below for updates on the revel installation issue:
    Adobe Revel 2.3.2 installation issue
    Latest Revel IOS update crashes and won't install
    Regards,
    Rave

  • Help with first Adobe Script for AE?

    Hey,
    I'm trying to create a script that will allow me to set a certain number of layer markers at an even interval to mark out a song. Could someone help me troubleshoot this script? I've been working on it for ages now, and I'm about to snap. I've basically gone from HTML and CSS, to javascript and Adobe scripting in the past few hours, and I cannot figure this out for the life of me.
    I want to create a dialog with two fields, the number of markers to place, and the tempo of the song. Tempo is pretty simple, its just the number of beats per minute. The script is meant to start at a marker that I have already placed, and set a new marker at incrementing times. Its mainly to help me see what I'm trying to animate too, even if the beat is a little hard to pick up every once in a while.
    Also, is there a better way to do this? This script will help me in the long run because I will need to do this pretty often, but I'm wondering if there was something that I could not find online that would have saved me these hours of brain-jumbling?
    Thank you very much for any help you can offer.
        // Neo_Add_MultiMarkers.jsx
        //jasondrey13
        //2009-10-26
        //Adds multiple markers to the selected layer.
        // This script prompts for a certain number of layer markers to add to the selected audio layer,
        //and an optional "frames between" to set the number of frames that should be skipped before placing the next marker
        // It presents a UI with two text entry areas: a Markers box for the
        // number of markers to add and a Frames Between box for the number of frames to space between added markers.
        // When the user clicks the Add Markers button,
        // A button labeled "?" provides a brief explanation.
        function Neo_Add_MultiMarkers(thisObj)
            // set vars
            var scriptName = "Neoarx: Add Multiple Markers";
            var numberOfMarkers = "0";
            var tempo = "0";
            // This function is called when the Find All button is clicked.
            // It changes which layers are selected by deselecting layers that are not text layers
            // or do not contain the Find Text string. Only text layers containing the Find Text string
            // will remain selected.
            function onAddMarkers()
                // Start an undo group.  By using this with an endUndoGroup(), you
                // allow users to undo the whole script with one undo operation.
                app.beginUndoGroup("Add Multiple Markers");
                // Get the active composition.
                var activeItem = app.project.activeItem;
                if (activeItem != null && (activeItem instanceof CompItem)){
                    // Check each selected layer in the active composition.
                    var activeComp = activeItem;
                    var layers = activeComp.selectedLayers;
                    var markers = layers.property("marker");
                    //parse ints
                    numberOfMarkers = parseInt (numberOfMarkers);
                    tempo = parseInt (tempo);
                    // Show a message and return if there is no value specified in the Markers box.
                    if (numberOfMarkers < 1 || tempo < 1) {
                    alert("Each box can take only positive values over 1. The selection was not changed.", scriptName);
                    return;
                    if (markers.numKeys < 1)
                    alert('Please set a marker where you would like me to begin.');
                    return;
                    var beginTime = markers.keyTime( 1 );
                    var count = 1;
                    var currentTime = beginTime;
                    var addPer = tempo/60;
                    while(numberOfMarkers < count)
                    markers.setValueAtTime(currentTime, MarkerValue(count));
                    currentTime = currentTime + addPer;
                    if (count==numberOfMarkers) {
                        alert('finished!');
                        return;
                    else{
                        count++;
                app.endUndoGroup();
        // Called when the Markers Text string is edited
            function onMarkersStringChanged()
                numberOfMarkers = this.text;
            // Called when the Frames Text string is edited
            function onFramesStringChanged()
                tempo = this.text;
            // Called when the "?" button is clicked
            function onShowHelp()
                alert(scriptName + ":\n" +
                "This script displays a palette with controls for adding a given number of markers starting at a pre-placed marker, each separated by an amount of time determined from the inputted Beats Per Minute (Tempo).\n" +
                "It is designed to mark out the even beat of a song for easier editing.\n" +
                "\n" +
                "Type the number of Markers you would like to add to the currently selected layer. Type the tempo of your song (beats per minute).\n" +           
                "\n" +
                "Note: This version of the script requires After Effects CS3 or later. It can be used as a dockable panel by placing the script in a ScriptUI Panels subfolder of the Scripts folder, and then choosing this script from the Window menu.\n", scriptName);
            // main:
            if (parseFloat(app.version) < 8)
                alert("This script requires After Effects CS3 or later.", scriptName);
                return;
            else
                // Create and show a floating palette
                var my_palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", scriptName, undefined, {resizeable:true});
                if (my_palette != null)
                    var res =
                    "group { \
                        orientation:'column', alignment:['fill','fill'], alignChildren:['left','top'], spacing:5, margins:[0,0,0,0], \
                        markersRow: Group { \
                            alignment:['fill','top'], \
                            markersStr: StaticText { text:'Markers:', alignment:['left','center'] }, \
                            markersEditText: EditText { text:'0', characters:10, alignment:['fill','center'] }, \
                        FramesRow: Group { \
                            alignment:['fill','top'], \
                            FramesStr: StaticText { text:'Tempo:', alignment:['left','center'] }, \
                            FramesEditText: EditText { text:'140', characters:10, alignment:['fill','center'] }, \
                        cmds: Group { \
                            alignment:['fill','top'], \
                            addMarkersButton: Button { text:'Add Markers', alignment:['fill','center'] }, \
                            helpButton: Button { text:'?', alignment:['right','center'], preferredSize:[25,20] }, \
                    my_palette.margins = [10,10,10,10];
                    my_palette.grp = my_palette.add(res);
                    // Workaround to ensure the editext text color is black, even at darker UI brightness levels
                    var winGfx = my_palette.graphics;
                    var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
                    my_palette.grp.markersRow.markersEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.FramesRow.FramesEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.markersRow.markersStr.preferredSize.width = my_palette.grp.FramesRow.FramesStr.preferredSize.width;
                    my_palette.grp.markersRow.markersEditText.onChange = my_palette.grp.markersRow.markersEditText.onChanging = onMarkersStringChanged;
                    my_palette.grp.FramesRow.FramesEditText.onChange = my_palette.grp.FramesRow.FramesEditText.onChanging = onFramesStringChanged;
                    my_palette.grp.cmds.addMarkersButton.onClick    = onAddMarkers;
                    my_palette.grp.cmds.helpButton.onClick    = onShowHelp;
                    my_palette.layout.layout(true);
                    my_palette.layout.resize();
                    my_palette.onResizing = my_palette.onResize = function () {this.layout.resize();}
                    if (my_palette instanceof Window) {
                        my_palette.center();
                        my_palette.show();
                    } else {
                        my_palette.layout.layout(true);
                else {
                    alert("Could not open the user interface.", scriptName);
        Neo_Add_MultiMarkers(this);

    You should ask such questions over at AEnhancers. I had a quick look at your code but could not find anything obvious, so it may relate to where and when you execute certain functions and how they are nested, I just don't have the time to do a deeper study.
    Mylenium

  • Help with understanding script for rotating objects

    Hi all
    would some help me with this, I am trying to understand what part of AS3 script says loop through(create a continues 360 loop of objects) the images from an XML file, does this make any sense.
    in my script I have this
    for(var i:int = 0; i < images.length(); i++)
    is this the part that says loop the images/objects
    this is a little more to the script including the above to maybe understand better?
    private function onXMLComplete(event:Event):void
    // Create an XML Object from loaded data
    var data:XML = new XML(xmlLoader.data);
    // Now we can parse it
    var images:XMLList = data.image;
    for(var i:int = 0; i < images.length(); i++)  <<<<<<<<FROM ABOVE ///        {
    // Get info from XML node
    var imageName:String = images[i].@name;
    var imagePath:String = images[i].@path;
    var titles:String = images[i].@title;
    var texts:String = images[i].@text;
    any help would be great

    hi rob
    ok I found this menu which rotates item around on a 360 wheel trying to see if I can use the same script on my menu,
    link to example: http://art.clubworldgroup.com/menu/R...g_menu_AS3.zip
    I have highlighted in blue what creates the loop of items
    in my menu I do  ot have anything like
    var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
    which sest up the 360 circle of the item
    //Save the center coordinates of the stage
    var centerX:Number=stage.stageWidth/2;
    var centerY:Number=stage.stageHeight/2;
    //The number of items we will have (feel free to change!)
    var NUMBER_OF_ITEMS:uint=15;
    //Radius of the menu circle (horizontal and vertical)
    var radiusX:Number=200;
    var radiusY:Number=200;
    //Angle difference between the items (in radians)
    var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
    //How fast a single circle moves (we calculate the speed
    //according to the mouse position later on...)
    var angleSpeed:Number=0;
    //Scaling speed of a single circle
    var scaleSpeed:Number=0.0002;
    //This vector holds all the items
    //(this could also be an array...)
    var itemVector:Vector.<Item>=new Vector.<Item>;
    //This loop creates the items and positions them
    //on the stage
    for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
        //Create a new menu item
        var item:Item = new Item();
        //Get the angle for the item (we space the items evenly)
       var startingAngle:Number=angleDifference*i;
        //Set the x and y coordinates
        item.x=centerX+radiusX*Math.cos(startingAngle);
        item.y=centerY+radiusY*Math.sin(startingAngle);
        //Save the starting angle of the item.
        //(We have declared the Item class to be dymamic. Therefore,
        //we can create new properties dynamically.)
        item.angle=startingAngle;
        //Add an item number to the item's text field
        item.itemText.text=i.toString();
        //Allow no mouse children
        item.mouseChildren=false;
        //Add the item to the vector
        itemVector.push(item);
        //Add the item to the stage
        addChild(item);
    //We use ENTER_FRAME to animate the items
    addEventListener(Event.ENTER_FRAME, enterFrameHandler);
    //This function is called in each frame
    function enterFrameHandler(e:Event):void {
        //Calculate the angle speed according to mouse position
        angleSpeed = (mouseY - centerY) / 5000;
        //Loop through the vector
        for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
            //Save the item to a local variable
            var item:Item=itemVector[i];
            //Update the angle
            item.angle+=angleSpeed;
            //Set the new coordinates
            item.x=centerX+radiusX*Math.sin(item.angle);
            item.y=centerY+radiusY*Math.cos(item.angle);
            //Calculate the vertical distance from centerY to the item
            var dx:Number=centerX-item.x;
            //Scale the item according to vertical distance
            //item.scaleX = (dx / radiusX);
            //If we are above centerY, double the y scale
            if (item.x<centerX) {
                item.scaleX*=1;
            //Set the x scale to be the same as y scale
            item.scaleY=item.scaleX;
            //Adjust the alpha according to y scale
            item.alpha=item.scaleX+1.9;

  • Running AppleScript with Adobe Acrobat to rotate and crop file.

    I constantly receive PDF files from a third party service provider that I always have to ROTATE and CROP in order to fit perfectly into labels that are perforated.
    The Label sheets are 8-up (2 x 4). If I print it as is, they DON'T fall where they supposed to. I can't get the trird party service provider to alter the way they supply the PDF files (they just not helpful). I thought it is still easier for me to do the neccesary adjustments.
    What I want to do is:
    (1) rotate the document (multi-page PDF) 180 deg
    (2) crop leading edge 3mm.
    (3) if possible, I want it to be able to watch a folder and do this automatically as PDFs are dropped into a defined folder (can be set permananetly) and save OVER the old file.
    I know AppleScript can do this (I think), but I don't have the expertise on AppleScript to write the commands.
    Can anyone help?
    I am using Mountain Lion & Acrobat 8.

    Thanks for the reply. I can still open the file in excel and I understand that I can redirect the file to open in another program. But it doesn't solve my problem that when I email the file to someone else it tries to open the file as a pdf (which it basically isn't) and gives the error message that its an unsupported file type. What I am really looking for is a way to stop it from saving an excel file as an adobe file even when I choose the file format as an excel workbook when I save it.

  • Adobe elements for Mac and CS5 for Mac

    Hi, I have two full licenses for photoshop, one for elements and one for CS5. Would it be possible for me to swap the Elements 8 (mac version) for Elements 8 for PC. I want to teach my son to use Elements for his college work, while he has a PC and I have a mac. I bought the Elements for a course that only used Elements but quickly as I moved on I had to use full CS5. I can't remember if I used the elements serial number to upgrade to CS5, where I should have CS4 serial number.

    Hi,
    As per adobe policy on cross platform swap : http://kb2.adobe.com/cps/405/kb405819.html.
    "You can swap only current versions. If you have a previous version, you cannot swap to a different platform or language of the previous version--instead, it's necessary to upgrade."

Maybe you are looking for