A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Music in presentantion

  1. #1
    Junior Member
    Join Date
    May 2005

    Music in presentantion

    I have a small question

    Can someone write me an action srcipt - when I'll press the button the music will be played, but NOT BE SHUTDOWN when I'll change movies (scenes)?

  2. #2
    Senior Member
    Join Date
    Jan 2003
    3DFA does not use script for this. Well, actually it can but it is not always necessary to do so since there are play sound and stop sound actions you can manually add to your predefined elements. Therefore the question should be whether you are programming according to a scripted event or a predefined event (that is, an event you set up using the Add event functionality such as for button clicks) before you decide how and when you want your sound play action to execute.

    What that means is that if you have a button you want to play a sound when clicked, or a predefined collision of two objects (that is, a collision of objects you choreograph as part of a looping, static-event animation with no differences between each playback) this is most often done with predefined events so a play/stop action for your sound would be more appropriate here; whereas it would be better to use scripting to play the sound if you the collision happens at random AND is initiated by script (such as in a game, for which you can probably find examples in the Asteroids and Crusader demonstrations within 3DFA, and potentially the Pac Man clone as well, which are all located under the Samples menu of 3DFA).

    In your case, adding an event (or because you're going to use a button, in the button's mouse up event which is predefined and found on the Mouse Up tab in the button properties sheet) with a play sound action is sufficient, or you could add the play sound action as an event to the scene itself.

    Does that help? Oh yeah, and to answer your other question - looping sounds is pretty easy. To loop a sound, just check the box next to the word Loop in the sound's property sheet after importing.
    Last edited by JSDvs9172; 05-26-2005 at 09:12 AM.
    Jeffrey Davis (3DFA user since 2.x... or was it 3.x?) (Yes, I finally reveal the offline identity of JSDvs9172, being myself of course. Oh, and sorry for stealing your signature idea, blanius, which I see you stopped using.)

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