Why i can't set an veriable into animation attributes?

Hello,
I have an simple question, why i can't put variables into 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" verticalCenter="0">
        <s:Rect width="100%" 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" top="0" bottom="0" right="0"
             rollOver="MoveRect_1ToRight.play();" rollOut="MoveRect_1ToRight.pause();">
        <s:Rect width="100%" 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 handler as an example (and I
changed stage to this), but you might also consider using the
applicationComplete handler if you do want a non null stage value.
<?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"               
creationComplete="init()">          <fx:Declarations>       
<s:Parallel id="MoveRect_1ToRight">             <s:Move
xTo="{MoveXto}" target="{Rect_1}" duration="8000" />        
</s:Parallel>     </fx:Declarations>         
<fx:Script>         <![CDATA[             [Bindable]
public var MoveXto:Number; 
            private function
init():void {
                MoveXto = -1 * (Rect_1.width -
this.width);
            }         ]]>
</fx:Script>
    <s:Group id="Rect_1" width="3000"
height="800" verticalCenter="0">
        <s:Rect width="100%"
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" top="0" bottom="0" right="0"
rollOver="MoveRect_1ToRight.play();"
rollOut="MoveRect_1ToRight.pause();">
        <s:Rect
width="100%" height="100%">
<s:fill><s:SolidColor color="#000000"
alpha="0.2"/></s:fill>
        </s:Rect>
</s:Group>
</s:Application>
Thank you very much !

