A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: URGENT HELP NEEDED- drop tragets

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    10

    URGENT HELP NEEDED- drop tragets

    Hey guys!

    Really need help on this one!

    I desperately need to know what to add to this code to make a sound play when i drop the MC onto its target:

    on (press) {
    startDrag ("", true);
    }
    on (release) {
    stopDrag ();
    if (this.hitTest(_root.large)) {
    setProperty (_root.s2, _visible, false);
    }
    }

    FLASH FILE ATTACHED ALSO!!

    Thanks

    Dominic
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Jan 2005
    Posts
    10

    URGENT HELP NEEDED- drop tragets

    Hey guys!

    Really need help on this one (FLASH 5)

    I desperately need to know what to add to this code to make a sound play when i drop the MC onto its target:

    on (press) {
    startDrag ("", true);
    }
    on (release) {
    stopDrag ();
    if (this.hitTest(_root.large)) {
    setProperty (_root.s2, _visible, false);
    }
    }

    FLASH FILE ATTACHED ALSO!!

    Thanks

    Dominic
    Attached Files Attached Files

  3. #3
    Senior Member vladdddd's Avatar
    Join Date
    Aug 2004
    Location
    in space
    Posts
    352
    u can use

    on(release){attachSound("btnsound");}

    btnsound should be the linkage name - u can set it in the library, wright click the sound, check the first line and in the upper box write the linkage name

    this works for flash mx i`m not sure if its flas 5 friendly

    or u can create a small mc that contains a timeline with the snd and use

    on(release){sndmc.gotoAndPlay(1);}

  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    As you're publishing for FP5, I'll suppose you're still using Flash 5.

    As I don't remember, I looked at the Sound Class and it seems that it was available in Flash 5 already, so, you can use it.

    Another solution is attaching the sound to a movie clip's timeline (frame 2).
    That movie clip is stopped, and when you want to trigger the sound: _root.some_mc.play().

  5. #5
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    I have merged these two threads.

    Frets

    Supermoderator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center