1 Reply Latest reply on Jan 23, 2007 4:46 PM by wesm9787

    fading

    ivanarias
      this will seem really stupid and simple i'm sure but i'm coming from swishmax where all these things were automatically done and there's no code needed...

      how do i just have one image after the other fade from one to the next in one scene, at the end of which it will keep looping in that one scene and have it so that if the user clicks on the scene, it will go to scene#2 (where i'll have a .flv movie called that will play through, at the end of which it should return to scene #1 where it will once again loop the fading images)

      i'd like a way to do this with the action scripts i guess or guided mode, i don't know code
        • 1. Re: fading
          wesm9787
          if you mean have the images fade into each other and then when the last image fades go back to the original image, all you need to do is make a movie clip. i'm assuming you don't know anything about flash because you said you were coming from a different program i don't know how much you actually know. so sorry if i tell you stuff you already know. but if your library window isn't already open then go up to the top, click on the window menu, and find library and click on it (if you're using flash 7 it might be in one of the panels menus under the window menu (development panels, design panels, etc.)

          anyway, you'll need to import all your pictures go to your library. go to File, Import, Import to Stage, and find the picture you want to import. then right click on the image, select "convert to symbol", name it whatever you want, and select "graphic" as the type. do this for every picture you want to use. you should have a bunch of symbols in your library now. go to the library and click the little piece of paper in the bottom left corner with the plus sign on it.

          select movie clip as the symbol type. however many pictures you have, that's how many layers you'll need to make (go up to the top, then insert, then timeline, then layer) so if you have 10 pictures you'll need 10 layers. Or you could put them all on one layer and just have the last picture on the bottom. Either way works, but the layers method keeps things more organized and makes the pictures easier to edit if you need to. It's up to you though really.

          on the bottom layer, drag the last image you want to appear onto the stage (the symbol you made earlier, not the actual picture). then open the align panel (go to window, then find the align window, which again might be in one of the panel menus) click on the picture of the 2 sideways rectangles with the line through the middle (when you hover the mouse over it it should say "align horizontal center") and click on it so your picture will be aligned in the center of the horizontal axis. then click on the picture of the 2 rectangles the go top to bottom with a line going sideways through them (should say "align vertical center"). now your picture is centered. also make sure the button that says "to stage" is selected or else neither one of them will work.

          do the same thing for every picture, putting the second to last picture you want to see on the second to bottom layer, etc., until you get to the top layer, where the first picture you'll see will be. open the properties window if it's not already open (again in the window menu at the top). then add a new keyframe (timeline, insert, new keyframe) about 40 or 50 frames later (which if your document is at 12 frames per second would give you about 3 or 4 seconds to see the picture). or if you want it to last longer drag the keyframe farther out. you can press the enter key to see how long it will last.

          once you have how long you want the picture to be there, add another keyframe however many frames later you want the fading part to last. if you want it to take 2 seconds, add a keyframe 24 frames later, 3 seconds would be 36, etc. click on the properties toolbar you opened earlier, go to where it says "color", and select "alpha". make the value 0%. now you're picture in the last frame should be gone, and you'll see the next one under it. then click on the 2nd frame you added (the one that would be in the middle at this point.) right click on that frame, and select "create motion tween." now hit enter, and it will play your movie clip so far.

          it should have however many seconds you decided on of the first picture, which then fades to second picture. do that for every picture, adding keyframes on each pictures layer to make it show the picture and then fade like the first one, until you get to the last picture in your set. then once you have the last one, make it fade to where there is nothing. so at the end of the movie clip it will fade to nothing. add a new layer, and drag it down to the very bottom. put the first picture you started out with on the first frame in that layer. then at the end of the movie clip when you play your flash player, it will keep looping that movie.

          now for the going to the next scene part. you can either have a button off to the side that they click, or have a button that covers the entire stage, and make the alpha like 1% or 0% or something so you can't see it. i've never tried it with 0% but i don't see how that would affect anything. i'd try it with 1% though just to be safe in case there's something flash does where if a button's invisible it doesn't count it as being clicked or something. i know that makes no sense but just in case.

          anyway, go to the square with the plus sign in the library, but select button as the type for the symbol. make a big square and make the fill white (the square in the tools panel). make 3 more keyframes after that for the over, down, and hit frames (just add keyframes and they will automatically be made the same as the first one). put it on the stage and make it the same size as the stage (you can also click on the match width and height button on the align panel.) then click on the button, go to the window menu, and click on actions. if the script assist is on, turn it off. it should have the name of the button you made on the left panel under "current selection". paste this code into the window on the right:
          on (release){
          gotoAndPlay("Scene 2", 1)
          }
          which will make the movie advance to scene 2, frame 1 when the button is clicked. that should work but if something doesn't work let me know and i'll see if i accidentally typed something wrong or spelled it wrong or something.