ActionScript 3.0 :: Fading Transitions Between The Scenes?
Nov 15, 2009
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?
View 4 Replies
Similar Posts:
Mar 9, 2003
I am creating my first Flash Web site, learning ActionScripting as I go. I think my most recent problem requires some simple scripting, but I haven't found a solution on the Board, so I decided to post this message.
Basically, I am trying to make the transitions between each section of my site seamless, and in absence of any HTML-like jumps in which the page just cuts to another. For example, when you click on a button from the main navigation area of my portfolio site, you are taken to another section (separate scene),and the content area changes.I want the previous scene to fade out, after the button is clicked, before the new scene loads. Another words, I need to figure out how to tell the timeline to do this for each button:
When I click the Graphics navigation button,FIRST play frames 300-310 of the current scene (fading out animation)THEN take me to the frame label graphics.Heres the code attached to my Graphics button currently (it nested inside a movie clip, hence the _.root part). How would I change this to get it to play frames 300-310 of the current scene before it takes me to the graphics page?
on (release) {
_root.gotoAndPlay("graphics");
}
View 14 Replies
Jun 18, 2009
I need advice concerning a small project that I am making.
Here's how the timeline is setup:
main timeline:
keyframe 1: actions
[code].....
View 6 Replies
Sep 16, 2009
I just need to know how I would slow down transitions between pictures/scenes. (I downloaded the "rotator" fla from flashmo.com).
View 1 Replies
Apr 5, 2009
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] .....
View 1 Replies
Jul 3, 2009
whenever I set my sound to stream and continue to make a movie with multiple scenes. The audio and video get disgustingly out of sync sometimes even off by 30 seconds. I just started an animation its only 10 seconds long with two scenes and the AV is already off by about 5 seconds. Ive worked around this by avoiding scenes altogether but i really don't want to have another 5000 frame scene. I discovered this problem in Flash MX and Im quite annoyed that it still has't been fixed 3 years later!
View 1 Replies
Mar 30, 2012
I'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]....
View 2 Replies
Apr 7, 2009
I 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]...
View 7 Replies
Oct 11, 2003
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
Oct 11, 2003
i've done the Fading Grid tutorial that Voetsjoeba wrote but i seem to be de-railing somewhere 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 place but it still hangs.
View 5 Replies
Feb 26, 2011
I have an interactive story divided into scenes. At the end of each scene a button appears. This occurs on a frame on the timeline.
There are two different buttons that might appear based on whether a prior scene has been viewed or not.
For example, there are Scene_1 and Scene_2. At the end of Scene_2 one of two buttons will appear. The buttons will be either "Go see Scene_1" or "Return to Main Menu".
If the user has already seen Scene_1, Flash will know that and automatically go to the frame in Scene_2 that contains the button "Return to Main Menu".
Conversely, if the user has not seen Scene_1, Flash will know and automatically go to the frame in Scene_2 that contains the button "Go see Scene_1".
I imagine there would be an action frame at the end of Scene_2 that will contain the as2 code to enable this action.
Perhaps something like, but probably not at all like the following:
if ("Scene_1", last frame == true){gotoAndPlay("frame#");}else{gotoAndPlay("frame#");}
View 1 Replies
Jun 2, 2010
I am working with a project that has many scenes. Each scene has a movie clip attached to it. The first scene is simple...just a couple of buttons and that is it. My worry is that when I add all of the videos that correspond with each button and publish the SWF will be a huge file. THE QUESTION: Does flash load ALL scenes of a movie or does it load the first scene and then load the other scenes when the user needs to view them?
My ultimate goal is to just have the first scene load and then when the user clicks on the buttons contained within that scene that only upon release does the corresponding scene load. Maybe I am doing this completely wrong and should look at doing it another way.
View 6 Replies
Dec 30, 2009
I'm building my first AS 3.0 application and am using external .swf files that load into a main.swf. I'm creating transitions for each external .swf as they are unloaded so when the user clicks next, the current .swf transitions out and the new one comes in. Since loadMovie and levels are obsolete in 3.0,I've looked into the transitions manager class, but some of my transitions are pretty intricate so I would need to use timeline based tweens.
View 2 Replies
Apr 11, 2009
so I have this scene in Flash where a song plays. However, once everything is done on the scene, the screen fades and it goes to the next one. I put a layer in the next one that stops the music, but it just suddenly stops without fade. Also it doesn't matter if I select FadeOut because it will still suddenly stop. If I put Event instead of Stop, the song just keeps playing.
View 1 Replies
Jul 15, 2009
Anyway, I want to do something really basic and simple. I want to have a word fade in then fade out. Then another word in another place fade in and fade out.
View 1 Replies
Jul 22, 2010
how I might fade this banner out automatically after 5 seconds if it isn't clicked on by the user?
ActionScript Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(main_image, "_alpha", Strong.easeIn, 0, 100, 1.25, true);
[Code].....
View 4 Replies
Feb 21, 2009
Ive made myself an xml gallery already, i just wanted to put a fade on the thumbnails and main images after they are fully loaded, so they appear gradually. thought it would be simple using the onLoadStart, onLoadProgress and onLoadComplete functions that are envoked by my movieClipLoader, but having soe problems with the images and thumbs disappearing a short time after fading. a link to what ive got so far is here, have a look and wait a while and youll see the thumbs, mains disappearing [URL] my code for the gallery is such (all contained in one frame, no buttons involved):
[Code]....
View 4 Replies
Mar 25, 2009
I'm trying to mix the simple photo gallery code with the xml gallery. i'm trying to get the images to fade in and out like the simple gallery, yet have all the features of the xml gallery. I'd like to do this without making two different movie clips/xml files, like the simple gallery. Again, any help would be terrific. I'll post the two codes.
simple gallery:
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
[code]....
View 2 Replies
Sep 24, 2003
i am basically half way home, but I can't quite figure out how to make my movieclip gradually fade out. What I want is an arrow to appear and dissappear when the user is around some buttons. Here is my code:
stop();
speed = 5;
_root.onEnterFrame = function() {
greenArrow._x += (_xmouse-greenArrow._x)/speed;
if (_xmouse > 0 && _xmouse < 340 && _ymouse > 0 && _ymouse < 60) {
greenArrow._alpha += 10;
[Code]...
View 3 Replies
Oct 26, 2011
I am working on a slideshow (sort of). The idea is that each frame in the root timeline works as a slide. Each slide inside each frame is a simple MC filled with images, texts, audio and animations and so on. Once this MC reaches its last frame, it should stop and trigger another MC used as a transition. And I've put inside this transition MC a code that should tell the root timeline to advance a single frame in order to show the next "slide".
So, on the timeline, I've put this code:
***
this.onEnterFrame = function(){
if(slide._currentframe == slide._totalframes){
[code]....
Well, needless to say it is not working. The whole swf just stops. And if I remove the stop() code of the Transitions MC at frame 2, the current slide will loop before the transition triggers the nextFrame command.
View 1 Replies
Aug 14, 2009
I only open it up a couple of times a year to replace a banner ad in a clients web site. But I am having a problem with the transitions that I haven't experienced before. I created a new flash file with text that fades in over 24 frames before going to the next bit, but when I test it, it just jumps from one text to the next without the fade in. It plays fine on the stage, but exports the .swf file without the fade transitions.
View 3 Replies
Jan 10, 2004
Below is the code which is used to trigger the transitions. For reference 'home' is movieclip and 'homestate' is a button in the movieclip.
home.homestate.onRelease=function(){
if(_root.section!="home.swf"){
_root.section="home.swf";[code]....
I try incorporating these actions into the first script but I get an error.
home.homestate.onRelease=function(){
if(_root.section!="home.swf"){
_root.section="home.swf";[code]...
View 5 Replies
Mar 7, 2004
i was also wondering if it's possible to make transitions with masks using actionscript?i have section headers that i want to transition when certain buttons are clicked, and depending on what button is clicked, a new section header is shown. i put all the section headers in a movie clip, with different frame names, so when the button is clicked, it jumps to the different frame name of the movie clip.for the transition, i basically want a wipe left to reveal the section header.. and a wipe right to hide it... and to do this, i figure i'd need to mask...
so i put a mask over the movie clip and realized that flash doesn't mask movie clips very well, when using masking layers.. so it doesn't really work properly.is there a way to do this using actionscript? and if so, how? i know flash know has a setmask property for movieclips..but can you modify the mask property's size??
View 3 Replies
Aug 24, 2004
I found this site and I like the transitions between the photo's. how to make such an effect! Is it done with masks? or......?
View 14 Replies
Mar 8, 2006
I have a menu with 4 buttons, once clicked each button sends you to its corresponding section (frame label). Each section has a different loading animation. Once in a section I would like to go to another but before this that section's specific transition animation must play. Now I've looked around and all I can find is how to do this with a universal transition animation.
View 3 Replies
Aug 15, 2006
[URL]theres the link for the turorial. my questions is, how can i use movieclips instead of using buttons. i thought it would be simple enough to create a movieclip, add the on release as to it and done, but it doesn't work. i also converted the file to flash 8 btw.
View 1 Replies
May 19, 2008
Is there an updated version to this tutorial? I'm specifically trying to apply the technique, but using a tween engine (tweenlite) as well as MovieClipLoader.Or perhaps there's a newer, more efficient way to load swf's with transitions?
View 2 Replies
Jan 30, 2009
I read the tutorial about transitions between external swfs and started implementing it! So as a good and ordonate guy that I am, I put the index.html in the root, created a style folder for the style and a folder for the swfs. I was struggling about one hour to find out why it wouldn't work, to find out that if I move the html inside with the swfs, being in the same directory, it worked fine!
View 3 Replies
Feb 10, 2009
I am using Flash CS3 AS2 I have a main movie into which several external swfs are loaded. Two of these swfs are left_menu and middle_menu. I would like these to be able to talk to each other. When the 'home' button is pressed on 'left menu' I would like 'middle_menu' to go to a certain frame and play out. I have had a look at the tutorial which differs a bit and I'm a little confused (very new to actionscript!). I have put on by 'home' button if 'left menu':
[Code]...
View 4 Replies
May 2, 2004
I know how to do transitions that use external swf files using levels
What if i wanted to do it all in one swf? an example is here below:
[URL]
If you vist the profile page for example, you will see four main buttons at the top, Details, experience, favorites and hate. If i click on one of these some secondary buttons appear underneath, RED ones.
Now then if I press experience for example, the red buttons appear below and now if i click on favorites the experience buttons slide out to be replaced by the favorite buttons. I could do this with external swf files and use midframe actionscript but this all appears to be happening in one swf.
View 5 Replies