Advanced Button with Movie Clip and Fading

Problem: I'm trying to create a bottun that when you roll
over it it plays a movie clip and also fades in and out on roll
out. It is similiar to the three main navigating buttons on the
following site.
http://www.fjcruiser.ca/
the buttons with the compasses that appear are the ones I am
talking about.
I already know how to make buttons, I just can't figure out
the actionscripting to load the movie and also fade in and fade out
according to roll over and roll out.
Please help. Thank everyone.

Amazingly, I actually know exactly how to do this. And it
only requires about 4 lines of code in the _root layer and on the
button.
Instead of having the rollover load an external movie, you
want the have the rollover execute an on(enterFrame) function that
tells each newly entered frame of your movie to check to make sure
the mouse is still on the button, and if not, send the movie
playhead backwards.
So, put that sampleMovie right on the stage with the button.
Then write the code in the _root so that says: as long as the mouse
is over the button, the movie will advance to nextFrame(). When it
gets to the next frame, again the code checks to see if the mouse
is on the button, if so, the movie is instruct to go one more next
frame (which is tweening the fade, right?) again, over and over
until the stop() at the last frame. But, if while while entering a
frame, the code finds that the mouse is no longer over the button,
it does the same thing but this time instructs prevFrame(), and so
on, going prevFrame (backwards, in other words) as long as the
mouse is not on the button.
The result of the above is a gradual fade in and out,
depending on whether the mouse is hovering. This, as opposed to an
abrupt disappearing graphic on(rollOut).
Click the below link for the .fla that demonstrates this
technique (which, by the way, I learned from Joshua Davis'
excellent book, "flash to the core". Check it out at Amazon, or
wherever. Lots of cool tricks).
click here for
fade_Movie example

