ActionScript 3.0 :: Get Pages To Fade In And Out On Button Click?
Oct 6, 2010I am just learning Actionscript 3, and I know what I want to do - I mean, I can see the end result. I am following a Lynda.com tute. F[code]...
View 1 RepliesI am just learning Actionscript 3, and I know what I want to do - I mean, I can see the end result. I am following a Lynda.com tute. F[code]...
View 1 RepliesI have 2 buttons on the stage whose each MouseEvent load a different external swf when clicked. In an attempt to get the current swf to fade out and new swf to fade in on button click, I vainly added a Tween to the function but to no avail.
As it is now, when the movie starts, the button 1 swf fades in, however, when button 2 is clicked, the new swf is loaded but the old swf does not fade.
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var image:Loader = new Loader();
[Code]....
Just starting to wrestle with flash again, and i am trying to make a very simple website. I have made a graphic that will appear as the intro / splash page, and i want this to fade in... then appear as normal. Then when you click, i want it to fade out and load the rest of the site (yet to be made!)I am having difficulty making the fade in / fade out actions does anyone know how to do this? as i have seen it on many websites.
View 15 Repliesflash version: CS3 AS2 Im having trouble making the pages for a website im working on. I have a row of buttons, and I want each one to open its corrisponding page ie. contact_us_button to open contact_us movie clip. the thing is I want each page to transition in and out. so when I click contact us, the contact us movie clip fades in and stops. When I click about us, the contact us movie clip fades out and about us fades in.
Is the way to do this to make each page movie clip have a fade start and fade end, and have it stop before the fade end, and on another page click continue playing the current clip to get the fade out and then open the new page movie clip?
I am just learning Actionscript 3, and I know what I want to do - I mean, I can see the end result. First of all, I am getting an error (I'll start with that):[code]The buttons and the main_mc are on the main timeline. I want to click on a "gallery" button, have the previous page (whatever the user was on) fade out, and then have the "gallery" page fade in. I have been working with a Lynda.com tutorial,[code]
View 0 RepliesI have created a website which loads external swfs as pages onto the main stage on the click of a button. I am using Flash CS3 and Actionscript 3.0. Here is my code:
[Code]...
I am using this code to for buttons to trigger the loading of images:
Actionscript Code:
};button1.onRelease = function() { infoField._visible = true; startLoading("image1.jpg");};button2.onRelease = function() { infoField._visible =
[code].....
So im using CS5, and i have a very basic script which makes an image appear when a button is clicked, ie click button1, and pic1 shows. click button2 and pic2 loads etc.
The script i have is this:
stop();
button1.addEventListener(MouseEvent.CLICK,showpic1 );
button2.addEventListener(MouseEvent.CLICK,showpic2 );
[Code]...
How can i make each image fade in from 0 to 100 opacity, in for example 1 second (time isn't that much of an issue)
Basic problem here. I'm adding a bunch of movieclips using the addChild method. I simply want to remove/hide/fade them after a button click, but I am unsure of how to refer to the movieclips which I've just added.
Here is the code as it stands:
Code: Select allimport gs.TweenLite;
import gs.easing.*;
var strip:Bgstrip;
var contentBg:ContentBg = new ContentBg();
contentBg.x = 440;
contentBg.y = 166;
addChild(contentBg);
[Code] .....
I have an .5 alpha layer that I want to fade out when any 1 of 5 buttons is clicked.
1) The alpha layer is on the screen, but its not at 50%, its solid
2) Its not fading when a button is clicked
3) Its not in the right position
4) I am getting an output error message that says:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@3f7e34c1 to colorbars.
at flash.display::MovieClip/gotoAndPlay()
at Colorwheel/goColor()[Colorwheel::frame1:17] (
This code is telling the int_btn to go to the alpha layer frame, which continues thru frames 1 and 8) the code they are referring to is on frame 1 with a button that is also on frame 8 that I don't want the mouse up function to affect the alpha layer. The 4 other buttons on frame 8 should affect the alpha layer. The code on frame 8 tells the mouse up function to fade out the alpha layer:
var colorscreen:colorbars = new colorbars;addChild(colorscreen) //this is working its the alpha layer mccolorscreen.x = 0;
//this is not workingcolorscreen.y = 51;
colorscreen.height = 513;colorscreen.width = 612;colorscreen.alpha = .5; //not working
// all buttons below work but wont fadeout the alpha layer
[Code] .....
How do I tell it not to listen to the int_btn on mouse up? Should I be using an array or enter_frame or remove event listener or use all three to achieve my goal of fading out the alpha layer when any of the 4 btns are clicked?
I want background picture1 fade out and picture 2 fade in on menu click, so here is what I came up with... laugh , I have tried it 1ste frame:
[Code]...
creating a flip-book in flash (using AS3) . I've looked at the other flip-book programs and editors out there, and none really give the customization that my company wants.I have something working, but the page scoping seems to be off. The pages will turn back and forward with a button click but they flip out of order. However, it all runs fine with no error when the user clicks on the pages themselves. This is the code from the main timeline (where I'm getting an error).
View 6 RepliesI am getting ready to start a new project and I want to make sure I'm on the right track! It will be a site that uses loadmovie (I hope) to fade pages in and out in equal amounts. (I.E movie 1 unloads and fades out at the same rate movie 2 loads up and fades in)I found a reply by Kglad for doing something similar with jpegs the code was:
on (rollOver) {
mc=this.placeholder_mc
mc._alpha=0;
loadMovie("Costume/Bailiff.jpg", "placeholder_mc");
clearInterval(fadeI);
[Code] .....
So I am hoping this will work with a swf. I think I would have to assign buttons which would unload current MC at a fade rate and have another MC fade in at that same rate. And I am guessing the buttons would be loaded on a layer above any of the movies.
I have 5 buttons that need to, when clicked fade the image in the background out and fade a new picture in. each of these buttons has a specific image related to it. how can i achive this smooth transition in and out for all of the buttons?
View 1 RepliesDoes anyone know how to do this rollOver effect? [URL] Enter flash site and look at the rollOver buttons. I have the bar moving over each button but can't get it to fade out.
View 10 RepliesTrying to remove mc from stage when click to other pages. [code]...
how do i make the images_banner.swf go away when you leave the index page and NOT return as you move to the other pages?
Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?
View 3 RepliesI have 3 buttons going around in a circle, in the middle of this circle I want a specific image to fade in for each button when you roll across it then fade out when you move off the button. I also want the button itself to change colour slightly when you roll across it. I've not had much look so far without the use of actionscript, but even with using it I'm not getting very far, I also seem to have a problem where once I have an image appear on the rollover of abutton that the image becomes part of the button, ie instead of the image just appearin when you roll over the button it appears when you roll over where the image should be appearing.
View 1 RepliesI have a sound that starts playing on the intro page of my site. At the end of the intro a button comes up that when clicked takes you to another page. I'm trying to figure out how to fade the sound out once the button is clicked. I've looked at other tutorials and just can't seem to get it working.
View 5 RepliesI need a button, or movie clip, to fade partially when clicked.This code worked but caused everything else on the screen to fade too. And I don't know how to fade down to 20% instead of 0?I am a newbie so please could you give a specific code example.
Code:
on (release) {
this.onEnterFrame = fadeOut;
[code].....
trying to get larger images that fade in on the click or a Thumbnail image.
I have the following which works fine except for the fade in part. I tried adding a tween to fade in but cannot it to work
//SOUND
var clickSound:Sound=new Sound(new URLRequest("sound/click.mp3"));
var titleArray:Array = new Array();
[Code]....
I have setup some nav buttons on my website. When I click one of the buttons, I want the current page to fade out, and I don't want the other page fading in until the first one is gone. This means I need a statement to go along with each button so that they all get rid of the current page, and don't fade in their respective pages until the first one is gone. Here is my current code:
buttons_mc.about_mc.addEventListener(MouseEvent.CL ICK,disappear);
buttons_mc.about_mc.buttonMode = true;
buttons_mc.about_mc.useHandCursor = true;[code]...
So, what do I need in order for this to all function correctly, once "home_mc" has reached its final frame?
Looking for a tutorial to make individual pages (jpg or gif) into swf pages so we can add links in an on-line flip book. I have flash, but have not learned as of yet.
View 2 RepliesI'm working on a charity project that needs a parallax. I followed some tutorial and got the parallax and page zoom out working. The problem is I'm not sure how to stop the parallax from moving when I click on the MC pages on the map. They are marked as Village1 , 2 and 3. The pages AS3 scripts are under parallax-level3 MC. Attached are the current working files. [URL]
View 0 RepliesI have a page with flash navigation which can be accessed from two different pages. How can I program a back button to return to the relevant page whence the user came?
View 1 RepliesI would like to know how to track my pages with google analytics to see which pages are getting the most clicks. My site is XML / Flash the menu is xml. Could I put the tracking code on each of the menu items in the xml file?
View 7 RepliesI would like to be able to go from an html page by pressing an enter link then go to a 'preLoader' page which would then automatically load the mainPage. Originally my preLoader was the 'index' page for the site and had a button that would start the loading process to the main site which was entirely a Flash site. But I decided to add an html page chock-a-block with searchable text so people looking for the services this site offered could actually find it and make that the 'index' page. Anyway, I would like the preLoader page to start loading the next page automatically with no user events like mouse or keyboard events needed.
View 1 RepliesI am trying to work something out, but I am not really good in scripting so I can't figure out how to write the code properly.The situation is a bit complex:I have one frame labeled "street". From "street" you can enter another page labeled "underground" when you press a button. In "underground" there's a button "exitU_btn" that brings you back to "street".So far this wasn't a problem. Now I have another page labeled "F2016" from which you can enter "underground",too, but this time when pressing "exitU_btn" I don't want it to return to "street" but return to "F2016".Means the button should know the label I am coming from and returning to this one.I started to write a bit code for that with if statements, but don't know how exaxtly to write it.
Code:
var enter2016: Boolean = false;
/*should decide where I am coming from, which label (I guess this is what has to be defined somehow)*/
stop();[code]........
I thought I need a boolean to check if my situation is right, but I don't know how to code it right.
Making buttons that open another url is easy enough, but for some reason I'm having a huge amount of trouble having a navigation button open new content on my website, such as moving from the Home content to the Menu content (the layout is static, only one small section filled with content changes.
I think the issue is that I can't figure out how to code it due to the fact that there are a good amount of nested movie clips, I'm not sure how to direct it to the place and frame I want.
I couldn't quite uplaod the file, so I've got it on filefront here: [URL]
I have a button in the scrollbar that has a mask.(scrollbar_mc, mask and content_mc) Now I stuck with HOW TO LINK IT to other pages that are in scene 1 ?
View 9 Replies