0 Replies Latest reply on Dec 2, 2011 8:54 PM by Kristin95762

    move effect on an array of images

    Kristin95762 Level 1

      Hi

       

      This is my code experiment, and this works. But what I'm trying to get to is an array of buttons that will move up and then back down independently as I roll over each one. If I create my array in the MXML such as: targets={[button1, button2, button3]}, all the buttons will move at the same time, and I can see why (now).

       

      What am I needing to do next? Eventually I want to load an array of images from a sqlite table.

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

                                                           xmlns:s="library://ns.adobe.com/flex/spark"

                                                           xmlns:mx="library://ns.adobe.com/flex/mx"

                                                           height="300" width="300">

                <fx:Declarations>

                          <s:Move id="moveUp" target="{button}" yTo="80"/>

                          <s:Move id="moveDown" target="{button}" yTo="100"/>

                </fx:Declarations>

       

                <s:Button id="button" x="10" y="100" height="96" label="button" rollOver="moveUp.play()" rollOut="moveDown.play()"/>

       

      </s:WindowedApplication>

       

      Thanks

       

      Kristin