ActionScript 3.0 :: Fading In/out Movie Clip Transitions?
Jun 18, 2009I need advice concerning a small project that I am making.
Here's how the timeline is setup:
main timeline:
keyframe 1: actions
[code].....
I need advice concerning a small project that I am making.
Here's how the timeline is setup:
main timeline:
keyframe 1: actions
[code].....
I'm making a first-person adventure game where I have the different frames in the root movie be the various locations that the user can interact with. I want to have fading transitions between the scenes and I was wondering if this was possible in flash. What I've tried for now is to create an array with all the current children then when the frame is changed I add those objects on top of the new frame and use a (alpha) Tween object to fade them out. This doesn't seem like a good idea and feels very hackish, so I had a few questions:
1. Is there an event that is called when a frame is changed (Event.FRAME_CHANGE doesn't exist ) since the way I'm doing it now is to have a local variable which I compare with this.currentFrame.
2. This may sound weird, but is there a way to create a screenshot of the current visible area and use that as one would any other visible object? This would allow me to Tween that one out instead of the array of children that I'm using now. I know it's possible in OpenGL, to render the current view scope to a texture array, but does Flash have this capacity?
[code]...
I thought of making each phase inside "content" a movie clip, adding all the even listeners in the main actions layer and also adding the transitions there too.
When X even listener is pressed in X movie clip pointing to Y movie clip, fade out X using an e.target tween and somehow fetch the Y info and fade that movie clip in.
I'm trying to create a simple yet effective image slideshow for my homepage. It'll be a bar, 600 pixels wide, by 300 pixels high. There will be 4 buttons that will line the bottom, numbered 1 through 4, that will control 4 separate slides that'll appear in that window. If you don't click anything, the images will fade in and out after x amount of seconds. Clicking on the numbered buttons will load the appropriate slide, and each slide when clicked will take you to a certain part of the website.
I wish to do this in actionscript... not using the timeline as I prefer to do all transitions in actionscript. Can anyone shed light on how to set this up? I've been trying to use the TransitionManager function... however I'm getting mixed results. Here's a screenshot:
Code:
import fl.transitions.*;
import fl.transitions.easing.*;
ss1_mc.alpha = 1;
ss2_mc.alpha = 0;
ss3_mc.alpha = 0;
ss4_mc.alpha = 0;
var currentImage:MovieClip = ss1_mc;
[Code] .....
I have a static text movie clip (text has been completely broken down). What I want is to fade in then fade back out. I have the first part working, it's getting to fade back out. Here's what I have so far:
Welcome._alpha=0;
Welcome.onEnterFrame=function() {
this._alpha+=5;
}
This section works great. I just can't seem to grasp how to make it fade back out.
I have a problem with buttons and transitions.I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following code:
on (release) {
if (_root.externaltwo._currentframe == 7) {
_root.externaltwo.gotoAndPlay(8);[code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "externalone";[code].....
Obviously a similar code would be placed on button two so the transitions could take place.I am uploading my file so you can see exactly what I am talking about. Also in this file will be a folder containg a version that works but without the buttons moving up and down which is the effect I wish to have
I have a gallery made of 3 layers : actions, buttons, and images. Fore every image i have a keyframe that plays a movie clip by fading from 0 alpha to 1. I made a new keyframe that has no image so the page doesnt display the big photo from the start just the thumbs(which are the buttons). What i want to do is that the big images to be dispalyed only while i hold the mouse button, and on release to go back to the first frame state (no image).
View 3 RepliesI'm trying to play 2 external flash movies. its already running ok but i need the scene to be somewhat to gradually become transparent so that the timebased scene2 will comeout to of the screen.
Here is the script of it:
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("scene2.swf");
myLoader.load(url);
addChild(myLoader);
[Code]....
I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following
[Code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
[Code]....
I have a flash movie located here: URL...and it's preloader here: URL... (which I built based on the video tutorial from this site)The problem lies in how the preloader transitions to the main movie. When the preloader is done loading the movie and therefore plays the movie, instead of playing from the beginning of the movie, it instead skips to frame 26 or so, 1 second into the movie. Which is where the filigree animation begins to play. Upon reloading the preloader.swf it usually plays correctly the second time around. I cannot figure out why it is doing this, my only theory is that the main movie is somewhat playing in the background? I really don't have any idea to be honest.
View 3 RepliesThe transition when you for example are in the HOMEPAGE then when clicking on the OTHER menu LINKS for example ("GALLERY") a transition either moves away or fades 1st the homepage then the SECOND page which in this case would be the GALLERY for example... fades in or appears in.. How can i find a way sooo that i can do that in actionscript.nsitions like that?? And be able to do it with the rest of the links.. u know how if i go to "contact" then it will 1st fade out the page i was looking at then the other appears in or fades in.?
View 2 RepliesI can't work out why - but when I try to fade out some text (by calling fadeoutSecondText), the text fades out, and then immediately fades back in. Fading in and out struggle against each other, resulting in rapidly flashing text!
[Code]...
want to have one preloader work for all of my external content.Basicaly I'm trying to reuse the same preloader objects with these two sets of code. The red is for loading external movie clips that I have setup to transition in and out while the blue is setup to just load external movie clips with no transitions into a different location. The blue works fine, but the red does not.First frame of main timeline:Currently when I have mainLoader here it will not work. If I take mainLoader out the movie will load but it will not preload.
_root.currMovie = "section1";
mainloader.loadMovie(_root.currMovie+".swf", container);
//main preloader//
[code]......
I recreated Voestjoeba's tutorial on "Transitions between external swf" here on Kirupa, with ease, but what I am trying to accomplish, may be out of the scope of that tutorial. If you take a look at [URL] , the page is made with frames, and the movie at the top (the navigation) appears to be acting on the same concept as what Voestjoeba created. I'm trying to mix and match the code from the tutorial to recreate what is happening on the xango site, for a page I am creating, and needless to say, i'm backed up two days, and have hit a roadblock.
View 1 RepliesI want to have one preloader work for all of my external content. Basicaly I'm trying to reuse the same preloader objects with these two sets of code. The red is for loading external movie clips that I have setup to transition in and out while the blue is setup to just load external movie clips with no transitions into a different location. The blue works fine, but the red does not. First frame of main timeline: Currently when I have mainLoader here it will not work. If I take mainLoader out the movie will load but it will not preload.
[Code]...
is there any way to do this using movieclips with a single swf? [URL] instead of using external swf's
View 1 RepliesI have a set of buttons on a map that when clicked load in a zoomed version jpg file into an empty movie clip. When the loaded jpg / mc is clicked, I want the loaded movie to fade out as it unloads. The fade in is working fine, but I've tried several examples I've found online for the fade out and none of worked yet.
onClipEvent (load) {
_alpha = 0;
alpha = true;
} onClipEvent (enterFrame) {
if (alpha == true && _alpha<100) {
_alpha += 15;
}} on (release) {
_root.empty.unloadMovie()
}
I have this fully integrated site where the menu(which loads from different swf) loads external swf into a container. Whenever a new bottom i selected i want the swf in the container to fade out. Can i add a script to my present code that fades the container "contact" out.
[Code]...
I'm trying to attach a number of movie clips and then apply a slow fade in and out effect rather than a fast animation. The other requirement is that the animation should be continuous. Has anyone seen any _alpha fader code that can be used this way? I'm attaching an MX 2004 file that will give you an idea of what I'm looking for (except I need to slow the animation way down and get rid of any _x and _y scaling). For some reason, when I tweak the numbers to slow things down in this particular code I get a lot of artifacts in the Flash player
View 3 RepliesI have this fully integrated site where the menu(which loads from different swf) loads external swf into a container. Whenever a new bottom i selected i want the swf in the container to fade out. Can i add a script to my present code that fades the container "contact" out.
on (release) {
unloadMovie (_root.bg);
unloadMovie (_root.contact);
[code]....
I'm building a flash player that loads various movie clips in succession depending on user input. The player should continue to play seamlessly when one clip ends and another starts playing, however there is always a slight noticeable delay between the COMPLETE event for one clip and the actual playing of the next clip. I am using the FLVPlayback component to load the video clips, with successive clips loaded in different players in the component.
I've tried playing the next video a short duration before the current video finishes by adding a cue point just before the end of the currently running clip (about 200 - 300 ms before the end). This improves matters somewhat, but it is not a reliable method as the timings are different for different browsers and computer specs. I was wondering if anyone here has any experience with smooth transitions between external video clips and could suggest possible optimizations I could use to improve the transitions.
Using the easing transitions I simply move the _y of several movie clips. It is ok but their starting positions are always from the top of my stage, even if I fix their positions at the bottom.
View 2 RepliesIm able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;
View 17 RepliesI am pretty new to ActionScript 3 and Flash. I don't want my movie clip to play unless the person's mouse curser is on the movie clip for more than a second. If the person just runs their curser over the movie clips really quickly, then it should do nothing. It must be more than a second. How do I code that?
[Code]...
I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.
I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]
I have created a flash website, each button is a movie clip with an invisible button over it containing the following script
on (rollOver) {
_root.mouse_over_profile_btn = true;
}
on (rollOut) {
[Code]....
each page is also a movie clip and on release of a button its played. the problem is that when i press another button to play another movie clip 'page' the old content is still there.
Is there a way of reversing the page transition i have used to bring out the movie clip and then bring in the next movie clip.
i am making a pacman game, and i need to know how to make it go to a certain scence when a movie clip collides with another movie clip.
View 2 RepliesThere is a bad gap in my knowledge with Event Dispatch and Event architecture, and this problem proves it. I've been getting nowhere on this problem for two days, I've posted everything to my Flash site. Go here, please: [URL] Click on "Flash Banners" The two thumbnails represent two different classes. Each class is identical. Both are "extends Movie Clip" classes. Tweeners of various types control the hover and click methods. URL Loaders load the thumnails which I then wrap in MC's and make them buttonMode = true, etc. Hover and click to load the Banners on the thumbnails.
I can't send an event from the Eagle movie clip or the T2D movie clip to tell the other to fade out. Both Banner classes are instantiated through a separate Base class. I'm sure this has to be an Event Dispatch from one MC to another and that it can't be done by the Base class. how I can send an Event or Event Dispatch and what the code structure is so one movie clip can in one class can tell the other movie clip in the other class to disappear while it's neighbour is playing. I'm happy to post code or explain / clarify anything that's not clear.
I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.
[Code]...
when i test the movie all i see is a large grey box (border color) with a medium white box (box color) in the bottom right.when i edit the border and lose the grey box but leave its line borders then i get the image with the white box in the bottom right. i've got an image: instance named 'image', a box: instance named 'box' and a border: instance named 'border' and pasted in the actionscript in
View 5 Replies