4 Replies Latest reply on Jun 23, 2010 7:54 AM by Colin Holgate

    flash member strange click behaviour on touchscreen

    FlashGodThe2nd Level 1

      Hi,

       

      I have a flash member inside my director file which has some problems when a touchscreen. I have to click one time before I can make a drag and drop.

       

      The strange thing is that the flash works when runnting w/o director with the touch.


      The clicks to director work good too. And using a mouse does work well too. Is there anything I can do to get my flash work correctly in director? I tried DTS but it doesn't realy help.

       

      TIA

        • 1. Re: flash member strange click behaviour on touchscreen
          Colin Holgate MVP & Adobe Community Professional

          Yes, unfortunately what you are seeing is how things are. It may relate to the way that Director has to pass events into Flash, I'm not sure. But there is a work around.Instead of using an onPress in the Flash, use an onRollOver. It's worth going slightly further, and use a config file that you can set whether this is running on a touch screen or not, that way you can do regular mouse driven demos of the software too. If you are running on a normal screen with a mouse and cursor, show the cursor in Director, and use onPress in your Flash scripts. If you're on a touch screen, then hide the cursor, and use onRollOver. Also, use an Xtra in Director to set the cursor position to somewhere harmless on idle, say to 0,0. That way if the user touches on one button twice i na row, both rollovers will trigger. If you're using a mouse and can see the cursor, don't move the cursor with the Xtra.

          • 2. Re: flash member strange click behaviour on touchscreen
            BSpero Level 1

            Colin is correct. I developed an entire Director program a couple years ago that integrated Flash elements. The whole thing had to be redone because once it went to a touch screen, the Flash elements wouldn't become active until you clicked on them. I couldn't use the mouse over trick either because of the way the program worked. It's just another reason why Director is completely irrelevant to most of the work we do at my company. It's almost all touch screens, and uses a lot of media. Authoring exclusively in AS3, which Director doesn't support(!!), it's not worth trying to incorporate the two together.

            • 3. Re: flash member strange click behaviour on touchscreen
              FlashGodThe2nd Level 1

              I read about a workaround by calling updatestage() in director at a buttondown script (  the mouseDownScript = "fixFlash" ). Because I was short on time I put a seconds workarund in my director movie (runnting the flash in a seperat window - and killing it when I need to) I don't know which workaround was used, so I don't know if the updatestage() thing is working (would be nice). Flash doesen't get the current cursor position on the click, updatestage may correct this.

               

              Director is still very usefull for me. Some projects are done much much quicker than in Flash. And some things still can't be done in Flash...

              • 4. Re: flash member strange click behaviour on touchscreen
                Colin Holgate MVP & Adobe Community Professional

                AS3 support in Director is being vastly improved as we speak. But mostly, I've use Flash elements for showing things that Director can't do, rather than as a way to plug in an entire working application into Director, quite often the Flash sprite doesn't need any code of its own, so whether that isn't AS2 or isn't AS3 hasn't mattered so much!

                 

                I'm curious, what was the issue that prevented the mouseover trick from working?