Similar Messages

  • HT4759 I now have my daughters iPad can you please tell me why I can't set up iCloud.in settings the iCloud is greyed out also how do I change her mail account to mine?

    I now have my daughters iPad can you please tell me why I can't set up iCloud.in settings the iCloud is greyed out also how do I change her mail account to mine?

    To change your iCloud ID or password you have to go to Settings>iCloud, tap Delete Account, then sign back in with your other ID.  If you need to migrate any of your daughter's iCloud data to your account, choose Keep on My iPad when prompted, then choose Merge to upload it to the new account.  If not, choose Delete from My iPad.

  • Why I can't continue add photos into my iPod ???

    I don't know why I can't continue add photos into my iPod. For example, I already had some photos in my iPod and I can see the folder that contains all the photos in my iPod with a mark on it. But one think that I don't know is when I want to add more photos into my iPod, iTune will sync my iPod for a very long moment and there's no processing indication, it's like there was a message 'Syncing iPod' that show in the top of the iTune screen, but there was no 'processing bar' under it. I don't know why this happen. Do I have to erase all the photos that were currently in my iPod and the iPod Photo Cache located in My Photos to re-upload the new photos into my iPod? But in this situation, I couldn't leave the 'old photos'in my iPod. I just want to make a hudge photos library, COULD ANY GENIUS HELP ME ?

    i don't know if this will help but this is how i manage my photos:
    1. create a folder (mine is called 'ipod photos')
    2. put all the photos you want on your ipod in that folder
    3. open itunes, plug in your ipod.
    4. on the overview screen, click the photos tab
    5. check the, 'sync photos from' box.
    6. browse to the folder you want to sync with
    7. hit sync
    then when i want to add new photos, i just add them to that folder and hit sync again.

  • HT5622 how can I set a computer into my apple ID from someone else's Apple ID?

    Hi there,
        My father passed away a few months ago and I have inherited his iMac. How can I set his iMac now to my Apple ID instead of his? I am currently still under his Apple ID yet he no longer has e-mail, etc... and I would like to see my things instead.

    The first thing you should do after acquiring a used computer is to erase the internal drive and install a clean copy of OS X. How you do that depends on the model. Look it up on this page to see what version was originally installed.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard installation disc, which you can get from the Apple Store or a reputable reseller — not from eBay or anything of the kind.
    If the machine shipped with OS X 10.6, you need the gray installation discs that came with it. If you don't have the discs, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, it should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    Once booted from the disc or in Internet Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive, which is what you should do.
    After partitioning, quit Disk Utility and run the OS X Installer. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    You should then run Software Update and install all available system updates from Apple. If you want to upgrade to a major version of OS X newer than 10.6, buy it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.

  • Why I can't set my secondary monitor as main one.

    Hi,
    I'm Korean Macbook User and software programmer(So, I'm not begginer).
    I have some problem in setting my Dell 2405fpw as main monitor on Macbook.
    I use boot camp to use windows XP pro sp2 in work and always use secondary monitor. But when I setting my Dell 2405fpw or Samsung LSA18TFT Monitor as main monitor, Windows doesn't work as I want. Windows reset Macbook's LCD as main display and Secondary Monitor black out(Using Just One Macbook's LCD). But When I set Macbook's LCD as main monitor and other monitor as sub one, It works well.
    I tried everything during last ten days. Upgrading Intel Graphic Driver and Trying with other brand monitors, finding Korean Apple User Forum, sending mail to Intel Supporting, and so on. But it didn't work.
    In Korea Apple User Forum, Some user have same symptom with me. There are a lot kinds of case. Someone has latest Macbook and uses latest MAC OS X 10.5.1. But have same problem.
    There are anyone solve this problem perfectly?
    Please let me know.
    (you can ask me any question or send solution with [email protected])
    Thank you for your reading.
    (And sorry for my poor English.)
    from Korea.
    Sungyong Park.\

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro
    You should be able to size the detail section of the Form in the open event or onload event.
    I don't have 2010 on my PC. Why not post the sample code here?

  • Why I can't I import mbx into Mail?

    I am trying to transfer a colleague's e-mails from her old PC (running Windows Mail under Vista) to Apple Mail 6.6 on her MacBook Pro (running OS8.5).
    There are a lot of nested folders of email within her existing mail programme.
    Using a free utility, I have successfully exported all the emails on the PC, and converted the .eml files to .mbx files, maintaining the file structure, and copied them to the Mac. It should now be simple enough to import the mbx files into Apple Mail.
    The import works after a fashion, but it adds an extra level of folders within the file structure, putting each e-mail in its own sub folder within Mail.
    E.g. Instead of seeing IMPORT/INBOX/AnEmail
    I see IMPORT/INBOX/773p6CA1-00---1/AnEmail
    This makes it impossible to search the imported emails, so they become pretty useless.
    I also tried converting the emails to emlx, and then using the 'Import from Apple Mail' option, but the same thing happens.
    HOW CAN I STOP THIS HAPPENING? (It's driving me a bit mad.)
    thanks!

    Iphone does not save to the SIM card.
    If you have another SIM card that has contacts on it, then use the direction in the manual under settings to import them into the iphone:
    Import contacts from a SIM: Choose “Mail, Contacts, Calendars,” then tap Import SIM
    Contacts.
    The contact information on the SIM is imported to iPhone. If you have Contacts
    enabled for both MobileMe and Microsoft Exchange, you’re prompted to choose which
    account you want to add the SIM contacts to."
    http://manuals.info.apple.com/enUS/iPhone_UserGuide.pdf

  • Why I can't import AI files into Flash CC?

    I used to work with CS5 and I had no problem importing files, but with the CC version, simply the images didn't appear... I don't understand why.
    Should I change something in preferences? It seems as if Flash doesn't recognise the ai files

    Test out if you can directly copy ai files to the clipboard and paste it in flash.
    There should pop up a dialogue, where you get 4 options.
    The first one will convert the ai to bmp., which you rarely want.
    the lower three imports the drawing as vector.

  • Can't seem to figure out why I can't load my music into Itunes??

    Hello Hello!
    Ok so I updated my itunes lately and for some reason I can't seem to load any new songs into itunes (I do it the manual way *file *add file to library *click or highlight songs and press *open) and it still wont show up on itunes. Is there a simple solution to this??
    Thank you

    In fact the Store is not using the Feedburner feed but the one at
    http://www.mvccfrederick.com/podcast/mvccpodcast.xml
    There appear to be no problems with the feed; all the episodes appear when subscribing in iTunes. Sometimes the Store does seem to get stuck and fail to update; and there have apparently been some problems about updating recently which might be related. Apple's engineers know about those and are working on them.
    I can only suggest emailing Support at podcasts 'at' apple.com and asking them to re-index your podcast: this might do some good.

  • Why we can not set oracle static parameters in memory

    Hi,
    I Know i am asking some impenetrable  question here But my intention  is to clear why still some parameter are static. there should be very strong reason behind that. anyone any idea. please somebody explain with any parameter why it is static.
    Warm Regards,
    Santosh Ganjure
    Mumbai
    Maharashtra(I)

    user13432927 wrote:
    Hi,
    One of my interview they asked me a question like we can use procedure using out parameters, why exactly need a function.
    I gave possible answers but they did not happy with them.
    Can you please tell me strong reason in practical way?
    Thanks
    kalpanaPossibly because the function needs to be called by SQL ... you can't use a procedure for that.

  • Why I can only set Chinese fonts in some English books?

    I dragged some English epub books into iBooks which are not from the iBookstore. But when I read them. I found that there are only Chinese fonts available in some of the books.
    Where are the English fonts?! There are a couple of sentences to introduce the book in Chinese, but the whole content of the book is in English!
    The books from iBookstore are totally okay with fonts though.
    What can I do with it? Help!

    Please use the camera icon to post a screenshot of what you are talking about.  Also provide the title of the books and where you got it.

  • Why I can't set the Detail Section of a form at onLoad event?

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro
    You should be able to size the detail section of the Form in the open event or onload event.
    I don't have 2010 on my PC. Why not post the sample code here?

  • How can I set up SFTP into a Mac if I do not have access to its network's router?

    Title says it all. My Mac is at work. I cannot change the work's router settings. Is there a way to set up SFTP access to the Mac or am I out of luck?

    data.
    At least your query seems to get data where MODIFIED_BY IS NULL, doesn't it?
    So if the reccount is>0 there is a reason to inform your employees.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH
    http://www.tmn-systemberatung.de

  • HT4970 Why I can't set reminder on my iPhone?

    My reminders doesn't work. how can I do? Even I use sari to create it.!

    Hi there,
    If you are using iCloud with Reminders, you may find the troubleshooting steps in the article below helpful.
    iCloud: Troubleshooting iCloud Reminders and Tasks
    http://support.apple.com/kb/ts4000
    -Griff W.

  • Why I can't sync my music into iCloud

    I have tons of Music in iTunes (win version). Would like to download it to iCloud so that it is in use also in my iPhone and iPad. Ther is not such a choice in Win - iTunes. What to do?

    There doesn't need to be a choice in iTunes... plug the iDevice into the computer and sync it.

  • Why I can't set my gmail

    I couldn't configure my gmail email account on my iPhone 4S. In the mail setting I got google mail but not gmail like my other phones. I tried to create an account using the "other" option, but it didn't work.

    http://support.google.com/mail/bin/answer.py?hl=en&answer=77702

Maybe you are looking for

  • BU_RELNR error while transferring a vendor from EBP to SUS

    Hi experts, We have EBP on one client and SUS on abother client on the same server.  SRM 5.0 and (srm server 5.5) and XI 7.0 (PI).  We could succesfully import the scenario of service procurement with supplier enablement and we are going with Extende

  • Please help on this crash message

    I'm having continous crashes with Logic 7.1.1 (10.4.3 prokit 3.1 installed) and i don't know to understand this part of the inform: Thread 0 Crashed: 0 com.apple.logic.pro 0x001a1258 0x1000 + 1704536 1 com.apple.logic.pro 0x001a1394 0x1000 + 1704852

  • Photoshop layers in AI uneditable

    In Ill.CS3, I opened a psd w/ 2 layers one line, one fill and transparent background. Both layers come in w/ transparent bg's correctly but the lines aren't editable, just floating in a big square bounding box with no mask, that can't be ungrouped an

  • The Application text has attempted to open local content, would you like to allow this??

    Hi All, Can anybody help me out? "The Application text has attempted to open local content, would you like to allow this??" BlackBerry 8310 (OS version 4.5) device is giving this prompt message again and again while i have allowed all permission. The

  • N95 8GB problems, HELP PLEASE!

    MY n95 8gb turns off by it self sometimes or ends calls within good range of an antena or most of all says the following message when trying to make a call: Connection error (no ring tones or nothing, i tried calling the provider company, switched th