MovieClip: Fade Out then Fade In

I need to produce an image gallery which when a thumbnail is pressed it loads a new image, fades out the previous image then fades in the new one.
I have it fading in but I don't know how to fade the previous image out before.
Here is my code so far:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var imageLoader:MovieClipLoader = new MovieClipLoader() ;
var imageListener:Object = new Object () ;
imageLoader.addListener(imageListener);
imageListener.onLoadInit = function() {
       var fadeIn:Tween = new Tween(holderMain.holderImage, "_alpha", Regular.easeIn, 0, 100, 60, false);
holderMain.holderButton.button1.onRelease = function() {
       imageLoader.loadClip("one.jpg",holderMain.holderImage);
holderMain.holderButton.button2.onRelease = function() {
       imageLoader.loadClip("two.swf",holderMain.holderImage);
Does someone understand how to do this? 

How do I set it up so that it loads - then fades out - then fades in?

Similar Messages

  • Simultaneous fade out and fade in and image

    I currently have code that fades out on canvas of a view
    stack and fades in a second canvas of the view stack. However, my
    desired behavior is that the fade out happens as the fade in
    happens so it would simulate a tween effect like when making
    animated gif's. Is there a way to do this, and if so does anyone
    have any sample code to do this?

    so the fade out and fade in are working like you said,
    however I want then to be in the same position on the page. I would
    like each canvas to be at coordinates (0,0). Here is my code, but
    the canvas' are stacked vertically? Is what I want to do possible?
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp();">
    <mx:Style>
    Application {
    backgroundColor: #ffffff;
    backgroundGradientColors: #ffffff, #ffffff;
    </mx:Style>
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    [Bindable] private var homePageImageId:int = 0;
    [Bindable] public var intervalId:uint;
    [Embed(source="images/3_1813714899.jpg")]
    [Bindable] public var imgClass3:Class;
    [Embed(source="images/5_2065488856.jpg")]
    [Bindable] public var imgClass5:Class;
    [Embed(source="images/6_717433985.jpg")]
    [Bindable] public var imgClass6:Class;
    [Embed(source="images/9_263548684.jpg")]
    [Bindable] public var imgClass9:Class;
    function initApp():void {
    checkDelayCounter();
    intervalId = setInterval(checkDelayCounter,4000);
    function checkDelayCounter():void {
    if ( homePageImageId == 0 ) {
    canvas0.visible = false;
    canvas1.visible = true;
    homePageImageId = 1;
    } else if ( homePageImageId == 1 ) {
    canvas1.visible = false;
    canvas2.visible = true;
    homePageImageId = 2;
    } else if ( homePageImageId == 2 ) {
    canvas2.visible = false;
    canvas0.visible = true;
    homePageImageId = 0;
    ]]>
    </mx:Script>
    <mx:Fade id="fade_in" duration="750" alphaFrom="0"
    alphaTo="1"/>
    <mx:Fade id="fade_out" duration="750" alphaFrom="1"
    alphaTo="0"/>
    <mx:Canvas id="canvas0" showEffect="fade_in"
    hideEffect="fade_out" visible="true" alpha="0" x="0" y="0">
    <mx:Image id="homePageImage6" source="{imgClass6}"
    width="990" height="400" x="0" y="0"/>
    </mx:Canvas>
    <mx:Canvas id="canvas1" showEffect="fade_in"
    hideEffect="fade_out" visible="false" alpha="0" x="0" y="0">
    <mx:Image id="homePageImage3" source="{imgClass3}"
    width="990" height="400" x="0" y="0"/>
    </mx:Canvas>
    <mx:Canvas id="canvas2" showEffect="fade_in"
    hideEffect="fade_out" visible="false" alpha="0" x="0" y="0">
    <mx:Image id="homePageImage5" source="{imgClass5}"
    width="990" height="400" x="0" y="0"/>
    </mx:Canvas>
    </mx:Application>

  • 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

  • Fade out without fade in??

    hi, i need to make fade-outs, without having a fade-in. but i can't find any option for that; a fade-out seems to be connected automatically to a fade-in. Can anyone help me out on this?

    technically spoken, iMovie has no fade-out.
    dissolve, or transition thru black ...
    The work-around Bengt recommends is the only way to fade to black AND starting the next scene without a fade-in.
    But ………
    due to iM's inherent rule
    "a transitions length is max half length of shortest clip involved"
    this workaround adds some 'black' to that fade-out!
    if the fade is 2sec, before the next clip there are 2sec of black - no 'fade-out, cut' ....
    when you shorten the black, the fade gets shorten too....

  • How do I fade out audio in Premiere Elements 13?

    HOW DO I FADE OUT AUDIO IN PREMIERE ELEMENTS 13?

    ATR
    Thanks for answering,
    im moving slowely forward in speeding up making presentations by using the new discovered smart tricks or functions.
    So you understand my level of expertise:
    This step by step production methode im using now give's me controle without the (full) knowledge of all the (smart)functions in this program.and slowely learning the way arround.
    starting a project:  a mix of photo's and avi's, starting with manual time line filling with the selected files then the timesaving "Standard crosover on all selected".
    second: placing a header with the titel at the front and a ending a the end. (cut al the wrong or bad pieces and extend some photo viewingtime if needed.)
    And then adding subtitels/tekst and use some other crosovers to highlight the change of subject or stills to movie.
    And at last: placing the background music on "soundtrack": after some fiddeling around ive choose to cut the musictrack between the avi's instead of let the music play all the time and adjust the volume down to zero when a avi is playing.
    this have two advantages:
    1)  the songs can be streched by  by cut and jumping to the end of the avi soundtrack. (no loss of music through fading out and still let it play so need less musicsongs.)
    2) And the rightclick fade function with the standaard fadingtime => "fade out" and "fade in" is easly to use because of the end track avi and begin track music timeline. (And if needed lowering the fading slope/ extend the fading time by moving the "points" on the audio line)
    But; its a lot of work and after the first run through the presentation(or watching on TV) and there is a adjustment needed (fadingtime, volume-changes) you have to adjust every bit of the soundtrack. (keeping the volume "feeling" the same is the  difficult part.)
    I will read about the Smart Mix function and test  it on a other project. see of its fits my kind of using and expertise. (every automatic (smart) function needs understanding of its purpes and limitations and there are a lot of them in premiere
    What is in your opinion the most effective way of adjusting volume of audio parts across the hole project so its merged in to one audio/soundlevel?
    (and offcourse in the hole way of building the presentation.)

  • Can i create a new function (Fade out, Amplify down, Fade In)

    Hi,
    I am using Adobe Audition version 3.0
    Is it possible to define a new function, so that i can select a short piece of the audio file within Edit View, so that the first 5 miliseconds (of the selected piece of audio) will be applied a Fade Out, and the last 5 miliseconds will be applied a Fade In, and in-between will be Amplified by -12dB.
    I have to do this hundreds of times within a 1 hour recording of speech which has many short pauses, in order to remove small external noises between the words.
    I normally select (one by one) the space/pause between the words and amplify this by -12 dB.  Then i select the preceeding 5 miliseconds and apply a Fade Out.  And the 5 miliseconds after the pause a Fade In.
    I have only discovered today how to create short-cuts, so at least i have a short cut for the Amplify, Fade Out and Fade In.
    But it would be great, if i could somehow define a function as i described above, to do all 3 steps within the one function.
    Any help or tips appreciated.
    Dave

    [email protected] wrote:
    Hi,
    I am using Adobe Audition version 3.0
    Is it possible to define a new function, so that i can select a short piece of the audio file within Edit View, so that the first 5 miliseconds (of the selected piece of audio) will be applied a Fade Out, and the last 5 miliseconds will be applied a Fade In, and in-between will be Amplified by -12dB.
    I have to do this hundreds of times within a 1 hour recording of speech which has many short pauses, in order to remove small external noises between the words.
    I normally select (one by one) the space/pause between the words and amplify this by -12 dB.  Then i select the preceeding 5 miliseconds and apply a Fade Out.  And the 5 miliseconds after the pause a Fade In.
    I have only discovered today how to create short-cuts, so at least i have a short cut for the Amplify, Fade Out and Fade In.
    But it would be great, if i could somehow define a function as i described above, to do all 3 steps within the one function.
    Any help or tips appreciated.
    Dave
    You might be able to - but this is going to require quite a complex script that would need some serious editing by hand, and even then I'm not absolutely sure that it would work. The previous problem with this sort of script was that due to an 'anomaly' in the program, the - (minus) sign wouldn't work in a script, but I think that with the 3.0.1 patch, it does again. And even with this working, it's going to require some experimentation. Initially you need to refer to ryclark's method of entering absolute values which you will find here, and then you have to find a way to realise the whole operation a step at a time. You'd have to handle the fade out and the fade in separately, but where I think you might come considerably unstuck is trying to fade to -12dB for the middle section - that's probably the bit that would perhaps require slightly more than might actually be possible. I'd be quite happy to be proved wrong about that though!
    I'm afraid that there's no documentation at all for the scripting language - this is something that Adobe, and Syntrillium before them, have never quite managed to provide, despite promising me some a while back. The good news though is that if you can make this work, then it's relatively straightforward to assign a shortcut key to it. But I should warn you now that this would be one hell of a script...

  • Is it possible to burn a playlist to a CD with fade-outs & fade-ins?

    I can burn a playlist to a CD with start time and end time edits and I can regulate the number of seonds between tracks. But when I try to burn a CD that has been set to cross fade, the burn process ignores the fade out and fade in and just burns the songs at regular volume from start to finish. I unselected the automatic sound check feature, but that didn't solve the problem.

    jhcm4202 wrote:
    I can burn a playlist to a CD with start time and end time edits and I can regulate the number of seonds between tracks. But when I try to burn a CD that has been set to cross fade, the burn process ignores the fade out and fade in and just burns the songs at regular volume from start to finish. I unselected the automatic sound check feature, but that didn't solve the problem.
    The Crossfade effect only applies to playback in iTunes. It does not carry over to audio CDs burned using iTunes nor iPod transfers.
    My guess is you will need to doctor the individual audio files first with a third-party utility before burning these new tracks to a CD.
    Steve

  • Face time fades out and then tries to reconnect on new ipad retina display on WiFi.  Iphone 4s has no problem with face time from exact same location and same contact.  WiFi signal strong on both devices.  What gives?

    Face time fades out and then retries to connect (new Ipad Retina Display) on WiFi. Iphone 4s has no problem with face time from same location and same contact.  What gives?

    rdallas001 wrote:
    Is the router to small?
    Not necessarily, if you are using Facetime all the data goes through your WiFi router, your cable/DSL modem, your ISP and the internet to Apple's Facetime servers and then, in reverse, down to the Facetime recipient. If your ISP connection is too slow or there is excessive traffic on the internet you can have Facetime problems.
    Most WiFi routers can handle this unless others in the house are also using WiFi at the same time. The problem may be your ISP connection or congestion on the internet, etc.

  • Is there a fade-out option in the new version of garageband? if so then how do you use it?

    is there a fade-out option in the newest version of garageband? if so then how do you use it?

    You are correct, although I didn't realize it was an add-on since it came in the standard download. Either way, the status shows "SmartPrintButton 1.0 (disabled)" with a warning sign that says "SmartPrintButton is incompatible with Firefox 28.0"
    Is this a recommended replacement for this Add-on? Or is the easiest fix for this issue to go back to an older version of Firefox?

  • 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; ???

  • My screen is blacked out, it will pop back in for a few then fade back out

    my screen is blacked out, it will pop back in for a few then fade back out; does this happen to anyone else?

    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    No data is lost due to a reset.

  • Iphone will not turn on! Shows Apple logo then fades out?

    I have an iphone 3g used, jailbroken. Worked fine till last night, left it in car, woke up this morning and was off. I plug it into car charger and now apple logo went on, then fades out and nothing adter 30 seconds. I went to store and guy said to reboot in itunes. I plug it into my computer and NOTHING! wont detect it or even give the apple screen. I plug it into my car charger, hold home and power button and I get the plug into itunes screen. As soon as i unplug it to connect to laptop itunes, the phone shuts off. Help! My business is on this phone. When it is plugged into i tunes, i just get a faint black screen. I only get apple logo when plugged into car charger.

    Try to force it into recovery mode. Disconnect it from the USB cord. Press and hold the home button while plugging in the computer's USB cord. Continue holding the Home button while iPhone starts up. While starting up, you will see the Apple logo. When you see "Connect to iTunes" on the screen, you can release the Home button and iTunes will display the recovery mode message. http://support.apple.com/kb/HT1808
    Then you can restore your phone: http://support.apple.com/kb/HT1414

  • 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

  • The volume on the second half of my Quicktime slideshow fades out--and I don't want it to do that!

    I used FotoMagico 4.0 to make a slideshow. There are options for exporting, and I chose the one called Custom, which makes a Quicktime movie. For some reason the volume in the second half of the show starts to fade out, and by the end I can barely hear anything. If I export to their Standalone Player, which allows the slideshow to play on a Mac computer, everything works just fine. I'm at my wits end trying to figure out how to fix this. I want to be able to export the slideshow to Vimeo so that people on Macs and Pc's can both watch it, but I can't do it with the volume the way it is.

    Go to System Preferences. Then under the General tab, there is a tick box saying "Restore windows when quitting and re-opening apps." Un tick that box. Once you start and quit Safari again, it will go back to your home page.

  • I have adobe Premiere Elements 13. It will not let me delete audio or have it fade in or out. I can move the yellow line all the way down till the volume reads -0.0, but the sound is still there on playback. I can click on fade in and fade out and the yel

    I have adobe Premiere Elements 13. It will not let me delete audio or have it fade in or out. I can move the yellow line all the way down till the volume reads -0.0, but the sound is still there on playback. I can click on fade in and fade out and the yellow line that graphs volume takes a sharp raise or dip at the beginning or end of the clip, but there is no change in volume when I play back. What am I doing wrong?

    rickeyt
    Thanks for the reply. Great news about the volume adjusts.
    Now about those fades for the volume. How are you doing that?
    1. Right click the Timeline video audio and select Fade and then
    see the Fade options (I had a video with audio file, so I saw the choices as shown in the screenshot)
    2. You can also create two volume keyframes at each end of the Timeline audio clip rubberband (orange line that goes horizontally across the middle of the audio clip). At the position of the Timeline Indicator, click the Add/Remove Keyframe icon, and then with the mouse cursor position the white dots (volume keyframes) to achieve the Fade In and Fade Out audio. In the screenshot below I have moved the Timeline Indicator so that you could better see the white dots (volume keyframes).
    Please let us know if any of the above works for you with regard to the audio fades.
    Thank you.
    ATR

Maybe you are looking for