ActionScript 3.0 :: Moving A Background Up When A Button Is Clicked?

Nov 15, 2011

I am currently doing a project that involves animating a background image up/down when buttons are pressed.

1.) It will need to check if a button has been pressed and then animate the background up.

2.) It will also need to check to see what the position of the background is. If it has been animated up already, it will need to be animated down.

3.) Finally it will need to contain if and else statements to animate the background movie clip. If, will animate it to y = 180. else will check the position, if it has been animated up, the background movieclip will be animated down to y = 330

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Background Changes Color When Button Clicked

Jun 27, 2003

I have a menu animation where my background changes colour when clicked by a button. > This works fine. But when I click the button the second time it doesnt go to that colour, it goes to another colour.

View 1 Replies

ActionScript 2.0 :: Background Cross Fade When Button Is Clicked?

Aug 13, 2009

I know some basic actionscript but this one is a bit more challenging (to me at least), as (i believe) it requires setting variables...anywho, here is the swf:

[URL]

As you can see, right now when you click each button the respective background image comes up. Now what i need is for them to crossfade, not switch. And preferably at a variable speed. Here is the (simple and obvious) actionscript so far:

stop();
button1.onRelease = function() {
gotoAndStop(1);
}

[code]....

Each button is labeled button1, button2 etc. and each image has an instance name of simply "1", "2" etc....Can anyone help me and let me know what the actionscript would be for them to crossfade ? keeping in mind that the user might click button 1 then 4 then 2 then 5, meaning they cannot simply crossfade in order.

View 0 Replies

ActionScript 2.0 :: Flash8 Background Cross Fade When Button Is Clicked?

Aug 13, 2009

I know some basic actionscript but this one is a bit more challenging (to me at least), as (i believe) it requires setting variables...anywho, here is the swf:

[URL]

As you can see, right now when you click each button the respective background image comes up. Now what i need is for them to crossfade, not switch. And preferably at a variable speed. Here is the (simple and obvious) actionscript so far:

stop();

button1.onRelease = function() {
gotoAndStop(1);
}
button2.onRelease = function() {

[Code].....

what the actionscript would be for them to crossfade ? keeping in mind that the user might click button 1 then 4 then 2 then 5, meaning they cannot simply crossfade in order. And it'd be helpful if i could change the speed at which they crossfade as well.

View 2 Replies

ActionScript 2.0 :: Button Actions - When Clicked Fade The Image In The Background Out And Fade A New Picture In

Aug 22, 2006

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 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

Sep 29, 2008

How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?

[Code]...

View 7 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

ActionScript 2.0 :: Buttons To Stay Orange Once Clicked And Only Roll Out Back To Grey When The User Has Clicked On Another Button In The List

Feb 7, 2007

I've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?

View 2 Replies

ActionScript 2.0 :: Rotation To Mouse When Clicked And Moving

Aug 6, 2011

The player rotates to the mouse when you click somewhere and moves there. The problem is sometimes when you click on a corner the player rotates towards where you clicked but sometimes starts moving sideways.

View 3 Replies

Actionscript :: Why Isn't Flash Updating The Display While The Mouse Is Clicked And Moving

May 8, 2009

I have a flash clip that moves a movieclip when the mouse is clicked on the movieclip. Something very basic. I'm not using drag (since the MC doesn't move with the mouse all the time), but rather using onMouseMove to update the MC location according to _xmouse, _ymouse and some other calculations. The problem was that under internet explorer the movement became very slow and if I kept moving the mouse slowly, it wouldn't update until I stopped. I checked the traces and the event was triggered properly. I tried using updateAfterEvent(); This didn't happen in firefox. (After a long, frustrating debugging I eventually found out what caused this. Since I've looked for the answer online and didn't find one, I've decided to add it here for others.)

View 1 Replies

ActionScript 3.0 :: Moving The Background Around?

Oct 22, 2010

I have a flash file using actionscript 3.0 that when the mouse moves left the background moves right to simulate looking left and vise versa with the other directions. My only issue is that acceleration is a new concept to me and I have never worked with it before. I have read some things on it but they don't really answer my full question which is...

How do i made the background move faster the farther my mouse goes and slower the closer my mouse goes (to the middle).

Here is my script:

ActionScript Code:
stop();
var midXup:Number = 310;
var midXdown:Number = 270;

[Code].....

View 6 Replies

IDE :: Moving Background With Mouse

Mar 19, 2010

hi i m new to flash and i want make a site in which the back ground moves with mouse just like URL...

View 1 Replies

Bluring Sprites And A Moving Background?

Sep 30, 2009

i um want to make a sprite flash movie but i cant afford flash cs4 or 8 so i only have mx heh.. >_> i guess im good at animation but im not as good as alvin earth worm or rpg fan but i want to be good as them is there any way to blur like they do in flash mx? it can be easy or hard i'll work as hard as i can to get it right

View 3 Replies

ActionScript 2.0 :: Moving Background With Character?

Sep 12, 2004

what i am trying to do is get the background to move with the characteri checked out a few tutorials.but not enufheres the deal..i have a character that can fly...and when the character goes upward...thebackground moves down to expose sky..then eventually black space with stars...does that make sense?

View 2 Replies

ActionScript 3.0 :: Image Moving In The Background?

Feb 17, 2009

How can I do this: [URL]

I love the image moving in the background. show me where to start or some similar code?

View 1 Replies

ActionScript 2.0 :: Moving Background With Character

Sep 12, 2004

what i am trying to do is get the background to move with the character.i have a character that can fly...and when the character goes upward the background moves down to expose sky..then eventually black space with stars also i want the background to stop..like when the background ends.

View 2 Replies

ActionScript 2.0 :: Nav Button States - Button To Stay In It's Active State Until Another Button Is Clicked

Dec 17, 2004

I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:

[Code]...

View 2 Replies

ActionScript 3.0 :: Continuously Moving Background On A Website?

Aug 12, 2009

How would I go about making clouds continously move across my website as a background?

View 4 Replies

ActionScript 2.0 :: Moving Background With Invisible Buttons?

Jan 12, 2011

I'm somewhat stuck in a project that I have to deliver next Friday. Thing is... I've got to code a webpage like The Killers Band webpage with a panoramic picture moving according to your mouse movements.

I've tried several things already, but I had no success yet. (Everything must be coded in AS2.0, and I'm using Flash CS3 to cover the project).

