1 Reply Latest reply on Jun 26, 2009 5:12 AM by Ned Murphy

    Problem with variables

    Jankee10

      Shame on me i am still working with oldschool Flash 5 - but i love it :-)

      OK, my Problem might not be Flash 5 specific and I hope someone can help me with this.

       

      I have a Movie-clip and want to set the _x and the _y coordinates dynamicly.

      That does work perfectly when i do it this way

       

      testwert01 = 400;

      setProperty ("_root.movieclip", _x, testwert01);

       

      Now I take the value of _x from a MySql Database and bring it via php into the flash-movie.

       

      /:x = this.vari_x;

      testwert01 = /:x

       

      This works so far - the corect value is shown in a texarea named "testwert01"

       

      But now I try to use the "testwert01" to set the _x for my movieclip - nothing happens.

       

      /:x = this.vari_x;

      testwert01 = /:x;

      setProperty ("_root. movieclip", _x, testwert01);

       

      My last Idea was, that the variable testwert01 is senn as a text by flash and not as a number... so I tried hudrets of variation with "Eval" and "number" but nothing worked...

       

      ANYBODY GOT AN IDEA FOR ME ????

        • 1. Re: Problem with variables
          Ned Murphy Adobe Community Professional & MVP

          It's been too long for me versus Flash 5, but here's what I'm wondering...  Why is this...

           

          /:x = this.vari_x;

          testwert01 = /:x;

           

          Not one line...

           

          testwert01 =  this.vari_x;

           

          And you might try using... testwert01 =  Number(this.vari_x);

           

          though, again, it's Flash 5... I don't remember if it supports that.