Discussion:
HELP!!!!!!!!!!!! DRAG AND DROP!
(too old to reply)
korkster911
2009-02-23 22:39:03 UTC
Permalink
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!!!!!
korkster911
2009-02-24 14:59:04 UTC
Permalink
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_Vid
eo_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>
Chunick
2009-02-24 19:15:03 UTC
Permalink
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:
[Q]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.)
[/Q]

... and this aggregated post:
[Q]
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.
[/Q]
korkster911
2009-02-24 19:47:46 UTC
Permalink
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.
korkster911
2009-02-24 19:55:47 UTC
Permalink
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 may help me quite a bit??? I'll need to check this one out as I am
using buttons rather than MC's... Worth a shot at any rate!
korkster911
2009-02-24 22:16:27 UTC
Permalink
[q][i]Originally posted by: [b][b]korkster911[/b][/b][/i]
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.[/q]

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.
Chunick
2009-02-25 19:46:51 UTC
Permalink
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.
korkster911
2009-02-27 12:18:14 UTC
Permalink
<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...
TimDixon
2009-03-16 16:33:04 UTC
Permalink
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
korkster911
2009-03-19 01:13:46 UTC
Permalink
And that's the horrible part of it Tom. 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.
DuncanJWitham
2009-03-19 14:41:22 UTC
Permalink
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.
_sacal_
2009-03-20 19:15:37 UTC
Permalink
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...
BSpero
2009-03-23 14:35:53 UTC
Permalink
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

Loading...