1 Replies - 933 Views - Last Post: 21 March 2007 - 01:09 PM

#1 pip_r  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-March 07

Dragging around screen to play sound

Posted 20 March 2007 - 04:22 AM

Hi
I'm pretty new to Flash, and am trying to create a music player. I want the user to play sounds either by clicking randomly around the screen, or by dragging around the screen.

I tried using several horizontal buttons position next to each other, with a sound attached to each one. If I click on a button, the sound plays. However, if I drag over to the next button, the program still thinks I'm on the first button and doesn't activate the sound on the next button.

I tried changing the button to "track as menu item", but all that does is stop the sound playing as I drag out of the button. The next button still wont play unless I release and then click again.

I'm wondering if there may be a better way to do this, not using buttons. But I still need to click and drag around the screen and have various sounds play.

Would appreciate some guidance.
Pip

Is This A Good Question/Topic? 0
  • +

Replies To: Dragging around screen to play sound

#2 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Dragging around screen to play sound

Posted 21 March 2007 - 01:09 PM

If I were to attempt this, I would attach some Listeners to the Mouse object. I would then use conditional statements to determine if/which sound should be played. I'm working right now though, so unfortunately do have time to explain all of that. However, I do have a link for you:

Listeners and ASBroadcaster

Give it a shot, and let us know if there's anything that's got you stumped.

-[di]
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1