Music loop fade out by button between scenes

Hi
I have a infinite music loop and I am trying to have btn_start trigger a fade out on the music along with its original gotoAndPlay.
I have two scenes, "opening" and "animation". btn_start and the following code are in the "opening" scene.
the fade out will play along with the first couple seconds of "animation" since the gotoAndPlay connects to frame 1 of "animation"
Can this be done? Please show me some lights of how to proceed this.
stop();
import flash.net.URLRequest;
import flash.media.Sound;
var url:URLRequest = new URLRequest("subtle.mp3");
var snd:Sound = new Sound(url);
snd.play(0, 17);
btn_start.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndPlay(1, "animation");
thanks!!

you can use:
stop();
import flash.net.URLRequest;
import flash.media.Sound;
var fadeRate:Number = .01;  // number between 0 and 1.  the closer to 1, the faster the fade
var url:URLRequest = new URLRequest("subtle.mp3");
var snd:Sound = new Sound(url);
var sc:SoundChannel=snd.play(0, 17);
btn_start.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
this.addEventListener(Event.ENTER_FRAME,fadesoundF);
gotoAndPlay(1, "animation");
function fadesoundF(e:Event):void{
var st:SoundTransform=sc.soundTransform;
st.volume-=fadeRate;
if(st.volume<=0){
this.removeEventListener(Event.ENTER_FRAME,fadesoundF);
sc.soundTransform=st;

Similar Messages

  • Specific region mouse over effect(Button 1 fades out and Button 2 fades in).

    Dear All -
    I am new to Flash CS5 and building Flash navigation bar with buttons on it.
    Below is my problem description that I want to solve with your help.
    I have a rectangular bar and placed one small button(Button 1) on this bar. Also, I have similar button(Button 2) with some graphics on it which is of similar size as to previous Button 1.
    Button 1 - Without graphic.
    Button 2 - With graphic on it.
    What I want is that, whenever mouse is taken over Button 1 placed on the rectangular bar, it should fade out and simultaneously Button 2 should fade in. I want only button region to be sensitive to this mouse over effect and not the complete rectangular bar.
    Kindly let me know how can I define the specific region(button region only) to be sensitive to mouse over effect in flash, and how to place Button 1 and Button 2 in layers so that both are at the same positition(so that there is no displacement of button detected).
    Thank You,
    Saurabh Khanna.

    Hello -
    Thank you for the reply. Button 1 does not have glowing effect, whereas Button 2 has a glowing effect. So what I wanted is that when initially Button 1 is loaded during page load, when I mouse over Button 1, Button 1 would fade out and Button 2 sitting behind Button 1 would automatically look like fade in(due to gradual fad out of Button 1 on top of Button 2).
    I could do this now, and would like to Thank you for your reply.
    I did this by creating movie clip on "Over" event of Button 1 and changing its Alpha property. But now what I want is how to gradually fade out, means when I remove my mouse from over button, then Button 2 should fade out gradually which will automatically make Button 1 fade in gradually.
    I could not find the "Out" event just like we have "Over" event for Button, so I assume this can only be done using ActionScript somehow.
    Let me know if I am going correct with my assumption, and possibly if you could help me achieve the remaining half(fading out gradually when mouse is removed from the button).
    Thank You once again for your reply.
    Thank You,
    Saurabh Khanna.

  • I am editing an idvd slideshow to have some of the music selections from itunes fade out at the end of each vacation segment using music reflecting the country visited.  Is there a way to fast-forward the slideshow to observe the where the music ends.

    I am editing an idvd slideshjow to have some of the music selections fade out at the end of each vacation segment.  Is there a way I can fast-forward through the slideshow so I can see where the music is ending and adjust the time to end properly?  (without repeatedly clicking the forward button on the e-remote) 

    Thanks very much, varjak paw.  I checked half a dozen tracks on my iMac from different albums which did not copy over, plus several which did copy over.  They all show the same location:
    Users/Christina/Music/iTunes/iTunes Media/Music/Brandenburg Concertos etc. (one example)
    What does this mean relative to the music which didn't copy? Is there another step?  or somewhere else I should look?
    And wow, thanks for the info about not having legal right to keep the tracks from the CDs.  I am embarrassed that I didn't know.  I gave most of my CDs to my sister. Before I delete all this highly prized music (400-500 tracks) -- if I get the CDs back from her and keep them at my house, can I continue to keep those tracks on my iMac?  (Sister does not have iTunes or even know what an mp3 is, so it's not like she has copied or imported the CDs -- I just didn't realize I needed to retain possession.)
    Or do I still need to remove all that music from my library?
    Thank you again for your help. 
    C.

  • Media Player fades out between tracks

    The Tour Media player seems to fade out the audio between tracks on a CD.  This is kind of annoying as some CD's intentially run one track into the next.  Is there a way to change this behavior?

    Sorry, i didn't see your post and I just posted the sme issue, it is really annoying, so much so that I am considering returning my Blackberry, I thrive on the MP3 use and this is not acceptable. try as i might I cannot find a Phon e Number to call RIM tech support, so thier not alowing me contact is going to lead to the loss of a sale on this phone and any future phones that I might have purchased from them.
                               Larry

  • How can I have an object toggle between fade out and fade in with button?

    Hello all,
    I have a problem and I was hoping someone out there could help me out with it.
    I have smart shape that is set to show for "rest of project" on one of my early slides.  It is not visible in output in the properties, but when a user clicks a button in the project, it should fade in and then stay visible.  If the user clicks the same button again, it should fade out and stay hidden.  So rather than toggle between show and hide, which I know how to do, I want it to toggle between fade in and fade out.  I am having trouble with this.  Setting its transition to fade in and fade out in the properties of the smart shape doesn't help...
    Here is the advanced action I have attached to the button that should allow the user to toggle between fade in and fade out.  The "if" parts works -- the object fades in and then finally "shows" at 100% the "else" part almost works.  It fades out, disappears, but then shows again, which I obviously dont want it to do.  I want it to stay hidden.
    If you can help, it would be great!! 

    I Don't
    But as a work around you could try increasing the canvas size to match the illustrator file, paste in the object then crop off the excess canvas in photoshop

  • How can I create Fade-in or Fade-out on Click of Button?

    I'm using Encore DVD 2.0. My DVD starts with a video on a timeline, and then jumps to a main menu with a motion background and music. The main menu links to a couple videos on timelines.
    I'd like to do 2 things:
    1) When the user clicks a button on the main menu to bring them to a video on a timeline, I'd like the main menu itself to fade out before jumping to the timeline. How can I make this happen in Encore? I of course can't create this fade-out in the editing of the video, since the user could possibly click the button at any point throughout the video.
    2) In transitioning from the initial timeline to the main menu, I would like the main menu to fade in. Is this possible, and if so, how can I make this happen in Encore?
    Thank you for your help.

    > I'm trying to understand what you mean. Did you mean that I can make my entire menu part of the background motion video? How would the buttons work? Is there a way to create invisible buttons in Encore?
    Sorry for the confusion - I didn't write that as clearly as I should have done.
    Right now, in Encore, you
    i cannot
    use "Buttons Over Video" as it is not in the feature set. What I was trying to say is that a feature request might get this functionality added in a later build. We can but hope, anyway.
    What I can recommend you try is using After Effects or Premiere Pro to create your Motion Menu, and set things up so that the appearance of the actual buttons is delayed to the point you want them to appear at.
    Another solution - this will give you minimal delays (should be very close to seamless on the final DVD) is this:
    1 - Intro to Main Menu.
    Create your intro to the main menu, and set this not as a timeline, but as a motion menu. Set the End Action of this to go straight to a static/still copy of the final frame from the Motion Intro.
    2 - Main Menu
    This will be a still menu, with or without Audio. If you use Audio it will need to loop though.
    3 - Outro from Main Menu to timeline.
    Fake this as follows.
    Method A.
    Create the outro to the timeline and set this as another motion menu - not a timeline - with it's end action set to automatically play the main film. The outro will presumably fade to black, so any transition will be un-noticeable.
    Method B
    Fake the outro by adding it to the start of the main timeline.
    I think Method A will be your best bet here.

  • Hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    Hey there Logic Pro21,
    It sounds like you are seeing some odd performance issues with Logic Pro X. I recommend these troubleshooting steps specifically from the following article to help troubleshoot what is happening:
    Logic Pro X: Troubleshooting basics
    http://support.apple.com/kb/HT5859
    Verify that your computer meets the system requirements for Logic Pro X
    See Logic Pro X Technical Specifications.
    Test using the computer's built-in audio hardware
    If you use external audio hardware, try setting Logic Pro X to use the built-in audio hardware on your computer. Choose Logic Pro X > Preferences > Audio from the main menu and click the Devices tab. Choose the built in audio hardware from the Input Device and Output Device pop-up menus. If the issue is resolved using built-in audio, refer to the manufacturer of your audio interface.
    Start Logic with a different project template
    Sometimes project files can become damaged, causing unexpected behavior in Logic. If you use a template, damage to the template can cause unexpected results with any project subsequently created from it. To create a completely fresh project choose File > New from Template and select Empty Project in the template selector window. Test to see if the issue is resolved in the new project.
    Sometimes, issues with the data in a project can be repaired. Open an affected project and open the Project Information window with the Project Information key command. Click Reorganize Memory to attempt to repair the project. When you reorganize memory, the current project is checked for any signs of damage, structural problems, and unused blocks. If any unused blocks are found, you will be able to remove these, and repair the project. Project memory is also reorganized automatically after saving or opening a project.
    Delete the user preferences
    You can resolve many issues by restoring Logic Pro X back to its original settings. This will not impact your media files. To reset your Logic Pro X user preference settings to their original state, do the following:
    In the Finder, choose Go to Folder from the Go menu.
    Type ~/Library/Preferences in the "Go to the folder" field.
    Press the Go button.
    Remove the com.apple.logic10.plist file from the Preferences folder. Note that if you have programmed any custom key commands, this will reset them to the defaults. You may wish to export your custom key command as a preset before performing this step. See the Logic Pro X User Manual for details on how to do this. If you are having trouble with a control surface in Logic Pro X, then you may also wish to delete the com.apple.logic.pro.cs file from the preferences folder.
    If you have upgraded from an earlier version of Logic Pro, you should also remove~/Library/Preferences/Logic/com.apple.logic.pro.
    Restart the computer.
    Isolate an issue by using another user account
    For more information see Isolating an issue by using another user account.
    Reinstall Logic Pro X
    Another approach you might consider is reinstalling Logic Pro X. To do this effectively, you need to remove the application, then reinstall Logic Pro X. You don't have to remove everything that was installed with Logic Pro X. Follow the steps below to completely reinstall a fresh copy of Logic Pro X.
    In the Finder, choose Applications from the Go menu.
    Locate the Logic Pro X application and drag it to the trash.
    Open the Mac App Store
    Click the Purchases button in the Mac App Store toolbar.
    Sign in to the Mac App Store using the Apple ID you first used to purchase Logic Pro X.
    Look for Logic Pro X in the list of purchased applications in the App Store. If you don't see Logic Pro X in the list, make sure it's not hidden. See Mac App Store: Hiding and unhiding purchases for more information.
    Click Install to download and install Logic Pro X.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Need instance of movieclip to fade out when I rollover separate button

    Movieclip I want to fade out:  "StartupText_mc"
    Within "StartupText_mc" I have a frame labels "normal" on the first frame and "over" on the last. On the actions layer I have "stop();" on the first and last frame. On the third layer I have a simple alpa tween from 100% to 0%.
    Now, Back to the main scene where the button "ProductMarketingIcon2_mc" and "StartupText_mc" exist next to each other. Here is the code I have for the button:
    ProductMarketingIcon2_mc.onRollOver = function() {
    ProductMarketingIcon2_mc.gotoAndPlay("normal");
    StartupText_mc.gotoAndPlay;
    ProductMarketingIcon2_mc.onRollOut = function() {
    ProductMarketingIcon2_mc.gotoAndStop("normal");
    StartupText_mc.gotoAndStop("normal");
    ProductMarketingIcon2_mc.onPress = function() {
    getURL("http://.........");
    ProductMarketingIcon2_mc.gotoAndPlay("over");
    Anyone know how to make   "StartupText_mc" fade out when "ProductMarketingIcon2_mc" is rolled over and simultaneuosly riggers it own tween?
    Once agin, thanks for anyone who reads this.

    You aren't telling the StartupText_mc to go anywhere in what you show...
    ProductMarketingIcon2_mc.onRollOver = function() {
    ProductMarketingIcon2_mc.gotoAndPlay("normal");
    StartupText_mc.gotoAndPlay; ???

  • How to fade out button as menu fades?

    I've searched the forums and manual to no avail.
    I created a menu that fades to black before jumping to the loop point. Is it possible to fade out the highlighted button as my menu fades to black and jumps to the loop point? Otherwise, the button remains highlighted on screen as the menu fades to black.
    I understand how to fade in a button by using Final Cut or Motion and an overlay file, but this of course wouldn't work when fading out a button since the button remains on screen while the video "button" fades out.
    Thanks in advance for any advice.

    If you add a transition from the menu to the track, such as a dissolve, it should not carry over the highlights - not sure if the button itself is on the highlights. But lets say you have an arrow next to the text that highlights that should not be seen in the transition portion, but it will be abrupt. Also if there is motion after the loop point you will not know when the button is pressed, if it is effectively a still then the fades are smoother.

  • How to fade in and fade out buttons ???

    Hi guys I am building a website and I need help to fade in/ fade out buttons. Here is an example :
    My main goal is that when I roll over the services button, I want the submenu (corporate and weddings) to fade in. Then when I roll over the portfolio button, I want the first submenu (corporate and weddings) to fade out and the second submenu ( clients, corporate, weddings, etc..) to fade in and to stay like this. Finally when I roll over testimonials, the second submenu fades out. And so on for the rest of the buttons.
    FYI, i know how to animate the buttons to fade in/out but i dont know how to make them fade out when i roll over the other buttons.. I know this can be done with action script but I have no clue how...
    I have attached my fla and swf.
    http://www.habouryentertainment.com/files/site09_help.fla
    http://www.habouryentertainment.com/files/site09.flw
    Your help would be greatly appreciated !!!
    Thanks

    Some things you just have to take the time to unravel and learn.  It's not difficult/complex, you just have to avoid letting the code overwhelm you by its appearance... instead of looking at pages, look at one page at a time, line by line... take your time and follow a tutorial.
    People make tutorials to help those that need to learn, so there's no reason for anyone here to reinvent those wheels for every person that comes along.  If you are looking for someone who'll hand you your solved design, sorry, I'm not that guy.

  • I am having trouble with the handle bars for music fade in and fade out.  It doesn't work.  I also cannot see wave forms for music.   Cannot select - it is grey.  On a deadline and really having problems.

    I am trying to finish a video and I want to fade the music in and out.  I have read every tutorial I can get and the help info in iMovie.  Nothing helsp.   I cannot get it to fade by just sliding the handle bars.   Other times, the music mutes completely when I try to add a fade.   I try to view wave forms for music and it does not allow me to select .   it remains grey.   I am getting frustrated.  I had no problem with 11 version.   I now have 10.0.2 version.   Can anyone help?   my computer is latest Mac Book Pro 2013

    This is described in:
    http://help.apple.com/imovie/mac/10.0/#mov3b5ded23e
    A tip though - if you have a transition at the start or end of a clip it often obscures the fade handle.  Trick is to temporarly move the transition (or delete it), move the fade handle then replace the transition.
    Geoff.

  • Fade in and Fade out components from 3d modell onClick self-made buttons

    Hi,
    in Acrobat Pro you can place your own 3D-model into the pdf. Than you can fade in and fade out components of your 3d-model on a acrobat-menü (see images) in the pdf-reader. Now I want to build a pdf with this functionality, but the tricky thing is, that I want to fade in and out the components from the 3d-model not on the menu, but on self-made buttons.
    But how to say the buttons, that they should fade in or fade out a component from the 3d model, like it the menu from acrobat does?
    Thank you for reply.
    Maybe this images will help you to understand my question:

    Thank you very much for your answer. But I think what you mean, is to make a full object visible=false. But what I want to make is to fade out a subordinate level.
    So for example this is my hierarchy:
    layer one
    -sub-layer one
    -sub-layer two
       *sub-sub-layer one
    layer two
    -sub-layer one
    And now I want to fade out the sub-sub-layer one. What is the code for that?
    Thank you very much again!

  • Trouble with music fade out

    I just finished a photo slide show in iMovie and have used iTunes music from a CD. The problem is that my slide show is shorter than the music and I want to do a "fade out" with the music. I've done this before with music within the iMovie program where I select "show clip volume levels" from "View"; however, I can't get this to work with this piece of music. Those levels just don't show for me to do the fade out!
    Any ideas on what I can do or am doing wrong?
    Thank you!

    Hi Scottis!
    In the timeline, click on the audio clip and use the usual volume adjustment, i.e. pull down the end of the 'volume line' until it slopes downwards.

  • Fade out music longer than two seconds.... Possible?

    I want to fade out my music that I have in my video longer than two seconds. Yet, when manually setting it, the maximum is only two seconds. Am I missing anything, or is the max only two seconds? Thanks.

    I want to fade out my music that I have in my video longer than two seconds. Yet, when manually setting it, the maximum is only two seconds. Am I missing anything, or is the max only two seconds?... Does anyone know if this is possible?It is not possible from within iMovie '08. Use the GarageBand "rubber band" controls for complete continuous control over both the contour and duration of you fades.

  • Fade in Fade out music

    seriously guys
    how in the world do we do fade in and fade out music on the new imovie ?
    its so complicated

    Paul-z wrote:
    But if you want to make a 30 second movie, and your music is 4:45 this doesn't apply. iMovie used to fade it out for you to go with your clip length.
    iMovie 10 does have a setting that automatically trims the background music so that the music ends when the video clips end. See this iMovie 10 Help topic -
    Customize movie settings -
    http://help.apple.com/imovie/mac/10.0/#mov4e66c1a8b
    Particularly see the last dot point in paragraph 3, which reads:
    To automatically trim background music to fit the length of your movie: Select the “Trim background music” checkbox.
    John

Maybe you are looking for

  • You cannot create an Apple ID using a MobileMe account. If this is your email address, it is also your Apple ID

    I am dumping my Android and getting an IPhone to go along with my IPad, primarily because of the ICloud and the ease of synching all my mail, contacts etc. My original Apple ID was my gmail address. I now have the @me.com address when I put IOS 5 on

  • Upgraded MDD G4 and Aperture Compatibility

    I just upgraded my dual processor 1.25 gig MDD Power Mac to accomodate Aperture. I replaced my graphics card with an ATI Radeon 9800 Pro. I figured since Apple lists the G4 Powerbook 1.25 gig processor as a minimum spec, I would be fine with a dual p

  • Mac compatibility with 'Novell Groupwise' PC network

    Hi all I'm currently working on a PC, but my company is 'looking into' buying me and my colleague Macs (We're the Graphic Designers for a large organisation). I've worked on Macs for 15+ years. However, the company uses 'Novell Groupwise' for all its

  • Business Connector Limitations

    Hi, My client wants to use business connector for mutual transfer of the EDI Documents with their customers. For some reason, they dont want to go with XI. Just wanted to know if there are any limitations with SAP Business Connector? Would it be able

  • Iphone 3g will NOT connect to itunes

    My iphone 3G will not connect with itunes. I see the device as a USB drive e and g and I see the music and files on the phone OK in windows explorer. The phone shows up in the USB devices as MEDIATEC FLASH DRIVE two times. The icons on the phone also