Why I can not put a veriable in attributes of animation?

Hello

I have a simple question, why I can't put variables in animations?

<? XML version = "1.0" encoding = "utf-8"? >
< s:Application width = "100%" height = "100%".
' xmlns:fx = ' http://ns.Adobe.com/MXML/2009 "
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" >

< fx:Declarations >
< s:Parallel id = "MoveRect_1ToRight" >
"< s:Move xTo ="
{MoveXto}"target ="{Rect_1}"duration ="8000"/ >"
< / s:Parallel >

< / fx:Declarations >

< fx:Script >
<! [CDATA]

public var MoveXto:Number =-(Rect_1.width-stage.width);

[]] >
< / fx:Script >

< s:Group id = "Rect_1" width = "3000" height = "800" red = "0" >
< s:Rect width = '100 percent"height ="100% ">
< s:fill >
< s:LinearGradient >
< s:GradientEntry color = "#e8db03" / >
< s:GradientEntry color = "#153eec" / >
< / s:LinearGradient >
< / s:fill >
< / s:Rect >
< / s:Group >

< s:Group id = "Rect_2" width = "80" high low "0" = "0" right = "0".
rollOver = "MoveRect_1ToRight.play (); "rollOut ="MoveRect_1ToRight.pause (); ">
< s:Rect width = '100 percent"height ="100% ">
< s:fill > < s:SolidColor color = "#000000" alpha = "0.2" / > < / s:fill >
< / s:Rect >
< / s:Group >
< / s:Application >

Greetings

zombiecook

You need to calculate the value of MoveXto after the application is created, here, I use the creationComplete for example Manager (and I changed the stage for this), but you might also consider using the applicationComplete handler if you do not want a value non-zero stage.



"xmlns:FX ="http://ns.adobe.com/mxml/2009"
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx".
creationComplete = "init ()" > "
   
   
       


           
       
   
   
   
        [Bindable] public var MoveXto:Number;

private function init (): void {}
MoveXto = - 1 * (Rect_1.width - this.width);
}

]]>
   
   
   
       
           
               
                   
                   
               

           

       

   

   
   
rollOver = "MoveRect_1ToRight.play (); "rollOut ="MoveRect_1ToRight.pause (); » >
       
           
       

   

Tags: Flex

