3 Replies Latest reply on Aug 30, 2010 5:41 AM by Anonym2010

    Flash to Air

    Anonym2010

      Hello guys,
      I'm trying to convert a Flash Project into an AIR application and have some serious problems.
      The Flash Project uses actionscript 3 classes in order to transform graphical objects placed at the stage. These transactions are realised using matrix's. All works perfectly in flash.
      As I change the profile from Flash 10 to AIR 1.5 in Flash CS 4, the transformations doesn't work any more as expected. I need to move the Mousecursor almost the whole Screen in order to get a transformation of 1 mm (guessed!) of the graphical object.
      Has somebody had this problem as well? When I change the Profile back to Flash Player 10 it all works perfect. Please help me!
      Greetings

        • 1. Re: Flash to Air
          chris.campbell Adobe Employee

          Hello,

          I moved this post to the AIR Development forum in hopes that other Flash CS4 developers can help chime in.  Do you have any sample code that you can share that illustrates the problem you're seeing?

           

          Chris

          • 2. Re: Flash to Air
            Anonym2010 Level 1

            Hello,

            after some investigation I was able to figure out the problem.

            I first used "stage.mouseX" and "stage.mouseY" to get the position of the MouseEvent and this worked for Flash Player 10 but not under AIR. I remembered that the MouseEvent - class itself has the "stageX" and "stageY" property and replaced the previous code with it, and it works now better.

            But now I have the Problem, that my matrix transformations (calculated in MouseEvent.MOUSE_MOVE) sometimes are just incorrect. I thought it would be a performance issue and tried it again with the Flash Player 10, but the problem still remains.

            I think I've read somewhere, that the "stageX" and "stageY" are calculated everytime and the "stage.mouseX" and "stage.mouseY" should be used (because of performance) but this doesn't work for me. Can someone please help me?

            Sorry, but I can't reveal code .

            Greetings

            • 3. Re: Flash to Air
              Anonym2010 Level 1

              I could find out, that there was just an error in my calculation of the matrix. Now it is also ready for use in AIR. Thanks for all help.

              Greets