Similar Messages

  • Difficulties with movie clips and frames

    This is really irking me.
    I am extremely new to Flash so please bear with me. I am assuming that this is a simple, easy to fix problem that I am having. I have Adobe Flash Professional CS5.5.
    What I am trying to do is display a sequence of images after other movie clips stop playing.
    The image sequence itself does what it is supposed to and works properly, and the other movie clips also are successful. However, whenever I try to put the movie clips for the images in frames or keyframes, the beginning movie clips only play part of the way before the images show up. This happens even though the images' movie clips are on frames/keyframes (I've tried both) after the other movie clips.
    The movie clips that are supposed to play first are each on a separate layer and there are two of them.
    The first layer is called "tree" and the second is called "text"
    The tree layer has a 45-frame gif animation that I have turned into a movie clip. I have created a motion tween and changed its alpha so that the gif has a fading in and out effect. I also have it so that it stops replaying once it reaches the last frame. I am using stop(); for this.
    The text layer has a 40-frame gif animation that I have also turned into a gif. This gif is also a movie clip and also has motion tween. Its alpha has also been changed.
    Both tree and text play together successfully and how I want them to.
    The sequence of images is three separate images, each a different layer, that fade into eachother. These images are pngs, therefore they aren't gifs nor do they have their own frames.
    The bottom layer is called floor1 and has frames 1 through 50 of motion tween and alpha adjustments fading the png image. The image is a movie clip.
    The layer on top is called floor2 and has frames 51-100 of a different png image fading.
    The very top layer is called floor3 and has frames 101-150 of yet another png fading.
    The images are successful in doing what they are supposed to.
    Layers tree and text are one fla file, and layers floor1, floor2, and floor3 are a separate fla file.
    When I copy the frames from layers floor1, floor2, and floor3 into a keyframe after layers text and tree, they transfer properly, but when I test the animation, the image sequence shows up a lot sooner than it is supposed to, interrupting the movie clips on the layers text and tree. I have tried moving the floor# layers' keyframes farther down the timeline, but then the other movie clips just stop.
    In the fla file with layers text and tree, I've imported the gifs into the library and then put them onto the stage.
    In the fla file with the floor# layers, I've imported the pngs into the stage.
    Here's what the text and tree layers look like:
    Here's what the floor# layers look like:
    The rest of the frames for the floor#s...
    So, I thought that the problem was that I needed to delay the image squence. I looked around and found no code or anything for that..
    Afterwards, I thought that it was because I had imported the tree and text gifs to the library before putting them on the stage.
    I opened a new fla and imported the "tree" gif straight to the stage.
    I figured that this should work because then it would show each of the individual frames in the movie clips, which it doesn't do in the above pictures. By importing the gif like this, it does show the individual frames. I've tested this with the image sequence and it works fine. But I have a problem with this method too..
    I select all of the frames for the gif to convert into a symbol, so I can add a motion tween and mess with the alpha. However, only the last frame is converted into a movie clip. Well actually no... Only the circled frames below are turned into the movie clip. Even when all of the frames are selected.  This isn't very helpful because then I can't change the alpha for the entire gif nor can I create a motion tween without getting a message saying that the motion tween could not be applied to all of the frames.
    Here's what this version of "tree" looks like.
    And the frames continue like so until 135.
    The frames that are turned into the movie clip are circled below.
    If I can solve the issue that I'm having with the tree shown in the two pictures above this sentence, then I can display the movie clips and image sequence without a problem. It wouldn't be quite how I had intended it to be, but it would be successful and would still work.
    If I can fix the problem with the image sequence showing up to early, and of the tree and text movie clips being cut off, then this project would also be successful and it would be how I had wanted it to be.
    If you need clarification, let me know and I'll explain something better.
    I am not willing to provide a download link in this forum for my fla files, but I can email them to you if you would like a look. I just don't want someone to be able to find them and take them by doing a google search.
    I have uploaded two swfs though.
    The first is of the tree and text layers/movie clips working as they are supposed to. The second is of the image sequence (floor1, floor2, floor3) doing what it is supposed to.
    Text and tree: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg1.swf
    Floor1, floor2, floor3: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg2.swf
    Notice how at the end of the text and tree swf, when the text stops the thing in the background keeps flashing. If that can keep flashing WHILE the images appear, then that would be great.
    TL;DR: I want the floor# flash to show up after the text and tree flash but I keep having problems and nothing I try is working properly.

    Very concise question, appreciate the screenshots. One thing that motion tweens don't always show very well is keyframes. Let me clear a few things up and see if it helps.
    Go back to what you wanted to do originally, which is copying the frames from one document to another. This is perfectly fine and to clear it up, it will also copy any library elements (images, clips, etc) that are required to copy those frames for you, so you do not need to import them yourself.
    To successfully copy frames (not symbols), select the first frame of the frames you want to copy, hold shift and select the last frame (alternatively double clicking anywhere in the blue motion tween should select it all as well). Now right-click and "Copy Frames". Now go into your new document, select a frame, right-click and select Paste Frames. You will see the same frames copied over, the blue representing the tween and keyframes came with it and you finally will notice all your images/etc were copied into your library.
    Now is a good time to manage the library clutter that was just copied in, if you're a clean freak like me.
    This process is the same, as you tried, for the other documents you want to copy in. If any resources match in name then Flash will ask you if you want to "overwrite" that library item. If you do that,  you will break one of your previous animations. Make sure that's not the case.
    The common gotcha here is not knowing how to slide frames over properly. If overwriting isn't the issue, this is what I suspect your problem is and as you expand/contract the timeline the keyframes aren't going with you.
    For example if I import 2 clips with fade in/out and move keyframes as you did I'll get something like this:
    Now moving them over I would be very careful to select all of the frames I want to move via the methods above. Click the first frame, hold shift and select the last frame, or double-click anywhere in the middle of the blue. The selection of frames:
    Now I simply drag my selected frames to the right, notice the keyframes stay as they should (the black dots):
    The animation plays as expected.
    Lastly I'm not sure if you've ever used the panel but you should really get used to the Motion Editor. This gives you control over easing as well as shows you an in-depth view of the keyframes that exist in a selected motion tween.
    At first this panel may look complex but it simply represents the basic properties you can animate. Any more properties you animate can be added in here. I moved the X, Y and Alpha properties of my object. So you can see over the frames 30-60 what I did. You can also adjust basic easing here.
    If your animations don't look correct you can select a motion tween, open the motion editor and verify the keyframes look correct. Scrub the timeline and look at the values you're interested in. Alpha for example, for you.
    If you don't see any keyframes when you scrub the timeline, you moved your frames over incorrectly and the keyframes probably exist in a different place and therefore it appears incorrect.

  • How to add button inside move clip and call it from main timeline?

    Hi,
    On the main timeline I  have a movie clip called clock_mc and playBtn
    playBtn is  placed in the center of clock_mc
    When you press playBtn clock_mc starts playing
    playBtn.addEventListener(MouseEvent.CLICK, playClock);
    function playClock(event:MouseEvent):void
        if (event.target == playBtn)
            clock_mc.play();
            playBtn.visible = false;
            trace ("play button was clicked");
    This is working fine for me.
    But I want to add replayBtn to the last frame of clock_mc and set up the function on main Timeline.
    Another words when the clock_mc rich last frame you see replayBtn.
    code example:
    replayBtn.addEventListener(MouseEvent.CLICK, playClock);
        if (event.target == replayBtn)
            clock_mc.play();
            replayBtn.visible = false;
            trace ("replay button was clicked");
    I've tryed to placed the replayBtn on the stage on the main timeline and I've set it up to replayBtn.visible = false;
    And then I add replayBtn.visible = true; to last AS frame of clock_mc but it wont work
    Even when I put the button physically to the last frame of clock_mc it will not work either.
    Please help

    I've solved the problem:-)
    I've set replayBtn.visible = false; on first frame of clock_mc
    and  replayBtn.visible = true; at the last frame
    and than as you sugested I'v add:
    clock_mc.replayBtn.addEventListener(MouseEvent.CLICK, replayClock);
    function replayClock(event:MouseEvent):void
            clock_mc.play();
            trace ("replay button was clicked");
    I couldn't see replayBtn at the firs stage because I have clockTween assosiated with clock:
    clockTween = new Tween(clock_mc, "x", Regular.easeOut, -469,438, .5, true);
    and I had replyBtn in the wrong place so when clock_mc was coming up on the stage replayBtn was on the left side of the stage :/
    Now I have to solve only one thing.
    Maybe you would have any suggestions please.
    I've set up stop(); in a first frame of clock_mc
    that when you see clock_mc sliding in it has to wait for playBtn to be clicked
    because I have two tween:
            clockTween = new Tween(clock_mc, "x", Regular.easeOut, -469,438, .5, true);
            playTween = new Tween(playBtn, "x", Regular.easeOut, -720,514, .5, true);
            playBtn.visible = true;
    so when you click on playBtn:
    function playClock(event:MouseEvent):void
        if (event.target == playBtn)
            clock_mc.play();
            playBtn.visible = false;
            trace ("play button was clicked");
    everythink is working fine except when I clik on replayBtn it play for I sec because there is stop(); on the first frame of clock_mc

  • Working with movie clips

    I'm making an animation with movie clips inside the stage but if i put action in the end of these for go to another frame in the stage, dosnt let me because AS3.0 does'nt alow script inside buttons and MC's.
    Wath can i do for this issue.
    The new code from AS3.0 is so diferent to AS2
    Thanks for your time.
    can you put some video to do things like this.????
    By the way, this forum is the best, congratulations for all.

    Thank you for the answer, i hope to understand AS3 more in the pass of days.
    For other hand, can you tell me how can i make the background of my exported video transparent??
    When export i mark the check box make alfa chanel on backgroud, but when i conver to FLV with Adobe Media Encoder, the background turns to black.
    what other way can i use to import video.
    Thank you any way

  • Buttons in Movie Clips, Movie Clips in Movie Clips

    Here goes. I have a scene with a button in the timeline, that
    targets a frame in a movie clip, which is essentially the content
    area of the layout. this is the code used:
    on (release) {
    textmov.gotoAndPlay ("challenge");
    This works fine and dandy. Now the problem. Within this
    "Content" movie clip, i have another movie clip with a button in
    it. This clip is designed to tween in then upon clicking a close
    button tween out. When I test it the button doesn't have rollovers
    like and I can't get it to talk to the clip above it to play the
    close tween.

    > I am still struggling with the fact, that upon testing,
    buttons in movie clips
    > do not exhibit their various states. Up, Over etc. I'm
    relatively sure that you
    > can have buttons in Movie Clips. I've also noticed that
    any graphic symbols
    > within a Movie Clip produce the hand, when the mouse
    cursor is Over them, just
    > like a button would. All of this happens, when testing
    in the FlashPlayer.
    is there any place you could kindly upload the source file
    for me to check ?
    > Do buttons operate independently of the Movie Clip
    timeline they are placed in?
    that is correct, button should work independently to movie
    clip.
    it only react to mouse upon entering the HIT state (which is
    invisible to user)
    and stops reacting once the mouse is off that state.
    > I have one Movie Clip with a one frame time line, should
    a Button symbol work
    > it it?
    of course it should work...
    Try to upload the source, let us check it out for you, spare
    you time on guessing :)
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Buttons in movie clip won't bring up scenes

    I've created a movie clip within my main scene.
    I have 6 buttons in that clip. I would like these buttons to
    call up the appropriate scenes but it isn't. I don't know whether I
    cannot have buttons in movie clips call up new scenes or if my
    actions script is simply wrong.
    Here are some of the actions I've tried to upload the scene
    or swf files:
    thanks.
    on (release) {
    _root.gotoAndPlay("instance name");
    ----Also, named 1st frame of scenes with matching instance.
    on (release) {
    _root.gotoAndPlay("scene name");
    on (release) {
    gotoAndPlay("scenename",1);
    on (release){
    uploadMovie ("name.swf",1);
    }

    use frame labels only and use the goto methods (like your
    first 2 goto statements) and not the goto functions (like your last
    2 goto statements).
    also, there is no uploadMovie() method in actionscript. use
    loadMovieNum() if you want to load name.swf into _level1.

  • Subject : Slideshow looks bad  Hello guys  I have a project in my Final Cut just about done.  I want to add my slideshow as part of the project and burn it to DVD.  In my slideshow, there are some stills from the movie clips and some downloaded from the i

    Subject : Slideshow looks bad
    Hello guys
    I have a project in my Final Cut just about done.  I want to add my slideshow as part ofthe project and burn it to DVD.  Inmy slideshow, there are some stills from the movie clips and some downloadedfrom the internet but they all look blur when playback and even worse if Iapply Ken Burn to it.   Pleasesome one can tell my how to do it right or it can’t be done because thedownload quality and stills from the clip are not suitable or slideshow.  Thank you
    PSC

    Thank you Ross.
    The entire DVD containing Quick Time movies (Final CutExpress project) and slideshow was done in iPhoto.  The Final Cut project was rendered prior to export to QT,  the slideshow was sent to iDVD withoutrendering. The slideshow with most of the pictures from my still camera incombination with stills from movie clips and some downloaded from the Internet.After burning, the movie playback is perfect but the slideshow is not.  The slideshow containing 3 differentkinds of pictures; those from my still camera looks OK; the stills from themovie clips and from the Internet are not.  I don’t have much knowledge in this game, but I think NTSCwith frame size 720x480, and the downloaded picture Item Property shows most ofthem are between 400 to 500 x 300 to 600, may be both of them are not suitablefor TV screen while the stills from my still camera looks OK because they are2048x1536.  Please enlightenme.  Once again, thank you so much,I really appreciate the time you offered.
    psc

  • IPad - with movie clips - how can I play more than one at a time?

    iPad2.  I post short movie clips via iTunes to the Photo catagory.  I can play each of these clips by selecting the clip and pressing the start arrow, only the selected clip will play.  How can I select a group of movie clips and have them play with only one selection.  Like a "slide show" but for movie clips???

    More than one contacts at a time

  • I have an old project with AVCHD clips and I want to import the clips again with surround sound. How can I relink the project clips to the re-imported ones without doing the project from the begining?

    I have an old project with AVCHD clips and I want to import the clips again with surround sound. How can I relink the project clips to the re-imported ones without doing the project from the begining?
    I have a sony handicam and I imported the clips to iMovie and they lost quality and converted the audio to stereo. I want to import the project to final cut X and import the AVCHD in 1080p and surround sound and export the movie in bluray. Can I relink the clips without editing everything again?
    thanks!

    Only photos taken with the iPad, copied onto it via the camera connection kit, or saved from emails/websites etc can be deleted directly on the iPad - either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view.
    Photos that were synced from a computer are deleted by moving/removing/de-selecting them from where they were synced from and then re-syncing. If you want to remove them all then normally you could just sync an empty folder (in terms of photos) to the iPad, but as you don't want to sync at the moment you can't do that.
    You can reset the iPad back to factory settings and start from scratch with it : Settings > General > Reset > Erase All Content And Settings

  • How can I put a slideshow on automatic with movie clips longer than 2 minutes?

    How can I put a slideshow on "automatic" with movie clips that are longer than 2 minutes?

    Inspector > Animate > start transition to Automatically and set the delay to the duration of the video clip.

  • Working with movie clip in flex

    I am using a movie clip with animation having 2 frames
    developed in flash cs3 in flex. The movie clip has mouse hover and
    mouse out animation. Now I am using the movie clip and want to make
    a click event on the clip. But it does not work at one click. I
    have to click more than once. Also When I remove that animation the
    click event goes well.
    Can I make a movie clip by flex?
    or
    How can I use that movie clip with animation developed in
    flash cs3 and also click event work well.
    Please help me.

    Actully I have two frame in movie clip(cs3). On mouse hover
    it goes to second frame and on mouse out it comes to first frame.
    Now when I am using this movie clip in flex and want to get the
    click event on that movie clip it does not work at once. If I
    remove the mouse hover and mouse out from movie clip the click
    event works. But to get those mouse hover and mouse and in over
    movie clip I had to write to many code.
    However that mouse hover and mouse out by flex over movie
    clip it takes time to get work.

  • Creating button with gotoPage(action) and tooltip in Indesign CS4

    Hi,
      I want to create the button with gotopage(action) and tool tip for specific text for pdf generation, using the javascript/AppleScript .If any of you know ,Please do reply for my question.

    Dave is correct. Go to Page isn't available in PDF.
    Instead, use the Hyperlink panel and select an object or text and choose Create New Destination and give it a name.
    Then set the action for the button to be Go to Destination. Select the destination you saved.

  • Recommendation for case with a clip and protection on all sides, snug fit.

    I'm looking for a case with protection on all sides, with a clip, with a snug fit -- i.e., not designed for ever make / model (not one size fits all). I bought the case at the Apple store with a clip and a snap, but the top of the phone is mostly unprotected (uncovered) and I don't like the flap with the snap because it does not close correctly unless I stop what I'm doing and look at it to make sure the snap lines up (i.e., the flap has too much extra material and does not line up automatically with the snap).

    Otterbox Defender case which provides excellent protection and probably the best protection of all available cases which includes a clip.

  • HT4513 You need to include "Click the Advanced button" between points 3 and 4 in the description above

    You need to include "Click the Advanced button" between points 3 and 4 in the description above

    I hate these HTxxxx linked discussions as I often can't follow/or miss the meaning of the post.
    If you look above you'll see:
    Learn About AppleTV: Apple Remote.....
    which links to HT4513.
    AC

  • Buttons, movie clips and actionScripts

    I've created myself conundrum. In my test movie I have
    created two named frames on the screens timeline (home, box); each
    content frame consists of a movie clip with a button in it
    (home_btn, box_btn). What I'm attempting to do is have the home_btn
    button call the movie in "box" and have the box_btn button call the
    movie in "home".
    If I don't use movie clips the is a simple task,
    home_btn.onRelease = function() {
    gotoAndPlay("box"); }
    but as soon as I place the buttons inside a movie clip the
    navigation ceases to work. I'm assuming I'm getting beaten as
    something very basic, but unfortunately I can't find it.
    Anything thoughts would be greatly appreciated. Thanks
    locoLindy

    Perfect! That fixed the problem. Many thanks for your help,
    I'd have toiled with that for days!
    Again, that's for your help!
    locoLindy

Maybe you are looking for

  • Need advice with upgrading to a new HD

    Hello, all. My available hardware: MBP 13-inch w/160GB HD running OS X Lion 500GB external firewire HD which I exclusively use for Time Machine 8GB USB flash drive 500GB internal 2.5-inch HD which I intend to install in the MBP USB 2.5-inch HD enclos

  • Adobe CS3 Extended - problem w Bridge - picture displayed wrong in Horrizontal Filmstrip mode

    Recently started have problems with Adobe Bridge (CS3 Extended) after it did an automatic update from Adobe for my CS3. The problem is that the panel where the picture appears in "Horrizontal Filmstrip" is now positioned to the far right - partially

  • Problem writing to Port A, B, C on PCI-2025E

    I have a VI written to control some 5V devices (solenoid valves) using port write. I am using a PCI-2025E card. This worked fine on DI0 (the digital I/O port available on positions 1-50), but when I switch to digital port A (on position 51-100 of the

  • Message pop up Adobe

    Bonjour, J'ai réalisé un formulaire PDF (avec Adobe acrobat XI et LiveCycle), qui devra être rempli par divers utilisateurs et renvoyé à une adresse mail commune. 1)      Quand un utilisateur commence à remplir le formulaire, un message Adobe d'infor

  • Create Automatic Reservation at Goods receipt during Backflash

    Create Automatic Reservation (Movement type 311) at Goods receipt during Backflash