All I have is the panoramic picture, which I might be able to upload if you ask me to.

Additional info:

I've already converted the background picture into a movie clip symbol. Also, if I ever have to send the picture to anyone, I'll send it as a Private Message, since I can't post links yet.

View 9 Replies

ActionScript 2.0 :: Moving Background Navigation On Site

Aug 30, 2005

New to this forum, but was wondering if the moving background on this site [URL] is actionscript or just an animation. It looks very cool. I wanted to use the same effect for a school project I'm working on, I am using MX 2004.

View 4 Replies

ActionScript 2.0 :: Loop A Free Moving Background With It?

Nov 24, 2005

I've got this space background image that you can move around with the arrow keys. What I'm trying to accomplish is kind of hard to explain so I'll just give an example...

First, look at the SWF and move the background in any direction. You'll notice that the actual image is pretty small, just barely bigger than the stage itself. I want to make a script that will create duplicates of this image and place those duplicates in the right place so that you will never see the empty white space.

Ok, so say you hold down the right arrow key.. and the image moves left. Once the right edge of the space graphic touches the right edge of the stage, i want a duplicate of the picture placed so that the left edge meets the right edge of the original graphic. Keep holding right, and eventually the original graphic will be pushed off the stage. I'd then like for that graphic to be removed, and for the whole process to repeat itself while moving the picture.

View 1 Replies

Creating A Background Which Moves In The Direction That Cursor Is Moving?

Sep 8, 2009

so i have a project where i will be making a website. I will be using flash to make it interactive and visually appealing. I found a website with a really cool entrance page,please view it he mouse moves, the background looks like its moving.

View 3 Replies

Web Development :: Build A Website With A Moving Video As A Background?

May 26, 2010

Trying to build a website where the background of the site is a video and then there would be an actual html page laid on top of it.

View 4 Replies

ActionScript 3.0 :: Moving Background Based Mouse Movement (Parallax)

Dec 2, 2009

I found this AS2 tutorial online but I'd like to achieve this in AS3. I tried transcribing but the setProperty is throwing me off.

[Code]...

View 7 Replies

ActionScript 3 :: Music Playing Repeatedly In Background While Moving Between Frames

Feb 13, 2011

I developed a website using flash with Actionscript 3. I included a music as a background for the website and the music will loaded when the site loaded. But the problem that when I click buttons to move between pages(frames) then go and click button_01 the music will play again so I will have music playing more than one time in the background and the sound_btn will not work any more so even I click sound_btn the music will not stop. The code I'm using is listed down. What I should modify to not allow the music play more than one time in the background while moving from one page(frame) to another.

stop();
//number that is redefined when the pause button is hit
var pausePoint:Number = 0.00;
//a true or false value that is used to check whether the sound is currently playing
var isPlaying:Boolean;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Control 9 Different Background Images With 2 Smooth Moving Sliderbars

Apr 12, 2010

I am trying to figure out how I can control 9 different background images with 2 smooth moving sliderbars in three steps with actionscript.

Scenario:

slider 1, step 1 + slider 2, step 1 = picture 1
slider 1, step 1 + slider 2, step 2 = picture 2
slider 1, step 1 + slider 2, step 3 = picture 3
slider 1, step 2 + slider 2, step 1 = picture 4....

View 2 Replies

ActionScript 2.0 :: Movie Clip Button Up-state, Stay Up Until Clicked On Other Button?

Feb 23, 2006

how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?

View 1 Replies

ActionScript 2.0 :: Write A Code For A Button When The Button Is Clicked It Should Move To The Nextframe?

Nov 28, 2007

how to write a actionscript code for a button when the button is clicked it should move to the nextframe.

// About and smile1 button scripts
stop();
_root.smile1.onPress = function() {
if (mouse_over_smile1) {

[code]....

i have given 3 functions as onEnterFrame,onPress,onRelease. i tried all these but didnt get the result.smile1,smile2,smile3 are button instances which are declared on the monie clip.my main thing is i hav a button, when i click on that button it should go the next frame which i have declared in "gotoAndPlay(6)" method.

View 1 Replies

ActionScript 2.0 :: Movie Clip Finish Playing When A Button Is Clicked And Then Go To The Frame Label Associated With The Button

Jun 2, 2011

Anyway what I need to do is have a movie clip finish playing when a button is clicked and then go to the frame label associated with the button. I hope I'm explaining myself ok. So if I had say 4 buttons Home Gallery About Contact If Contact is clicked then I want the Home page to play (Which is a fade out) and then go to Contact Page (which will fade in). Then If Gallery is clicked then I want Contact to fade out and then go to Gallery page and fade in.

View 6 Replies

ActionScript 2.0 :: Make A Button In Such A Way So That After Clicked On It The Button Will Change Colour Indicating That The Link Has Been Visited?

Sep 1, 2004

I am trying to make a button in such a way so that after you clicked on it, the button will change colour, indicating that the link has been visited.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved