Centre align an anchor point

Hi there!
I've been following a tutorial (found at
http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)
and I'm having difficulties centre aligning the anchor point inside
the empty movie that loads the images from the xml document. At
present the anchor point is located at the top left corner of the
image so the images will not be positioned correncly if they are
different dimensions. Is it possible to centre align the anchor
point using Actionscript so images will be displayed in the centre
of the image window? Can anyone help? I've attached the code that
exists in the first frame in the timeline which controls the movie.
The instance name for this MC is "picture". Thanks in
advance

the images are loaded by your swf. during runtime their
dimensions are available after loading is complete. (if you use
loadMovie, you'll need preloader code to access each image's target
movieclip's _width and _height which will be equal to your image's
width and height.)
once you know an image's dimensions you can center it with
respect to whatever you want. eg, your image window.

Similar Messages

  • How to align an anchor point with an object?

    I have a shape I made with the pen tool, and now I want to align one anchor point of the shape with the middle of a rectangle. How can I do this? It doesn't seem like I can do what I do for objects, which is select both objects, click the object I want to align to, and hit align. If I'm not describing this properly let me know and I can try to clarify.

    ...another way...
    1. grab the Rectangle Tool
    2. move your mouse on top of the Anchor you wish to align
    3. draw a rectangle wider than the shape, centered on the Anchor
         - click and drag to draw a rectangle (don't release yet),
         - then press Alt to make it centered on top of the anchor,
         - release the mouse, then the Alt key.
    4. select both your shape and the rectangle
    5. press Ctrl+G to group them
    6. select both, the newly created group and the rectangle
    7. align your shapes
    8. ungroup and delete your temporary rectangle
    9. to align vertically, make your temp rectangle wider and taller than your shape.

  • How to align mesh Anchor Points?

    Hello,
              is there any way to auto align, one or multiple mesh anchor points with another?
    thanks for any help,

    Hi DrStrik9,
                       a) i'll prep screenshots and send soon as done,
    b) i am creating mesh Keyframes, then Blending between both keys to produce intermediate frames. But the blend in AI is completely linear requiring impractical number of Blend keyframes and difficult to maintain alignment even if editing blend Speed or acceleration via blend path point tangents. 
    So i import AE, non-linear, accurate rotobrush paths in order to Envelope the Blend meshes into the AE rotos. But before that can be done, each Blend mesh must be mapped into a Rectangle, otherwise the resulting envelope contains  gaps, created from the space between the mesh edges and its' rectangular bounding box. And Mesh Tormentors' "Align segments with path" works mapping mesh to rectangle, but it cannot be recorded as Action or script so can Not be automated that i could find.
    Really appreciate any help and suggestions,
    J

  • Why when I switch between a centre-aligned stroke and fill do my anchor points move?

    Hi there, I've been using Illustrator for many years and never noticed this happen before when I fill a shape - can anyone explain why this is happening?
    I'm drawing a logo using a centre-aligned stroke, rounded rectangle and another stroked path merged together to make my logo outline....like this...
    ....and when I change my centre-aligned stroke from a stroke to a fill and back again (to make the shape solid black), the anchor points of my shape move.....after about 10 time so fswitching between fill and stroke, fill and stroke etc my paths look like this....
    Why is this happening??? It doesn't do this when I use a stroke aligned to the outside or inside of the path - just when the storoke is aligned to the centre of the path? CAnanyone explain why this happens? what it going on here?
    -thanks in advance!
    -Pete Moore

    No I don't mean 'outlining' a stroke - all I'm doing is changing a stroke'd box to a fill and back again using the 'Swap fill and stroke" button on the main pallet.
    When my (rounded rectangle) path has a stroke applied to it, and it has the stroke aligned to the centre of the path, the anchor points of a rounded rectangle move slightly every time I swap from a filled shape to a stroked shape.
    If I apply a stroke to a path (again -  a rounded rectangle)  that has the stroke aligned to the outside or inside of the path, then the anchor points do not move - however many times I swap between fill and stroke.
    I've been wondering why when I re-apply a stroke to a filled object (and that stroke is alinged to the centre of the path)  - I get slight movement with the anchor points (do it alot of times and it can really mess with rounded corners).
    Draw a rounded square, apply a stroke to it (a center aligned stroke), click the 'swap fill and stroke' button (shift + x)  a few times, watch the box move slightly every time you click.
    -pete

  • Importing PSD with Layer-Groups in AE - No align Anchor Point

    Hey folks!
    I am importing a PSD file into AE.
    This PSD includes "normal layers" and "layer-groups".
    At the import-dialouge i choose "Footage Dimension: Layer Size", to get the anchor point in the center of my objects.
    This works just fine in case of the "normal layers", but the "layer-groups" (wich turn into comps in AE) didn't have an align anchor point. Instead of this it is in the center of the whole PSD-file.
    Is there any trick to handle this problem?
    Thanks a lot!

    That's a limitation you have to live with. After all, the PSD dimensions are used for the comp size and in PS groups are just that - organizational structures, not real transform hierarchies, so there is no persistent information.
    Mylenium

  • How to set a anchor point alignment character in table??

    PLs help i am a new in javasprit.
    i have no idea how to do that><
    1. select the (align the decimal point)
    2. 48mm
    3. alignment character
    my script:
    var myDoc=app.activeDocument;
        var    myParagraphStyle = myDoc.paragraphStyles.item("Table");
            myName = myParagraphStyle.name;
    var tabletable = myDoc.tableStyles.item("Table");
    var myTable = app.selection[0].convertToTable("\t","\r");
    myTable.appliedTableStyle= tabletable
    myTable.columns.item(0).width = "50 mm";
    myTable.columns.item(1).width = "50 mm";
    myTable.columns.item(2).width = "50 mm";
    var celltable = myDoc.cellStyleGroups.item('Cell').cellStyles.item('Table');
    myTable.cells.everyItem().appliedCellStyle = celltable;
        app.selection[0].applyParagraphStyle(myParagraphStyle, true);
    myTable.columns[0].cells.itemByRange(0,-1).texts.everyItem().appliedParagraphStyle = myParagraphStyle;
    Thank A Lotpls help>< i have thought for a few week

    Hi,
    If MP is your paragraph or your paragraphStyle or some text:
    MP.tabStops.add({alignment: TabStopAlignment.CHARACTER_ALIGN,
    // above is for 1
    position: 48,
    // above is for 2, unit is used from your doc settings
    alignmentCharacter: ","});
    // above is for 3
    enjoy:)
    Message was edited by: Jump_Over

  • Anchor points don't align vertically in Preview mode

    When I'm in Preview mode, the scroll feature doesn't go to where I've placed my anchor points. How can I make the anchor points more precise.

    Hi Stephen,
    Can you please refer to this link and read through the first 2 sections which explains about the working of anchor links and how they should be positioned so that their active state is achieved :-
    Adobe Muse Help | Creating Hyperlinks
    Let me know if you are still experiencing any issues.
    Regards,
    Rohit Nair

  • Anchor points: Photoshop to After Effects

    Hello!
    I have imported some shape layers from photoshop into after effects. I would like to make them swing in three dimensional space, so I am trying to change the anchor point to the top of shape so that it will swing from that point. I cannot see the anchor point as you would with text, and it seems to be rotating around some random place further down. Perhaps this photoshop layer is rotating around the centre of the photoshop composition?
    What would be the fastest way to rectify this situation. There are 24 shapes but I will remake these shapes in AE if that is going to be the fastest way to make it happen.
    Thank you!

    Hi Trill:
    Use the Pan Behind (Anchor Point) Tool (‘y” is the keyboard shortcut) to click and drag the Anchor Point to where you need it to be for your animation.
    This behaves very much like moving the Anchor Point while using Free Transform in Photoshop. Also, it will retain the registration (or placement) of your layers relative to how they were stacked and aligned in Photoshop by changing both the layer Anchor Point coordinates and Position coordinates at the same time.
    Assuming that you’re importing your layered Photoshop document as a Composition, the Anchor Point for each layer defaults to one of two locations:
    The center of the respective layer if imported as “Composition – Retain Layer Size”
    The center of the Photoshop document Canvas Size if imported as “Composition”
    From what you’ve described, it sounds like you’re choosing as “Composition”.  Although, you’ll need to use the Pan Behind (Anchor Point) Tool layer by layer regardless to achieve what you’ve going for.
    There’s a behavior in AE that you could take advantage of to speed this up if you have pre-positioned your Photoshop layers such that the offset for the Anchor Point value change and the Position value change are the same for each layer.  If that’s the case, you could select all the layers in After Effects and when you change the values for one layer After Effects will change the like values for all the currently selected layers as well. Since it looks like each of your layers currently has the PS Canvas Size, this might work right now.
    - Warren

  • How do you center a title's anchor point?

    I'm sure this is a simple question but I can't find anything in the forums that answer it.
    I have a text title I want to center in the frame (horizontally and vertically, with text center aligned), but for some reason the guides seem to be wrong.  The yellow lines don't meet at the center of the frame, they meet at another point that seems to change randomly.  And the round handle (anchor point?) of the text box appears on the first line of text, rather than the vertical center of the text box.  How do I reset this or change it?  It says my anchor points are at  x 0 y 0, but that doesn't look right.  All I want to do is center all my text boxes (both horizontally and vertically) within the frame.  I hope this makes sense.  Please see images.  Thanks!

    Are you sure that your settings in Video Inspector - Transform - Position  x =  0, y = 0 and not something else?
    I don't think you can set the move handle to be other than under the first line.
    Geoff.

  • Can you change the anchor point of a swf in CP5.5?

    I have created a small swf in Flash and have published it.
    I've imported the swf into CP5.5 and applied an effect of anti clockwise rotate and assymetric zoom out in an effort to get it to spiral backwards into oblivion.
    However, it seems to rotate the swf from the top left corner.
    Is there a way to change this anchor point to the centre of the swf?
    Regards

    Col,
    The anchor point of an object in Captivate is always the top left corner of the bounding box. No way to change it (have been pleading for that since long). Only exceptions are Rotate and motion effects, where the center is used.
    Lilybiri

  • How do I edit a single handled anchor point

    I find myself with a corner that only has one handle (screen shot below), to which, I want to add a second handle. I could convert it to a smooth curve but this averages things out and moves my existing handle's position.
    I want to add the second handle without affecting the path, to do this the new handle would be aligned to the vertical path. I would then be able to edit the second handle as desired, and the whole process would leave the existing curved path untouched.

    froodster,
    To keep the left segment unchanged, you may:
    1) Cut the path by Clicking the Anchor Point with the Scissors Tool;
    2) With the straight path (still) selected Click the Anchor Point with the Convert Anchor Point Tool, then ClickDrag it to drag out the new Handle;
    3) Select both paths (you may ClickDrag across the Anchor Point with the Direct Selection Tool) and Ctrl/Cmd to Join, ticking Corner (or all will be in vain).

  • Center Anchor Point at a Layer

    How can i center Anchor Point to a Layer center? Are there commands to align a center point?

    I dont need to do it with expressions, but i began to think this will do the only way.
    The very common situations are:
    (1) user creates a layer and draw a mask on it
    (2) user creates a text layer
    (3) user creates a shape layer
    The question is:
    how to position a layer Anchor Point
    in the center of a mask, text or shape
    without alter their position coordinates?
    Usually i see users position Anchor Point by hand
    but i imagine if there isnt a way to be sure it is absolutely centralized in a specific element
    (shape, mask or text)...
    Is the only way by dragging it by "eye method"?

  • Anchor points move and entire shape gets distorted from changing stroke thickness

    I have a fairly simple drawing that I drew at a larger size so I could be precise with it, and now I want to reduce it down to the finished size, and thicken the stroke, but when I make the stroke thicker, my anchor points move and the entire drawing gets distorted.
    In 24 years of using Adobe Illustrator, I've never seen this happen. When I click on the "up" arrow on the Stroke palette a bunch of times to incrementally increase the stroke thickness, I can watch the anchor points "walk" around as my shape gets distorted.
    If I instead enter a numerical value for the stroke thickness, this doesn't happen.
    However, if I use the Scale tool to shrink the drawing down to 10% or 20% size or whatever, with Scale Strokes and Effects UNCHECKED, again, the anchor points move and the drawing is distorted.
    This is all on a brand new installation of Illustrator CS 6 for Mac (though I've been using CS 6 for about 2 years now, my hardrive crashed this past weekend and I had to reinstall everything).
    Did I miss a little checkbox somewhere that I've never seen before that's making this happen?
    Editing this post to add:
    Also, some of the objects in my drawing will not allow me to change the stroke to less than 1 point thickness. If I choose .5 or .25 pt from the pop-up menu, or even if I enter the numerical value, it jumps back to 1 point. Other objects in the drawing do not.
    These objects in question are "rounded rectangle" shapes that I've used the scissor tool on to cut and then used the "join" command to put them together with parts of other shapes that were "scissored' as well.
    All of the "Ellipse" and "Rounded Rectangle" shapes that I left intact do not exhibit this problem with stroke and distortion.

    You are being bitten by the Align-to-Pixel-Grid. Select everything and go to the Transform panel and turn off Align-to-Pixel-Grid at the bottom of the panel; then go to the panel flyout (small triangle, upper right) and turn off Align Objects to Pixel Grid.

  • Change anchor point on Photoshop Live 3D image?

    It is possible to change the anchor point on a Photoshop Live 3D model?
    I've imported a (.obj) 3D model into Photoshop (CS5.5) Live 3D layer (in order to be able to export as a PS Live .PSD and import into After Effects) howver I need to change the anchor point to one of the 4 corners, rather than dead centre which is the default. I thought it would easy just to import the .PSD file into After Effects and move the anchor point in there, but this seems impossible. So, can the anchor point be moved inside of Photoshop before I export it?
    Mike.

    What do you mean by »Photoshop Live 3D«?
    If you need to change the 3D-object’s mesh I’m afraid that will have to be done outside of Photoshop.
    But if you could post a mock-up or screenshot with the pertinent Panels visible the issue might get clearer.

  • Dreamweaver Linking to Anchor Point

    I am using Dreamweaver CS3 and am trying to link from an
    image to an anchor point on the same web page and play a flash
    video. I have followed the recommended way to create the anchor
    point and use the "#anchor point name" after the link to play my
    video at this point on the same web page. Every time the video
    plays in a new web page and not at the anchor point. This is the
    generated code for what I'm trying to do:
    <div style="text-align: center;">
    <p style="font-family: American Typewriter;"><span
    style="font-weight: bold;"><font size="+1"> 
    <span style="text-decoration: underline;">PREVIOUS
    TIPS<br>
    </span></font></span></p>
    <p style="font-family: American Typewriter;"><a
    name="videoplayer"></a></p>
    <p align="left" style="font-family: American
    Typewriter;"><span style="font-weight: bold;"><font
    size="+1"><span style="text-decoration: underline;"> <a
    href="../RSGFLV/RSGT1.swf#videoplayer"><img
    src="../RSGTip1.jpg" alt="Tip 1" width="140"
    height="120"></a> <br>
    </span></font></span></p>
    </div>
    Any suggestions?

    You won't get desired results this way. You could embed
    player code on the
    page inside a hidden division or layer and use an event
    handler (JavaScript)
    to reveal the division on MouseClick. I did something similar
    here using
    Walter Zorn's Tooltips JavaScript library.
    http://alt-web.com/testing.html
    Hit the Video Player button to reveal
    YouTube video.
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com

Maybe you are looking for

  • CMP Entity Bean with ejb-ql finder methods and INFORMIX database

    Hi, I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like:     <entity>       <abstract-schema-name>BeanName</abstract-schema-name>       <cmp-field><field-name>fieldOne</

  • How to access custom mailing label templates

    Hello, I am using Microsoft Word 2010 on a PC and trying to create a custom label modeled after the Avery 5392 Label using the Mailing Label wizard. Can you tell me where these templates are saved? I need to add some color to the bottom of the templa

  • Installation of Xcelsius Engage 2008 was successful, but cannot run it.

    Xcelsius Engage2008 was installed successfully with given key code, it has no problem. However, when I run the product, the system pops up information like key code missing/expired and required to input key code again. then when I enter keycode, it s

  • How to download all spool order

    hello: i would like ask one favor, i make a program and i dicided to ejecuted in batch(because the ejecution could have many data), that bathc generated a job and spool order , but when i try to open it , the system send me a message, 'you will only

  • Unable to open forms after cloning -"error while loading shared libraries"

    Hi Friends, We are getting below error message while opening R12.1.1 ebs forms in RHEL 5 64 bit os. *11/12/19 16:24:58.674 formsweb: Forms session <2> aborted: runtime process failed during startup with errors /devapps/appldev/apps/tech_st/10.1.2/bin