A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Mouse rollover and rollout sound events..

Hybrid View

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    15

    Mouse rollover and rollout sound events..

    I'm trying to add sound to a flash banner. I want the sound to play and loop a sound when a mouse is over the banner and to stop once a mouse leaves the banner. I've tried to find the correct way to do this but haven't found any luck on the boards or in the tutorials. Any help that can be given would be greatly appreciated.

    Thanks

  2. #2
    Junior Member
    Join Date
    Dec 2002
    Posts
    1
    I have been trying to find the same answer. Somebody, pleeeeasse help out.

  3. #3
    Dsylexic metroid's Avatar
    Join Date
    Dec 2002
    Location
    ..
    Posts
    163
    Originally posted by JeanetteM
    I have been trying to find the same answer. Somebody, pleeeeasse help out.
    same here, if you could direct us to a tutorial too
    Got a problem with my footer?

  4. #4
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    I would suggest the timeline approach for sound interaction for cases where you may need backward compatibility for Flash 4.

    create a simple mc with:
    • stop action in frame 1
    • sound in frame 2 set to event sync
    • sound set to loop 999 times
    • stop action in frame 3
    • same sound in frame 4 set to stop sync


    use tellTarget("target path to mc containing sound") and gotoAndPlay() to both stop and start sounds.

    ex.
    Code:
    //on button
    on(rollOver){
        tellTarget("/soundmc"){
             gotoAndPlay(2); // start sound
        }
    }
    
    //on button
    on(rollOver){
        tellTarget("/soundmc"){
             gotoAndPlay(4); // stop sound
        }
    }
    Read the Timeline Approach tutorial at sonify.org for more details

    http://sonify.org/cgi-bin/tutoriallinks/jump.cgi?ID=113

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