Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Flash and Touch Screen?

I developed a simple game in Flash (hand/eye coordination for disabled kids) that can be played on a touch screen, however I am experiencing one problem. Everything works...the use can touch the object and drop it just like you would if you were using a mouse to click on it to select it. However, I had programed an area where the object cant pass. If the object the have picked up passed the area...I want it to go to a different frame to play something else. I made that are a button and have this code:

on (rollOut) {

play();

}

however, it doesnt work. But when I use a mouse to pick up the object and pass it through that area...it goes to the frame I want it to. But when I am using my finger on touch screen...it doesnt go....

what can I do? help anyone? thanks

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    Glad you are making something cool for disabled kids.

    There is something wrong with your logic on how you are using the on(rollOut) event.

    I'm not exactly sure how you built this thing...but here are some ideas to try.

    Instead of having an on(rollOut) event try checking with code if the dragged object went past a certain point.

    Like this:

    if( draggedItem._x - (draggedItem._width/2) >= area._x )

    {

    // then do your action to go to a different mode or area

    }

    Just wrap this code inside an onEnterframe function so it is checked regularly.

    What the code does is say if the middle of your draggable item touches the left edge _x of your area....run that code.

    I really help this helps...there's really no way for me to truly answer your problem without more knowledge.

    Good luck!

Still have questions? Get your answers by asking now.