12 Replies Latest reply on Mar 23, 2009 7:35 AM by BSpero

    HELP!!!!!!!!!!!!  DRAG AND DROP!

    korkster911
      So I've developed an Interactive Touchscreen application. Everything works great on the computer. Mouse clicks, click and drag, etc. I've developed for touchscreens before with no issues...

      HOWEVER, this is the problem. The Flash application performs perfectly when running on it's own as an swf. The same goes for Director... BUT!!!! As soon as I embed a Flash object in the Director application, Mouse clicks do NOT function properly...

      It's almost like the first tap on the screen registers a new mouse location and it takes a second touch to initiate the actual click!

      ?????????????????????????????????????????

      Please help!!!!!
        • 1. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
          korkster911 Level 1
          Anyone???

          I'm growing more and more disappointed with the support for Director. While I don't want to do it as I've supported Director for 10 years, I can use Zinc to wrap my application and it will work that way.

          But I DON'T want that to be a solution... If it is, I'm done with Director! I can't rely on software with no support to make a living. Director seems dead, Zinc is alive and well.

          This is my last desperate attempt to find a solution, Please help? I've found other people with the same issues and yet they have gone un-addressed and Adobe seems to have no desire to research and fix these HUGE issues.

          http://www.directorforum.de/showthread.php?t=54055
          http://www.experts-exchange.com/Web_Development/Software/Macromedia_Director_Video_Softwa/ Q_21413860.html
          http://www.directorforum.de/showthread.php?t=52818

          <rant>

          I mean COME ON! TOUCH SCREEN KIOSK WITH FLASH DRAG AND DROP DOESN'T WORK!!! Isn't this what Director is meants for? kiosk and CD-ROM technologies!!!??? I HATE the fact that this issue has only become one when the touchscreen arrived... It should be a no-brainer that it would work. how can Adobe ignore this HUGE flaw?

          </rant>
          • 2. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
            Chunick Level 3
            do yourself a favor and subscribe to the Direct-L list and then you have access to a wealth of info by some of the top Director developers... in the meantime, here's a excerpt I got from doing a quick search using this term, Touchscreen and flash:
            quote:

            Subject: Re: Touchscreen - Passing events to Flash...
            Date: Fri, 2 Jun 2006
            Posted By: Kenneth Kawamoto

            Flash Sprite on Touchscreens requires two touches to respond.

            One way to deal with this is to use onRollOver event handler for buttons in
            Flash instead of onPress/onRelease. Something like:

            Button.onRollOver = function():Void{
            getURL("Lingo:resetCursor()");
            doSomething();
            }

            Then in Director send the cursor off stage when resetCursor() is called. (As
            far as I know Flash cannot control the cursor.)



            ... and this aggregated post:
            quote:


            >We're developing touchscreen application using embedded Flash. All the
            >Flash buttons are 'onPress'.
            >>We've actually run across the same problem a number of times with
            >>touchscreens; it seems to be a 'fun' thing with flash...

            >>>As grimmwerks says, it's a known issue. I'm not sure if it's being
            >>>worked on or not. The workaround I've used is to set a variable in
            >>>the Flash member based on whether the projector is running on a touch
            >>>screen or not, and to operate the buttons on release if it's touch
            >>>screen and on press if it's not. That pretty well solves the problem,
            >>>although it's not as satisfying as using press.

            >>>>This gave me a lot of headaches in the past too. I contacted Macromedia
            >>>>support then - their answer was that the issue was not known and should be
            >>>>solved by tweaking the settings of the touchscreen.
            >>>>
            >>>>They also gave me some hints and this is what I think: when you touch the
            >>>>screen it is registered as mouse rollover in Flash button symbols. The
            >>>>second touch then registers as mouse down/up, depending on the touchscreen
            >>>>settings. That's why you need to touch twice to invoke the event.
            >>>>
            >>>>I haven't tested this but I wonder if replacing buttons with movie clips in
            >>>>Flash can solve the problem. Flash buttons always have rollover state but
            >>>>movie clips don't, so the first touch may not be interpreted as rollover.


            • 3. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
              korkster911 Level 1
              Thanks for the Advice Chunick... It seems like you and Rob are really the only ones who seems active... At least, from where I sit...

              As for the Direct-L list, is that Directorforum.com?

              And finally, I've tried to manipulate the enter, up, down, press, release and while I can tap dance and make those work, I can't for the life of me figure out a "mouse down and drag" work around...

              Thanks again for your reply.
              • 4. HELP!!!!!!!!!!!!  DRAG AND DROP!
                korkster911 Level 1
                hmmmmmm..... Although,

                >>>>They also gave me some hints and this is what I think: when you touch the
                >>>>screen it is registered as mouse rollover in Flash button symbols. The
                >>>>second touch then registers as mouse down/up, depending on the touchscreen
                >>>>settings. That's why you need to touch twice to invoke the event.

                This is interesting... But I don't think it will work... I'll test this one out.
                • 5. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                  korkster911 Level 1
                  quote:

                  Originally posted by: korkster911
                  hmmmmmm..... Although,

                  >>>>They also gave me some hints and this is what I think: when you touch the
                  >>>>screen it is registered as mouse rollover in Flash button symbols. The
                  >>>>second touch then registers as mouse down/up, depending on the touchscreen
                  >>>>settings. That's why you need to touch twice to invoke the event.

                  This is interesting... But I don't think it will work... I'll test this one out.


                  Nope... This did nothing. MC's or buttons. Makes no difference. It's important to note that the Flash works perfectly with a touchscreen... It's ONLY when it's in Director that it requires a double action.

                  • 6. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                    Chunick Level 3
                    Direct-L link: listserv.uark.edu/archives/direct-l.html
                    .... it's just a simple google.

                    I have zero experience with Touchscreens so that's the best I can do, for now.
                    • 7. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                      korkster911 Level 1
                      <sigh>

                      The only way I could solve the issue was to wrap the file using MDM Zinc... And it worked perfectly... The first time...

                      I needed to rebuild a number of elements that I was relying on Director for, but in the end... Director/Adobe let me down.

                      I appreciate your help Chunick...

                      • 8. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                        TimDixon
                        Yup, This is a problem I have come across a few times with flash and director over the las few (3-4) years!!

                        Digging around seemed to give pretty much the same answers as everyone is giving. - It seems we see the problem, but Adobe don't!! This is the conclusion I have come up with...hope it helps.....

                        It seems the 1st click set the 'focus' to flash rather than director - It only seems to be with touchscreens, as a mouse click works fine. The second and subsequent clicks seem to work.

                        I have found that many touch screen drivers have a few settings that change the way the screen responds to touch. (I can't remember them off-hand, but something like 3,4 or 5 options). About 70% of the time I find playing around with these solves the problem. But not all touch screens have the same drivers so its not an exact science.

                        Other than that, I have 2 methods of dealing with it (for buttons anyway).
                        1) Use Chunick's method of 'onRollOver' and a lingo callback to move the cursor. Note: You really should move the cursor - I have an app without this and all buttons were in the same area - clicking the 1st button automatically clicked the next, and the next.... since the cursor was always 'Over' them!!
                        2) Use buttons in Director with a blend = 0 over the top of the flash file. Then use director to send instructions the the flash sprite. This works for simple situations, but can get a bit complex for others. eg.
                        sprite(x).goToFrame("myMarker")
                        sprite(x).tellTarget(strName)
                        sprite(x).play()

                        Hope this helps and clears a few things up. (I've not tried D11, but I assume it's the same)

                        PS. I tore my hair out when my wonderful on-screen, flash made keyboard required 2 clicks on the keys to work when embedded in Director!! Not good!! lol!

                        Tim
                        • 9. HELP!!!!!!!!!!!!  DRAG AND DROP!
                          korkster911 Level 1
                          And that's the horrible part of it Tim. Adobe doesn't seem to care? As a matter of fact, the project I just completed using Flash AND ZINC will be showcased in a national competition. On top of the center it's being installed in, I got a call from one of the other vendors of the exhibits asking how I resolved the problem because they were having the EXACT SAME ISSUE with their Director/Flash builds...

                          Director 11? Nope, it didn't solve it... I guess Team Adobe is too preoccupied adding useless features to their updates rather than fixing bugs that have been issues for some time! Like I said... I'm done with Director unless a client specifically requests it... Other than that, I'll have to put up with (wish I didn't have to) Flash and Zinc.
                          • 10. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                            DuncanJWitham
                            I've had problems with this in the past. The problem seems to be caused by the fact that the mouse click is triggering before the mouse cursor has moved to it's new location (bearing in mind that with touchscreens, you don't move the mouse to a location and then click, it's all part of one and the same action). So what actually happens is the mouse click occurs where the mouse cursor currently is, then the mouse cursor moves to where you clicked. Then you do a second click, which fires off the correct event because the mouse cursor is now in the correct spot. You can easily see this happening if you trace the mouse position on screen as well as tracing each mouse event that occurs. You'll see that the mouse position updating occurs after the mouseDown event.

                            There is quite a simple workaround to it. Just set the mouseDownScript to a script which calls updatestage(). So something like this:

                            on prepareMovie me
                            the mouseDownScript = "fixFlash"
                            end

                            on fixFlash
                            updateStage()
                            end

                            Since the mouseDownScript gets called before flash gets hold of the mouse click, it will ensure that the flash sprite is updated properly and the click fires off in the correct spot.
                            • 11. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                              _sacal_
                              Like Chunick said, this has always worked for me: "... One way to deal with this is to use onRollOver event handler for buttons in Flash instead of onPress/onRelease...
                              • 12. Re: HELP!!!!!!!!!!!!  DRAG AND DROP!
                                BSpero Level 1
                                Hey there,
                                I just want to chime in because I develop touchscreens almost exclusively. I ran into a project where I had a flash object inside of director, and the same issue was occurring. It would take two clicks to make items receive one click, and this was not acceptable. I did have to change my coding to make events happen on mouseEnter, which was not ideal, but got the job done. I have pretty much left Director completely, and this was one of the main reasons. Flash can handle moving graphics much better, and integrates video and audio very well. If I could seamlessly drop Flash in Director, I would probably still use it, but since there are so many issues, among which are a lack of AS3 support and huge performance hits, it just does not make sense. It's sad that Director has really be stagnant for almost 5 years. There was a release last year, but it really didn't do anything for me in terms of enhancements, although I am sure it did for other folks. At any rate, my solution was to just use Flash, and after that project two years ago, I've only used Director for one thing.

                                - B