Similar Questions

  • why I can not put a wallpaper? I click on set as desktop and the desktop is always black?

    why I can not put a wallpaper?  I click on set as desktop and the desktop is always black?

    Also, if you have Windows 7, check out this Microsoft support article for other causes and troubleshooting ideas.

  • why we can not put windows 7 on our new computers?

    why we can not put windows 7 on our new computers?

    Jay

    You can "downgrade" to win 7 BUT dependent on the Lim, it may void your warranty and there is perhaps no drivers for your computer with windows 7.

    Putting aside the modern splash screen (which you can ignore at startup) win 7 and win 8 are very similar.  If you don't like the modern user interface, you don't need to use it.

    To work around the start right click the taskbar > properties > navigation >

  • Why firefox can not put version 23.1 version 24

    My 8500 Dell XPS desktop computer - firefox version 23.1 can not upgrade the version 24. I am running Win 7 64 bit. Other Dell XPS 8500 machines in my office have no problem at this level. These systems are running win 7 64 bit.
    Thanks in advance

    You can find the full version of the latest version of Firefox 24.0 in all languages and for all systems operating here:

    Download and save the installer of Firefox on the desktop and start the installation with a double click on the desktop icon.

  • Why I can not download CS4 Design Premium (student version) on my new PC?

    Greetings.

    I just bought a new PC HP dv6t-7200.  She has Windows 8 on it.  I bought the version Adobe CS Design Premium student a few years ago and tried to download it in my new computer.

    When I put the discs they sound as they begin, but then they gradually reduce and stop turning.  I checked my "Start" screen to display my 'c' drive and it does not even show that the disc is in the drive.

    Can someone tell me why I can not download these discus in my new computer?  I get no error message or of any kind of message that I can't download the discs, so I n "t know what is the problem.  Discus downloaded very well my last HP PC a few years ago and it is a set of student in good standing version.

    Help, please!

    nunod

    Download the trial of http://prodesigntools.com/download-adobe-cs4-and-cs3-free-trials-here.html

    Make sure that you follow the Instructions very Important on this page first otherwise the links do not work.

    Activate the test with your serial number.

  • why I can not get the same apps I have on my iPad?

    why I can not get the same apps I have on my iPad?

    Because they are different versions for different operating systems.

  • Why I can not contact you with FEEDBACK REAL

    Why I can not contact you with FEEDBACK REAL? Why Firefox to 28 allows me to download files from Web page complete, but worms 30 does not work? Plugins, Addons, Internet Security are the same on both systems. I can download the files in IE but not Firefox. What gives? I use NoScript, Better Privacy, Ghostery, and Kaspersky Internet Security configured the same on both systems. The only reason I checked is because on some sites, I can't download files and point of view completely. 30 to Firefox will download but not to create a complete directory html link so that I can open and view the file.

    Hi obliviondoll, the feedback site is here:

    https://input.Mozilla.org/feedback

    This is the page that opens if you use the Help menu in Firefox and choose to submit your comments...

    You can provide your e-mail address on the site of feedback where people reviewing the feedback have questions, but I think that it is rare that you would be so don't expect a response.

    In addition, I don't know if you scrolled down beyond the map on the contact page, but there are links down here (see the attached screenshot):

    https://www.Mozilla.org/contact/spaces/

  • I installed JZip and now I can not put my homepage of everything except the jzip search page. How to disable the functionality of jzip?

    I installed JZip and now I can not put my homepage of everything except the jzip search page. How to disable the functionality of jzip?

    See:

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

  • What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Hi all

    I am new to TestStand. Still in the learning process.

    What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Thanks in advance,

    LaVIEWan

    I'm sorry... I discovered that... its not at all possible to pass data to another sequence using variables... it must be through settings... once again I apologize for the display of such a stupid question

  • why I can not see servers on browser san andreas multiplayer?

    When I open samp (san andreas multiplayer), the servers just do not: O an idea why? And I now have windows vista (service pack 1).

    I reinstalled the game several times and still see no servers

    Here is the picture of my SEPM browser if it helps:

    http://www.upload.EE/image/626713/samp_no_servers.jpg

    And when I add a server, and then verify that: I do understand no/x /.

    http://www.upload.EE/image/626775/samp_info.jpg

    Please respond to someone why I can not see all the servers and how I can fix this problem? Thank you.

    Hello Artjom1993,

    Thank you for visiting the Microsoft answers community.

    You will need to contact the manufacturer to determine the cause of Word to locate servers through the application.

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I deleted the SMART virus, but I can't access my desktop. I have no icons and can not put everything on it.

    I deleted the SMART virus, but I can't access my desktop. I have no icons and can not put everything on it.

    Hello
    To view your files and your icons, download Unhide. Once downloaded, double-click display and let it run. It removes the attribute hidden on all files and try to restore the items on the start menu to their proper location.
    I hope this helps you.
    Brian
  • Can not put Windows Media says Server unavailable player security?

    Can not put Windows Media says Server unavailable player security?

    Hello

    You can download Windows Media Play Security Upgrade from the following link.

    The security component upgrade

  • Why I can not rename any folder to THE?

    Hello

    why I can not rename any folder to THE?

    I use windows vista sp2

    To THE is a name that is reserved for windows, but you can create it in the UNC format:

    Try this:

    MD \\.\D:\aux
    RD \\.\D:\aux

  • Why I can not activate my norton antivirus 2009.

    Why I can not activate my norton antivirus 2009, even though I am connected to the internet. Please someone respond to me within 15 days.

    NortonAantivirus 2009 is an old product and probably now obsolete.  Plan to install the excellent anf FREE Microsoft Security Essentials instead.

  • I would like to know why I can not download Silverlight Mircosoft.

    Anyone know why I can not download Silverlight?  This would help a lot.  I have Vista and it is difficult to find information on this topic.  IDA

    Anyone know why I can not download Silverlight?  This would help a lot.  I have Vista and it is difficult to find information on this topic.  IDA

    Hey, Ida Henderson

    see if they can help you in the sub forums silverlight

    http://forums.Silverlight.NET/forums/

    Walter, the time zone traveller

Maybe you are looking for