XML & AS - Aligning Thumbnails In Grid

I'm currently using Flash 8.
So I've got a flyout menu working, and it's showing up
exactly how I want it to. Mouse over the button at the bottom of
the screen, and whammy - the menu slides into place all
smooth-like.
But then comes the problem. I, of course, want the flyout
menu to be visible and active while the mouse is on top of it.
However, when I move the mouse off of the menu, I'd like it to
slide back out of view.
I haven't been able to figure out how to accomplish that just
yet.
Here's my code thus far - maybe someone can help flesh out
the rest of it.
Thanks!
import mx.transitions.Tween;
import mx.transitions.easing.*;
var startY:Number = gallery._y;
gallery_btn.useHandCursor = false;
gallery_btn.onRollOver = function () {
if(gallery._alpha==0){
new Tween(gallery,"_alpha",Regular.easeOut,0,100,12,false);
new
Tween(gallery,"_y",Regular.easeOut,startY,startY-200,12,false);
}

Well, of course it won't be that easy!
I've got the flyout menu working.
I put together a nice little scroll panel of thumbnails.
I used this tutorial to help me along with the panel:
http://www.gotoandlearn.com/
I've got ten buttons placed together in a movie clip - the
movie clip is what you scroll through in the panel.
I've got the full-sized images in the library.
However, I can't figure out how to get the buttons to bring
up the image it's linked to. They're active as buttons - when you
hover over them, you get the little hand and everything... test out
the different states for the button to make sure that it was
recognized as a button. They are, but I can't get them to do what I
want.
If I place the same button on the stage without being a part
of the movie clip of scrolling thumbnails, then it works properly.
If I apply the same actionscript to the button in the movie clip,
it does nothing.
Also, there's another issue that I'm having. I don't want to
have to import all of the images and thumbnails into my library. I
really want to build this with XML. I've found a couple of
tutorials that touch on creating an XML gallery in Flash, but I'm
having trouble getting that to work as well. Most of the tutorials
I've found just throw everything at you with a pre-configured .FLA
file and whatnot. I'm very big on learning it myself and building
my own gallery.
I don't know... gah, I'm all over the place right now.
One step at a time, I guess, then I'll rain down more
questions if I have them, heh
Thanks for the great help so far. It's very much
appreciated!

Similar Messages

  • Xml gallery alignment, help

    I am making an XML gallery with thumbnails. It is working fine, but I have a problem with alignment of the images. All the large images are loading into the top left corner. I would like them to load with center alignment for all images. I don't know anything about Action Script. The way I made this website was to use already made sample of some one else. Can you help me to figure out this alignment problem? Again, I am very bad at Action Script, so it would be great if you can show me the actual coding for this to work.
    Here is the sample gallery: http://www.chimeddorj.com
    Here goes the Sript>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    RemoveAllThumbs.onLoad = function(){
    removeAllThumbs()
    //init global variables and properties
    Stage.scaleMode = "noscale";
    import gs.TweenFilterLite;
    import gs.TweenLite;
    XML LOADING
    //handle loading of external images..
    var slide:XML = new XML();
    slide.ignoreWhite = true;
    var largeImageUrl:Array = new Array();
    var thumbUrl:Array = new Array();
    var captions:Array = new Array();//not used
    var p:Number = 0;//tracks position in arrays
    /*!!!!if you want to load in another XML file, make sure you clear the existing thumbnails
    by calling the removeAllThumbs() function first!*/
    slide.onLoad = function() {
    largeImageUrl = [];
    thumbUrl = [];
    captions =  [];
    xmlNode = this.firstChild;
    var images:Array = this.firstChild.childNodes;
    for (i=0; i<images.length; i++) {
    thumbUrl[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
    largeImageUrl[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
    captions[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
    p = 0;//reset p for different gallery loading
    //create a bg clip for the thumbsTrack. Enables padding between images to work correctly
    thumbMask_mc.thumbBox_mc.createEmptyMovieClip("thumbTrackBg",1);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.beginFill(0x000000,20);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.moveTo(thumbMask_mc.thumbBox_mc._x,thumbMask_mc.thum bBox_mc._y);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.lineTo(thumbMask_mc.thumbBox_mc._x+thumbMask_mc.thum bBox_mc._width,thumbMask_mc.thumbBox_mc._y);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.lineTo(thumbMask_mc.thumbBox_mc._x+thumbMask_mc.thum bBox_mc._width,thumbMask_mc.thumbBox_mc._y+thumbMask_mc.thumbBox_mc._height);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.lineTo(thumbMask_mc.thumbBox_mc._x,thumbMask_mc.thum bBox_mc._y+thumbMask_mc.thumbBox_mc._height);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.lineTo(thumbMask_mc.thumbBox_mc._x,thumbMask_mc.thum bBox_mc._y);
    thumbMask_mc.thumbBox_mc.thumbTrackBg.endFill();
    //load the thumbs
    loadThumbs();
    Mouse.removeListener(mouseListener);//kill the mouselistener if it is added
    slide.load("paintings.xml");//load xml
    var imageWidth:Number = 0;//default x position of our movieclips relative to containing movieclip
    var buffer:Number = 20;//padding between images
    var thumbsToShow:Number = 5//
    LOAD THUMBNAILS, ADD ACTIONS & PADDING TO THUMBS
    //here we load in our thumbnails
    function loadThumbs() {
    //remove the movieclip loade listener on each iteration of this function
    Clip.removeListener(mclListener);
    //attach and associate with a variable a MC to hold each loaded movieClip
    var container:MovieClip = thumbMask_mc.thumbBox_mc.attachMovie("thumbBox", "thumbBox"+p, thumbMask_mc.thumbBox_mc.getNextHighestDepth(), {_x:imageWidth, _y:0});
    //create a movieclip loader
    var Clip:MovieClipLoader = new MovieClipLoader();
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function(target_mc:MovieClip) {
    target_mc._alpha = 0;//set thumb alpha to be zero
    //handle loading progress - simple counter here
    mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {
    //use this if you want to indicate loading of your thumbnails etc...
    //loadTxt.captions_txt.text = Math.floor(bytesLoaded/bytesTotal*100)+"%";
    mclListener.onLoadInit = function(target_mc:MovieClip) {
    //here we can access our loaded clips properties!
    //here is where we attach functions to our clip so that we can dynamically create rollovers etc.
    //make our thumbnails visible again
    TweenLite.to(target_mc, 2, {_alpha:100});
    //based off image width this places our thumbs next to each other
    imageWidth = (imageWidth+target_mc._width)+buffer;
    //associate a variable here with our p value, we use this later to load in large images
    target_mc.pictureValue = p;
    //handle  image rollovers these are active only on the thumb image!!! Watch the US spelling!
    target_mc.onRollOver = function() {
    TweenFilterLite.to(target_mc,.4,{type:"Color", brightness:1.5, ease:None.easeOut});
    target_mc.onRollOut = function() {
    TweenFilterLite.to(target_mc,4,{type:"Color", brightness:1, ease:None.easeOut});
    //handle a click on a thumbnail
    target_mc.onRelease = function() {
    //load large images
    mcLoader.loadClip(largeImageUrl[target_mc.pictureValue],largeImage_mc);
    caption.text = captions[target_mc.pictureValue];;
    p++;//increment value to cycle through array
    if (p<thumbUrl.length) {
    loadThumbs();//create loop
    if (p == thumbUrl.length) {
    /*we set this variable here because this is where we know the length of our thumbnails containing mc.
    After we have loaded all content in. Makes sense really!*/
    mcWidth = thumbMask_mc.thumbBox_mc._width;
    //adjust the width and height of the thumbstrack bg clip
    thumbMask_mc.thumbBox_mc.thumbTrackBg._width = mcWidth;
    thumbMask_mc.thumbBox_mc.thumbTrackBg._height = thumbMask_mc.thumbBox_mc._height
    /*add the mouse listener object to the thumbnail mask. We do this element of our script here so
    we do not enable scrolling of our mc before the images have all loaded in. As this can look a little funny*/
    Mouse.addListener(mouseListener);
    //load in the next thumb
    Clip.addListener(mclListener);
    Clip.loadClip(thumbUrl[p],container);
    REMOVE ALL THUMBS METHOD
    //Use to clear old thumbs if you are going to add in a new set of thumbs
    function removeAllThumbs():Void {
    for (var i in thumbMask_mc.thumbBox_mc) {
    if (typeof (thumbMask_mc.thumbBox_mc[i]) == "movieclip") {
    removeMovieClip(thumbMask_mc.thumbBox_mc.getInstanceAtDepth(thumbMask_mc.thumbBox_mc[i].ge tDepth()));
    thumbMask_mc.thumbBox_mc._width = thumbMask_mc._width
    /*sampleRemoveAllButton.onRelease = function(){
    removeAllThumbs()
    LOAD LARGE IMAGES MOVIECLIP LOADER FUNCTION
    /*generic load object here we handle loading in external images etc
    this block of code loads the large images into the bright blue mc
    for instance, you could fade in/out big images or make a progress indicator
    using this block of script*/
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    var listener:Object = new Object();
    listener.onLoadStart = function(target_mc:MovieClip) {
    //empty
    listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {
    //amountLoaded = Math.floor((bytesLoaded/bytesTotal)*100);//calulate a loading percentage!
    listener.onLoadInit = function(target:MovieClip):Void  {
    //empty
    mcLoader.addListener(listener);
    MOUSE LISTENER
    //this handles the panning of the thumbnails
    mouseListener = new Object();
    mouseListener.onMouseMove = function() {
    if (thumbMask_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
    maskOver();//call the scroll function
    SCROLLER FUNCTION
    var scrollSpeed:Number = 5;
    var halfMaskWidth:Number = thumbMask_mc._width/2;
    var npixels:Number;
    var mcWidth:Number = thumbMask_mc.thumbBox_mc._width;
    var maskWidth:Number = Math.floor(thumbMask_mc._width);
    function slideThumbs() {
    // stop scrolling if we are off the mask and delete the enterframe event
    if (!thumbMask_mc.thumbBox_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
    delete this.onEnterFrame;
    // mouse over left half of slider:
    if (thumbMask_mc._xmouse>0 && thumbMask_mc._xmouse<thumbMask_mc._x+halfMaskWidth) {
    npixels = (halfMaskWidth-thumbMask_mc._xmouse)/halfMaskWidth*scrollSpeed;
    thumbMask_mc.thumbBox_mc._x += npixels;
    //stop sliding too far to the left
    if (thumbMask_mc.thumbBox_mc._x>=0) {
    thumbMask_mc.thumbBox_mc._x = 0;
    delete this.onEnterFrame;
    // mouse over right half of slider:
    if (thumbMask_mc._xmouse>halfMaskWidth && thumbMask_mc._xmouse<thumbMask_mc._x+thumbMask_mc._width) {
    npixels = (thumbMask_mc._xmouse-halfMaskWidth)/halfMaskWidth*scrollSpeed;
    thumbMask_mc.thumbBox_mc._x -= npixels;
    //stop sliding too far to the right
    if (thumbMask_mc.thumbBox_mc._x<=-(mcWidth-maskWidth)) {
    thumbMask_mc.thumbBox_mc._x = -(mcWidth-maskWidth);
    delete this.onEnterFrame;
    //function to do the scrolling man!
    function maskOver() {
    this.onEnterFrame = function() {
    slideThumbs();

    I am using Flash CS 4, like I mentioned earlier, I am making this site on some one's pre-made flash file. There is a movie symbol for loading the large images (called largeImage_mc). I resized this movie clip to 550x450 px (landscape). And positioned it at X=200 Y=0 (top left corner registration point or the anchor point).
    The movie clip could be dragged to any position. But images that are loaded into this bo is always aligning to the top left corner of this movie symbol.
    If I calculate the actual center of this image loading area (regarding its position on the window), it would be x=425, y=225.
    I hope my writing makes sence.
    actual site: www.chimeddorj.com

  • Xml gallery with thumbnails & next/previous buttons.

    hallo all the wise people,
    sorry to bother you, but i'm kind of desperate, and nobody around to ask, so....
    i've spend now three full days editing an xml gallery... to my needs, and always goes messy, so maybe it's time give up and make my own from the scratch, or looking from a one closer to my needs =/ (helpless).
    could anyone help - maybe any of you by some chance knows a link as close as possible to tutorial/source as3 fla to sthg as close as possible to this:
    a) xml gallery
    b) thumbnails
    c) when thumbnail clicked a big picture shows
    d) next/previous buttons possible
    otherwise, i can also post the code of my gallery where i absolutely can't add next/previous buttons without making a big mess =/
    i will be totally youbie doubie grateful for any help... any, if you only know any good link, 'll try to fugure out a tutorial or edit the source myself....
    thanks in advance

    heyyyo wise one,
    at least this is really  nice of you to ask -  this gallery really makes me by now feel twice as blond as i am 8-0. but this is kinda really nested.
    the xml structure goes like this (this is easy and more or, less standard)(Caption is neglectable, probabaly i will not even display it, unless i have some extra time):
    <MenuItem>
             <picnum>01</picnum>
             <thumb>thumbs/Image00001.jpg</thumb>  
             <picture>Image00001.jpg</picture>
       <Caption>Fist Title</Caption> 
    </MenuItem>
    uaaha, then the as goes. there is the URLloader, but also two different loaders inside (one for the thumbnails, one for the big picture). and this is all inside a for each loop -eh... i was always trying to change the pictLdr behavior - the loader, that loads the big picture.
    anyway the URL loader, and the main function, which is attached to it go like this:
    var myXML:XML = new XML();
    var XML_URL:String = "gallery_config.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    // Create the xmlLoaded function
    function xmlLoaded(event:Event):void
    // Place the xml data into the myXML object
        myXML = XML(myLoader.data);
        // Initialize and give var name to the new external XMLDocument
    var xmlDoc:XMLDocument = new XMLDocument();
    // Ignore spacing around nodes
        xmlDoc.ignoreWhite = true;
    // Define a new name for the loaded XML that is the data in myLoader
        var menuXML:XML = XML(myLoader.data);
    // Parse the XML data into a readable format
        xmlDoc.parseXML(menuXML.toXMLString());
        // Access the value of the "galleryFolder" node in our external XML file
    for each (var galleryFolder:XML in myXML..galleryFolder)
       // Access the value of the "pagenum" node in our external XML file
               var galleryDir:String = galleryFolder.toString();
    //trace (galleryDir);
    //trace (galleryFolder);//output taki sam jak powyżej
    // inicjuję variable flag, która bedzie trzsymac nazwę klikniętego thumbnail
    var flag2:String = null;
    // Set the index number of our loop, increments automatically
    var i:Number = 0;
    // Run the "for each" loop to iterate through all of the menu items listed in the external XML file
    for each (var MenuItem:XML in myXML..MenuItem)
    // Access the value of the "picnum" node in our external XML file
        var picnum:String = MenuItem.picnum.toString();
    // Access the value of the "pagetext" node in our external XML file
        var Caption:String = MenuItem.Caption.toString();
    // Access the value of the "thumb" node in our external XML file
        var thumb:String = MenuItem.thumb.toString();
    // Access the value of the "pagepicture" node in our external XML file
        var picture:String = MenuItem.picture.toString();
    // Just some trace I used for testing, tracing helps debug and fix errors
    //trace(picnum);
    var thumbLdr:Loader = new Loader();
        var thumbURLReq:URLRequest = new URLRequest(galleryDir + thumb);
        thumbLdr.load(thumbURLReq);
    // Create MovieClip holder for each thumb
    var thumb_mc = new MovieClip();
    thumb_mc.addChild(thumbLdr);
    addChildAt(thumb_mc, 1);
      // Create the rectangle used for the clickable button we will place over each thumb
      var rect:Shape = new Shape;
      rect.graphics.beginFill(0xFFFFFF);
      rect.graphics.lineStyle(1, 0x999999);
      rect.graphics.drawRect(0, 0, 80, 80);      
      // Create MovieClip holder for each button, and put that rectangle in it,
      // make button mode true and set it to invisible
      var clip_mc = new MovieClip();
      clip_mc.addChild(rect);
      addChild(clip_mc);
      clip_mc.buttonMode = true;
      clip_mc.alpha = .0;
         // The following four conditionals create the images where the images will live on stage
      // by adjusting math through each row we make sure they are laid out good and not stacked
      // all on top of one another, or spread out in one long row, we need 4 rows, so the math follows
      if (picnum < "05")
           line1xpos = line1xpos + distance; // These lines place row 1 on stage
        clip_mc.x = line1xpos;
        clip_mc.y = yPlacement;
        thumb_mc.x = line1xpos;
        thumb_mc.y = yPlacement;
       else  if (picnum > "04" && picnum < "11")
        line2xpos = line2xpos + distance; // These lines place row 2 on stage  
        clip_mc.x = line2xpos;
        clip_mc.y = 86;
        thumb_mc.x = line2xpos;
        thumb_mc.y = 86;
       else  if (picnum > "10" && picnum < "14")
        line3xpos = line3xpos + distance; // These lines place row 3 on stage
        clip_mc.x = line3xpos;
        clip_mc.y = 172;
        thumb_mc.x = line3xpos;
        thumb_mc.y = 172;
       else  if (picnum > "13" && picnum < "21")
       line4xpos = line4xpos + distance; // These lines place row 4 on stage
       clip_mc.x = line4xpos;
       clip_mc.y = 258;
       thumb_mc.x = line4xpos;
       thumb_mc.y = 258;
       // And now we create the pic loader for the larger images, and load it into "pictLdr"
       var pictLdr:Loader = new Loader();
       var pictURL:String = picture;
          var pictURLReq:URLRequest = new URLRequest(galleryDir + picture);
       //var pictURLReq:URLRequest = new URLRequest("gallery/Image00004.jpg");sprawia,ze zawsze wyswitla sie jeden obrazek
          pictLdr.load(pictURLReq);
       // Access the pic value and ready it for setting up the Click listener, and function
          clip_mc.clickToPic = pictLdr;
       // Access the text value and ready it for setting up the Click listener, and function
       clip_mc.clickToText = Caption;
       //var instName:String = flag();
       // Add the mouse event listener to the moviClip button for clicking
          clip_mc.addEventListener (MouseEvent.CLICK, clipClick);
          // Set the function for what happens when that button gets clicked
       function clipClick(e:Event):void
         // Populate the parent clip named frameSlide with all of the necessary data
         MovieClip(parent).frameSlide.gotoAndPlay("show"); // Makes it appear(slide down)
         MovieClip(parent).frameSlide.caption_txt.text = e.target.clickToText; // Adds the caption
         MovieClip(parent).frameSlide.frame_mc.addChild(e.target.clickToPic); // Adds the big pic
       } // This closes the "for each" loop
    } // And this closes the xmlLoaded function
    and the effect looks like this (it's a sketch, so big pictures are loaded randomly, don;t put too much attention to it): http://bangbangdesign.pl/xmlGallery/gallery29.swf
    but i guess it's a terrible stuff to go through all this. i would be totallly satisfied with a likng to a good tutorial to do it from scratch, or just a hint where to start rebuilding this.
    + in any case i send greetinngs to whereever you are =]

  • Line weight changes when using Align to Pixel grid

    When I select Align to Pixel Grid in the Transform Panel, I see line weight changes occur. I try to change the line weight in the either the Stroke or Appearance panel and it will not change, no layers locked, any ideas how to change the line weight?

    Chouettecacahuete wrote:
    ... I noticed that the line increases from 0.5pt to 1pt mainly (although not always) on straight lines, anything with a bezier curve seems to remain as 0.5pt.
    Just try this, with snap to pixel grid on, create 10 pixel long straight horizontal 1pt line with the pen or line tool. You won't be able to change the stroke weight to other than whole numbers. But if you rotate the line with only 0.01 degrees by typing this for rotation in the Transform panel, then you can change the stroke weight to 1.25 for example. When creating artworks for for screen display always verify the result with View > Pixel Preview turned on.
    tonyharmer wrote:
    ...I only referred to Photoshop to illustrate the behaviour - vector tools aside, everything you do in Photoshop has to be whole pixels
    As I said, Photoshop doesn't have  snap to pixel grid feature like Illustrator. You can easily create fuzzy lines in Photoshop if you are not drawing them precisely in the middle of the pixels. To check what I'm talking about try this In Photoshop, create a new document with a very small pixel dimensions like 20 x 20 pixels and zoom to the maximum 3200% to see clearly the result. Fill the image with light gray color so you can see the pixels when View > Show Pixel grid is on. Then with black color try drawing a straight line with any tool that creates pixels like a hard brush or the line tool used in pixel mode, and try using constraints like holding Shift while dragging. You will see that unless you draw the lines exactly in the middle of the pixels it will be fuzzy and not clean. The only way to ensure not fuzzy lines in Photoshop is to turn  off the anti-aliasing. You do this by unchecking the anti-alias for tools that have this option and instead of burshes use the pencil tool (which is brush without anti-aliasing). And Illustrator works the same too if you turn off Anti-aliased Artwork in its general section of the preferences and view the result with View > Pixel Preview, you don't need to have the Align to Pixel Grid on, the aliased result will be the same like in Photoshop.

  • XML based scrolling thumbnails

    IMPORTANT: My first time with flash and actionscript but am a computer science student so code is ok.
    that said I wanna build a xml based scrolling thumbnails in an horizontal bar.
    each pic should have some effect when the mouse is over it +
    the scrolling bar should scrol left or right depending on the mouse pos+
    the bar stops when am over a pic (with some conditions)
    I think this i all
    PS: I have only two days to do it :s
    I know it would be better if I do it from scratch this is how I do normaly but here am completly snowed under
    plz help thx

    Your best bet for getting a solution handed to you is to do a Google search for "AS3 scrolling menu tutorial"  Since code isn't an issue for you, you should be able to modify whatever you find to suit your detail needs once you understand how it is designed.

  • Fixing warped smaller text due to 'Align to Pixel Grid'

    Hi
    Hoping someone can help.
    For my fabric design business I usually create a 16.5x16.5cm artboard add a 16.5x16.5 cm rectangle and then add my text, making a repeatable pattern, before selecting it all and copying it onto a 33x33cm for print. However lately I haven't been able to get my rectangle to stay at 16.5cm, it kept changing to 16.51x16.51cm so I did a bit of research and started unselecting 'Align to Pixel Grid' when I created a new document. However once I selected my whole design before copying it to the larger artboard, it would always be at 16.5001x16.4747 or something like that so I would have to check,uncheck the 'Align to Pixel Grid' box in the Transform panel before I could finally get it to all stay at 16.5x16.5cm otherwise my designs were coming out with gaps between them.
    Now all of my smaller writing is printed out warped, which again after researching it seems to have something to do with the the pixel grid. Can someone please tell me how to fix this. And why all of a sudden I'm having these problems! I've been using this method for months and have never had a problem.
    Thanks

    Carla,
    I am afraid you will have to start over, more or less.
    It may be possible to rescue parts if you have saved earlier versions with undistorted parts of artwork.
    And it may be possible to correct simpler (parts of) artwork by moving Anchor Points with the Direct SelectionTool or something, based on the difference between desired and present dimensions.

  • Perfectly aligned on pixel grid, but X and Y cord. say different?

    Hello, I made this shape perfectly on the pixel grid with 'Snap to Grid', 'Align to Pixel Grid', and 'Show Grid' on. Every anchor is perfectly placed (i.e. not in the middle of a pixel) but for some reason my X and Y cordinates say it's off by half a pixel. When I change the .5 to .0, it unaligns my object. Why is it doing this? There is an example below of what it's doing.

    Erratic Fox,
    Your artwork is 12 by 9 pixels, so the Y value of the centre has to end at .5; and the X value is an integer as it should be.
    If you set the Transform palette Reference Point to any corner, I am sure you will get integer values only.

  • Death to "Align to Pixel Grid".

    Now that we have responsive design and a myriad of different display sizes and resolutions can we please get rid of that pesky "Align to Pixel Grid"?
    If I want pixel perfection, I will type values into the transform panel.
    I've had enough of Align to Pixel Grid doing the following;
    1. Distorting small vector symbols.
    2. Misaligning anything with a stroke.
    3. Automatically turning on with symbols despite the fact that I have it off by default and no part of the symbol has it activated.
    4. Making it difficult to align triangles and other non-rectangular shapes
    5. Just generally second-guessing me. I know you're a computer and you can handle like a hundred billion instructions per second but I'm still running the show here!
    It's now barely relevant. Surely it's time to kill it.
    Please?

    The specific use is web and other screen media design. I am thinking you have another issue such as a corrupt preference file. The reason I think that, is I have not heard of any complaints from anyone else, including myself. Granted, it maybe possible that some of your issues have not been noticed, but seams like they would be.
    When creating a new document, using the print preset should also disable the snap to grid.
    Try holding down the three shift + ctrl/cmd + alt/opt modifier keys when starting illustrator.

  • Enabling 'align to pixel grid' makes object jump more then i want

    Hi,
    When i enable ''align to pixel grid' from transform option,
    The object/point move more than what i want (it shifts in a fixed place)
    I tried 'keyboard increment' to 0.1 but it seems it does not works when 'align to pixel' is enabled.
    Please help, Thanks

    Jimmy,
    Align to Pixel Grid will do just that, so you basic unit (of moving and whatever) is 1 pixel = 1 point = 1/72 inch.

  • Align to pixel grid for new object does not work

    I have set my document to align new objects (shapes) to pixel grid under the advanced settings
    I have gone into the options on the transform panel and set the check box to say all new objects should also align to pixel grid
    But when I create a shape it doesn't work, I end up with shapes with 3 digit decimal sub pixel sizes. eg. 34.536px
    If I want an object to align to pixel grid I'm having to set it individually for each object.
    Is this a bug that will get fixed or is there some work around, it's frustrating to have to set the feature for every single object I create

    Align new Objects to pixel grid setting works perfectly for all tools in Adobe Illustrator CC (17). In Illustrator 2014 CC (18) the rectangle and rounded rectangle tool do not automatically align to pixel.
    This thread says it's because of the new Live Rectangle tool objects are exempt from the Align to Pixel grid until you release them by expanding them.
    Bug? Illustrator CC 2014 and Pixel Grid settings not working.
    I'll be using the old version until Adobe 'fixes' this.

  • BUG - Align to pixel grid fails when object is on artboard edge.

    When I am positioning an object (a rectangle, for instance) and am attempting to position it along the right edge of the artboard, with Snap to Pixel turned on, as I drag the rectangle down the artboard edge, the object no longer snaps to pixel.
    Related bug, you can't turn off snap to artboard edge. Not sure why.
    Illustrator CS5 on a Mac.

    Align new Objects to pixel grid setting works perfectly for all tools in Adobe Illustrator CC (17). In Illustrator 2014 CC (18) the rectangle and rounded rectangle tool do not automatically align to pixel.
    This thread says it's because of the new Live Rectangle tool objects are exempt from the Align to Pixel grid until you release them by expanding them.
    Bug? Illustrator CC 2014 and Pixel Grid settings not working.
    I'll be using the old version until Adobe 'fixes' this.

  • Can't drag & drop thumbnails in grid view

    Version 1.2: While in Grid view, I am unable to drag and drop thumbnails to manually sort. I am grabbing from the center of the thumbnail and the thumbnail turns to the dotted rectangle. However, when I drag, nothing happens.
    Has anybody encountered this?
    Thank you.

    Shut off include photos from subitems.
    This exact question was answered yesterday.

  • Align to pixel grid

    Hi all,
    My plugin uses AIShapeConstructionSuite for creating geometric shapes.
    I don't want them to be aligned to the pixel grid, they are however when "Align new objects to pixel grid" is enabled in the current document.
    Is there any way to disable this from the SDK?
    Thanks.

    Found it, apparently it has to do with the pixel-perfect mode of an art object, which can be set with AIArtSuite.

  • XML Menu with thumbnail images

    Hello all,
    I am trying to create a dynamic menu for a video player. Much
    like the one found here (
    MTV OverDrive. )Obviously
    this is a Flash site and I can only assume the video list is being
    generated via XML. I am trying to accomplish the same thing, only I
    am not using FCS.
    I just want to create the buttons dynamically with thumbnail
    images and text via XML, and in turn load the video based on a
    button click. I have the video part working fine, using a video
    object, I just need to know how to create the buttons WITH THUMBS
    from an XML file. I can figure out how to load the video once the
    button is clicked. The problem is the menu itself and loading the
    different thumbnail with the button.
    I am sure it has something to do with "attachMovie,
    DuplicateMovie, or CreateEmptyMovieClip" but I am not sure how to
    do this with XML.
    I really want to stay away from using the pre-built
    components and want to code this myself so a list component is out
    of the question.
    I have search for many hours now and can not find anything
    that is like what I am looking for yet. So any help pointing me in
    the right direction would be much appreciated.
    From what I can gather it has something to do with creating
    what the button is going to look like (mainly the Background for
    mouse on and over states) and save it off as a MC then giving it a
    linkage ID. Within that MC I would think there would be another MC
    to hold the Thumbnail image with its own linkage ID and another MC
    that has a named dynamic text filed with it own linkage ID. Am I
    total off base here?
    Thanks

    Hi,
    On the same line I would suggest you to create an MC and put
    a button and a textField inside. Then using duplicate MC function,
    create instances of this MC according to the XML. For this, create
    XML nodes for each clip containing text, image to be displayed, URL
    for the video etc., and repeate the node for as many as you
    require. Then parse the XML in flash in an multi dimensional array.
    Then using length pf array duplicate your MC and populate the
    required menu. I guess this is enough for you.
    Anything else required do contact me!
    Cheers!!
    Shreeram

  • Controling an XML based scrolling thumbnails

    hi!
    this is my code so far:
    import caurina.transitions.*;
    var xmlRequest:URLRequest = new URLRequest("scrolling.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlRequest);
    var imgData:XML;
    var imageLoader:Loader;
    var rawImage:String;
    var rawH:String;
    var rawW:String;
    var pos:Number;
    var imgNum:Number = 0;
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);
    Tweener.addTween(Bar_am, {x:-1000, time:10, transition:"linear"});
    function xmlLoadedF(event:Event):void{
    imgData = new XML(event.target.data);
    rawImage = imgData.image[imgNum].imgURL;
    rawW = imgData.image[imgNum].imgW
    rawH = imgData.image[imgNum].imgH
    imageLoader = new Loader;
    imageLoader.load(new URLRequest(rawImage));
    Bar_am.addChild(imageLoader);
    imageLoader.x = stage.stageWidth;
    imageLoader.y = (stage.stageHeight - Number(rawH)) / 2;
    am trying to make that object to scrol depending on the mouse pos:
    ex:
    if mouse pose < 50 scrol ight
    if mouse pos >500 scrol left
    and when am out off the scrolling bar the bar goes to the normal scrolling
    thx in advance
    PS: tryed many functions not working

    hi!
    basacly am trying to have a list of pics then every single pic must be clickable and have some effect when the mouse is over it
    but am stuck!
    should I load everything first?
    thx
    otherwise, since I must get it done by the end of the I have this code that am trying to change
    but don't know how to transform the function responssible for the movement!
    plz help
    the code:
    picData = new XML();
    picData.ignoreWhite = true;
    picData.onLoad = loadXML;
    picData.load("xmlArtData.xml");
    function loadXML() {
    runScript();
    function runScript() {
    _root.createEmptyMovieClip("bg", 1);
    _root.createEmptyMovieClip("image", 3);
    _root.createEmptyMovieClip("thumbnails", 2);
    images = new Array();
    for (i=0; picData.firstChild.childNodes[i].firstChild.nodeValue != undefined; i++) {
      images.push(picData.firstChild.childNodes[i].firstChild.nodeValue);
    thumbnails._x = 280;
    thumbnails._y = 375;
    imageLoading = true;
    numObjects = images.length;
    objectsInScene = new Array();
    focalLength = 800;
    spin = 0;
    _root.thumbnailSize = 125/((numObjects)/9);
    displayPane = function () {
      var angle = this.angle+spin;
      var x = Math.cos(angle)*this.radius;
      var z = Math.sin(angle)*this.radius;
      var y = this.y;
      var scaleRatio = focalLength/(focalLength+z);
      this._x = x*scaleRatio;
      this._y = y*scaleRatio;
      this._xscale = -(this._yscale=100*scaleRatio);
      this._xscale *= Math.sin(angle);
      this.swapDepths(Math.round(-z));
    angleStep = 2*Math.PI/numObjects;
    for (i=0; i<numObjects; i++) {
      thumbnail = thumbnails.createEmptyMovieClip("thumbnail_"+i, i);
      myPic = thumbnail.createEmptyMovieClip("picHolder", 1);
      myPic.loadMovie(images[i]);
      thumbnail.angle = angleStep*i;
      thumbnail.radius = 250;
      thumbnail.x = Math.cos(thumbnail.angle)*thumbnail.radius;
      thumbnail.z = Math.sin(thumbnail.angle)*thumbnail.radius;
      thumbnail.y = 40;
      thumbnail.display = displayPane;
      thumbnail.drawBox(_root.thumbnailSize);
      thumbnail.buttonize(i);
      thumbnail.notLoaded = true;
      objectsInScene.push(thumbnail);
    panCamera = function () {
      spin -= this._xmouse/10000;
      for (var i = 0; i<objectsInScene.length; i++) {
       objectsInScene[i].display();
    thumbnails.onEnterFrame = panCamera;
    _root.onEnterFrame = function() {
      for (i=0; i<images.length; i++) {
       if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail _"+i].picHolder.getBytesTotal() == 1) && _root.thumbnails["thumbnail_"+i].notLoaded) {
        if (_root.thumbnails["thumbnail_"+i].picHolder._width>=_root.thumbnails["thumbnail_"+i].picH older._height) {
         _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_" +i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._wid th)));
         _root.thumbnails["thumbnail_"+i].picHolder._y = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._height)/2;
        if (_root.thumbnails["thumbnail_"+i].picHolder._width<=_root.thumbnails["thumbnail_"+i].picH older._height) {
         _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_" +i].picHolder._height-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._he ight)));
         _root.thumbnails["thumbnail_"+i].picHolder._x = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._width)/2;
        if (_root.thumbnails["thumbnail_"+i].picHolder._width == _root.thumbnails["thumbnail_"+i].picHolder._height) {
         _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_" +i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._wid th)));
         _root.thumbnails["thumbnail_"+i].picHolder._x = _root.thumbnails["thumbnail_"+i].picHolder._y=0;
        _root.thumbnails["thumbnail_"+i].picHolder._alpha = 60;
        _root.thumbnails["thumbnail_"+i].notLoaded = false;
       if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail _"+i].picHolder.getBytesTotal()<1)) {
      if (_root.image.getBytesLoaded()/_root.image.getBytesTotal() == 1) {
       if (imageLoading == true) {
        _root.image._alpha = 0;
        if (_root.image._width>_root.image._height) {
         _root.image._yscale = _root.image._xscale=(100*(1-(_root.image._width-400)/_root.image._width));
        if (_root.image._height>_root.image._width) {
         _root.image._yscale = _root.image._xscale=(100*(1-(_root.image._height-400)/_root.image._height));
        if (_root.image._height == _root.image._width) {
         _root.image._yscale = _root.image._xscale=(100*(1-(_root.image._height-400)/_root.image._height));
        _root.image._x = (625-_root.image._width)/2;
        _root.image._y = (425-_root.image._height);
        imageLoading = false;
       _root.image._alpha += 5;
       if (image._alpha>100) {
        image._alpha = 100;
    MovieClip.prototype.buttonize = function(num) {
    this.onPress = function() {
      imageLoading = true;
      _root.image.removeMovieClip();
      _root.createEmptyMovieClip("image", 3);
      _root.image.loadMovie(images[num]);
    this.onRollOver = function() {
      this.picHolder._alpha = 100;
    this.onRollOut = function() {
      this.picHolder._alpha = 60;
    MovieClip.prototype.drawBox = function(boxSize) {
    this.lineStyle(1, 0x000000, 0);
    this.beginFill(0x000000, 100);
    this.lineTo(boxSize, 0);
    this.lineTo(boxSize, boxSize);
    this.lineTo(0, boxSize);
    this.lineTo(0, 0);
    this.endFill();

Maybe you are looking for