Button Not Animating
my button animation works if you leave it to complete before rolling on/off.
if i roll on/off i get a response in the output window all the time. If i rollon and off before the animation has finished it works fine and fades in then out. but if i do this but rollon again before the rolloff has completed the button is clickable and effectivley rolled over but not in the rollon state.
this is the code
Code: on (rollOver) { trace("rollover") play(); } on (rollOut) { trace("rollout") onEnterFrame = function () { prevFrame(); if (_currentframe == 1) { delete onEnterFrame; } }; } what did i do wrong? any comments or further explantation required please post!
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-31-2006, 06:23 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Animating A Button
someone please help, this is killing me!!!
i'm making a button with an animate mouse over- i made the movie clip and the button, put a keyframe in the button's 'over' state, but i cannot get the movie clip into that frame- it says you cannot place a symbol inside itself.
How do i get the movie clip into the 'over' state of the button????
[F8] Help Animating Button
In the attatched movie, i want to animate the top purple button, which has a movie clip in the second frame of the button.
On rollover I want the frame 'start' in the movie clip to play, and on rollout I want the frame 'middle' to play.
I have tried various AS but it isnt workking. Please Help.
Thanks
Animating A Button
Hello, basically, this has been troubling me for quite a while. I've searched the web, and I've bought Flash CS3 for Dummies, just for it, but I see can't seem to solve the problem.
I'm trying to animate a button in flash, it's a bitmap which I have imported, and I am attempting to make the button fade in, fade out, once the mouse goes OVER it.
I have made it into a movieclip, then a button inside that, then on the button OVER state, I have turned it into a graphic, and tried to do it there, but alas, nothing happens when I test the movie.
I realise this is a stupid question, and there's quite a few examples on the web (I've tried quite a few, but they all seem to jump to various parts which leaves me bewildered). Any help on what I'm doing wrong would be greatly appreciated, as I have been trying to do it for a month or so now.
Thanks!
Tommy
Animating A Button?
I'm trying to make a simple button that onRollover animates. It does not
work right
Here is what I have done:
- Created a button
- Created a MovieClip
- Dragged both to the stage on separate layers
- put this code into my actionscript window on a separate layer on the
first frame of the stage:
function showGraphic(event:MouseEvent):void {
mSymbol.visible = true;
}
function hideGraphic(event:MouseEvent):void {
mSymbol.visible = false;
}
btn.addEventListener(MouseEvent.ROLL_OVER, showGraphic);
btn.addEventListener(MouseEvent.ROLL_OUT, hideGraphic);
- I named both instances on the stage
- I placed a stop action on the first frame of the movie clip
1. Does this seem right? Am I doing anything wrong?
2. What is the AS3 to place on the last frame of the movie clip to tell
it to go back and play the first frame again?
Thanks!!!!!
Animating A Button
Hello. This sounds (to me) so easy that i cant really belive im asking it , anyway here goes.
I have a button already on the stage that when you (release) it, several things take place.
I would like the button itself, when it is (release)d , to move to the right a little bit. So therefore, i want to animate it.
How do i convert it to a movie ? do i need to ?
when i ihave tried to convert to a movie, i cant seem to make it (stop), so on the .swf it just starts running through its different buttons states (flashing and doing all kinds of wickedness)
yes i did a search for this here and to no avail.
help please ! thanks !
Animating That Darn Button
thanks evan, i finally figured out what i was doing wrong-
the tutorials never said that i have to copy the button onto the stage in the over state, THEN convert THAT to a moive clip and edit from there i was just making the movie clip first and then trying to drag it over to the stage-
got some buttons to animate...
peace
Animating Motion Using A Button
hello again,
what code would i use to ease a draggable movie clip from its current location (wherever it may be on the stage...because it is draggable) to a predefined location using a button as the trigger for this action.
-i know how to code the dragging of the movie clips
-but i dont know how to code the button triggered animation
-if possible i want this movieclip to ease into its new location rather than linearly tween.
thanks for your help...
Smooth Animating Button
I'm trying to created a more smoother animated button with actionscript but I don't understand how these script are used. Please help
1st Part
onClipEvent (load)
{
num = 2;
}
2nd Part
on (rollOver)
{
if (_root.link != num)
{
gotoAndPlay(2);
} // end if
}
on (releaseOutside, rollOut)
{
if (_root.link != num)
{
gotoAndPlay(11);
} // end if
}
on (release)
{
if (_root.link != num && _root.animation == 1)
{
_root.misc["item" + _root.link].gotoAndPlay("s2");
_root.animation = 0;
_root.link_prev = _root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.link = num;
_root.pages001.play();
_root.scroller.scroller.gotoAndStop(3);
} // end if
}
Animating A Button & Actionscripting It.
Hi,
I hope there is a simple enough solution to this. But I've been trying to get this aspect of my website to work for a while now.
What I'd like to do is:
1) Have a button that changes appearance on rollover, but doesn't change back if mouse if off. It would change on rollover of a different button.
2) Give that button the ability to play a separate movie animation.
The theory is that the button has many fields, when you rollover the fields the button's appearance changes to a different angle, giving it a 3D interactive aspect. Not only does the button change it's appearance but it takes the user to a different section of the website.
Below is a link to my main site file. It has a functional button with only the essential button frames working.
http://users.tpg.com.au/johnknee/ZygoSiteV8.fla
Here is a link to an example of how I want the button to work and look like, with more frames.
http://users.tpg.com.au/johnknee/ButtonSampleV8.fla
I'd appreciate anyone's input...I'm really stumped. I think I've gone about this the wrong way, but I'm not sure 'cause I'm not the best at Flash.
Thanks.
Animating The Down State On A Button
Hi, I have a movie clip that I have attached to the down state of my button.
I would ideally like the animation to continue playing after a single click (at the moment the animation stops when the user stops pressing the button).
Does anyone know how I can achieve this please?
Thanks
Animating Function Generated Button
below is some script which i am using to create a submenu, i have been trying to add to it to make the buttons 'slide out'
(i.e. one moving to the right into a position then generating the next button where the first stopped and sliding to a new position and so on..)
i've been trying to use the setInterval command with no joy and am wondering if im barking up the wrong tree.
can anyone point me in the right direction?
// generate submenu
function gensubmenu() {
_root.attachMovie("submenu_mc", "submenu", 2, {_x:50, _y:200});
for (n=0; n<_root.selectedCount; n++) {
_root.submenu.submenuItem.duplicateMovieClip("subm enuItem_"+n, n);
currentItem = _root.submenu["submenuItem_"+n];
currentItem.labelName = _root.selectedNames[n];
currentItem.frameName = currentItem;
if (n != 0) {
prevItem = _root.submenu["submenuItem_"+(n-1)];
currentItem._x = prevItem._x+(prevItem._width-prevItem._height);
}
}
_root.submenu.submenuItem._visible = false;
}
Help Animating Movie Out On Button Click
I am having trouble finding a tutorial on unloading movies. I want to be able animate a currently loaded movie, on a button click, off the stage before the next movie is loaded. Do I use the laodmovie unload movie actionscript or is there another way of doing this.
1 Button Animating More Than One Movie Clip?
Hi,
Brand new to flash, but I can't figure this out.
I have two buttons that I want to animate several different movie clip objects.
I figured out how to have them work with one, but can't figure out how to switch from one to another.
How do I select movie clips for the buttons to animate onclick?
Thank you.
Custom Button Class - Animating
Hi
I've been trying to make my own, custom button class. I've managed to make it almost as I wanted, but now I've ran into an issue.
Problem:
I have a class PButton which draws my button instances. I'm creating the button in a movieclip called PButtonMC (inside the PButton constructor):
Code:
PButtonMC.graphics.beginFill( col );
PButtonMC.graphics.drawRect( bX, bY, bW, bH );
PButtonMC.graphics.endFill();
PButtonMC.name = PButtonName;
addChild( PButtonMC );
So far, so good. However, I want to animate this button, therefore I made a new movieclip called PButtonMCOver which I added as PButtonMC's child:
Code:
PButtonMCOver.graphics.beginFill( 0xFF0000 );
PButtonMCOver.graphics.drawRect( bX, bY, 2, bH );
PButtonMCOver.graphics.endFill();
PButtonMC.addChild( PButtonMCOver );
When I rollover this button, I want to have a tween which adjusts the scaleX property of PButtonMCOver, is there anyway I can do this from my document/main class?
Right now I have
Code:
buttonTest = new PButton( "Test", 0, 32, 150, 15, 0x000000 );
buttonTest.addEventListener( MouseEvent.MOUSE_OVER, btnOver );
and..
Code:
public function btnOver( e:MouseEvent ):void
{
switch( e.target.name )
{
case "Test":
var TestTween:Tween = new Tween( whatToPutHere?, "scaleX", Strong.easeOut, 1, 1.1, .3, true );
break;
.
.
.
}
}
Nifty solutions are greatly appreciated
One Button Animating 2 Externally Loaded SWF's
Hey,
I've got a Flash website, where i have 6 movieclips coded as buttons with actionscript 2.0
Code:
b1.onRollOver = function() {
...}
b1.onRelease = function() {
...}
b1.onRollOut = function() {
...}
I have coded a function to each button, when the user clicks a button (onRelease), the flash loads a external SWF and plays it. Each button has a corresponding SWF it plays when is clicked on.
I was wondering how could i do the following thing:
When a user clicks on another button, the current SWF plays like another 30 frames (for text to fade out) and then immediately loads the one that the user has clicked, and plays it.
so, for example:
1.) Website loads, and default SWF loads and plays
2.) User clicks a button
3.) button maked current SWF play, and when current SWF reaches last frame, it loads the corresponding SWF of the button.
This would have to mean, that one button is able to animate any external SWF which is currently loaded, and then its corresponding one...
Is it possible, or is there another way around it?
Hope you guys can help me out
Thanks
Cya.
Flash Button Animating On Top Of HTML Frames?
I have a question... I see ads that dance on top of HTML pages (ie. MSN.COM, etc) I want to do the same thing...
only the page i want the button to live on is framed.
One top bar
Then Two Columns under that top bar. The Left column being where the buttons will live.
Is this possible? Any tutorials out? Anyone have a working model I can disect?
THANKS A MILLION IN ADVANCE,
manny
Getting An Animating Button To Continue It's Cycle If Mouse Rolls Off It
Hi, I just need help on my buttons.
They are animated when the mouse rolls over them, but instead of suddenly stopping when the mouse moves away, I want them to continue the animation to the end of the cycle, just to make it look better. So any help would be great.(I did see a tutorial on how to do this somewhere but can't for the life of me remember where!)
cheers
[F8] Animating Bitmap + Text To Show When Button Pressed
Guys i am trying to do a code for my little website, using ActionScript 2.0
I would like when the button is pressed it does the following animation
http://www.aqualoungebh.com/
It does this little shuffle and then it shows the content of that particular page
I am using Flash 8.0 so Action Script 2.0
Can someone help me, or point me to some tutorials or something
I just want to implement this script
Thanks
Text Animating And Zoom Animating
Hey im a beginner at animating and i need advise on how to animate text. Like when the viewer is watching my movie I don't want a whole paragraph to come out of no where I want it like word by word or letter by letter like someone was typing it right then and there. I tried figuring out a way but the only thing was adding a key frame for each individual letter. any tips? and also any advise on how to make the text come in with flare? like fading in or coming in from the top?
Also another thing. Let's say I make a city from far away on the stage. I want to zoom in on a person (a stick figure) for a couple seconds and then zoom back out to it's original position. Is there a way I can do this without having to disassemble the city and make the person zoomed in and then make it look zoomed out construct the city from scratch again?
I would like any help please.
Thanks in advance.
Anyone Know Why This Isn't Animating?
Ok, it's a redux on the looping movie question. I've fixed all my problems except for one.
http://www.kitsunestudios.com/temps/Movie5correct.html
Here's how it should work: after the preload page (big green button) there is a set of 5 menu items on the bottom of the screen. When you click on one, the entire bar scrolls left, then launches the secondary navigation (Represented by the white box with the funny words). Everything works, except that instead of scrolling over, it jumps immediately to the final position. I've tried a trace, and it spits down a continual countdown, but does so instantly, instead of over a period of time.
Here's the animation code; frame 2 of a 3 frame Movie instance called "Control"
Code:
play ();
if ( CP > 0) {
CP = CP - 5;
setProperty ("_root.botnav", _x, _root.botnav._x - 5);
nextFrame ();
} else if (CP <= 0) {
if (_root.botnav._x<500) {
setProperty ("_root.botnav", _x, _root.botnav._x+750);
}
tellTarget ("_root.film") {
gotoAndPlay (title);
}
tellTarget ("_root.botnav") {
gotoAndStop ("active");
}
prevFrame ();
}
The previous frame in this movie is a Stop action, the next frame is a "prevFrame" action.
What this should do is count down, move the navigation over by a set amount, then go to the next frame, jump back, and repeat. When it's finished, it then resets the navigation bar invisibly, so it dosen't scroll off the page, tells the secondary "film" navigation window to launch, then reactivates the buttons.
Everything is working except for the animation. If anyone knows why this is jumping to the last frame instead of slowly moving to it's new position, I'd appreciate it.
the original FLA can be found here:
http://www.kitsunestudios.com/temps/Movie5correct.zip
Thanks in Advance!
A Little Help Animating
ok....i just got flash 5......so far.....i know how to make a circle turn into square..........make a car move across the screen.....but i want to make animations that have a lot more detail(like xiao xiao movies)......i cant seem to make a stick man kick......only move across the screen......a little help on how? i think it involves layers
Animating MC
Is there a way to animate a MC so it looks like a motion tween? If so, how do you do it? Say you have a simple square box as a MC, and you want to move it from point A to point B - in AS how do you make look like a regular motion tween?
Thanks...
Animating An Arm
Hey All...
I'm trying to animate an arm. What I need to do is get the arm (from the elbow up to the hand) to move counter-clockwise, with one point (the elbow bit) to stay still, then stop... At the same time, I need the hand to move clockwise but at an extremely slow speed, while attached to the moving bit of the arm..
Any help would be much appreciated!!
Thanks!
Animating A JPG?
I just got Flash 5.0 and I'm trying to animate a .jpg file. All I want it to do is spin clockwise. How can I do this? Thanks...
Animating My Dog
How do I turn his tail, eyes & head into separate "movies" so that they move when the mouse rolls over them? HELP! I'm going crazy!
Animating
how do i make characters in a cartoon animated like moving just an arm or elbow? do i make a movie clip for each limb?
Animating
Can anyone direct me to a good tutorial to animate a stick figure walking?
Animating PNG
anyone knows why animating PNGs or Gifs causes some pixels of the background image to flicker?
Animating W/ AS
I know how to animate a clip using actionscript but I seem to have a problem that I cant get my head around! Here is what id like to do:
There are two movieclip buttons, one that will animate a ball MC up and another that will animate it down. When you press the up button, I want the ball MC to animate up say, 50 pixels with easing, then gradually start to animate downwards until you press the up MC again. It will keep animating up as fast as you press the up MC until you get to a certain height and then it wont let you go up any further. At that point it will start coming down again. If you click on the down button I want it to do that exact opposite of the up MC of course. As fast as they can press the button, it will keep animating downwards (this time w/out easing) until they get to a certain y coordinate and it wont let you go any further. Any help would be great guys! Thanks!
Animating
I was just wandering how I start a animation. I,m new and I need 2 no where I can download a program to make flash animations prefebly a free program.
Animating
I would like to figure out to how to create the effect on the polyphonic spree website (http://www.polyphonicspree.com). Specially how to animate lines to form objects or words.
New At Animating
All I want is a program to create cartoons or movies.
If anyone has any ideas, please post them here.
Thanks,
Thethingamabob
Help Animating A Dog
I need help to animate a dog....Any one know of a good tutorial.....a good web site or even have a good fla I could look at? Thanks
Animating Jpg
OK..I'm just getting started with FlashMX 2004. I created a background with 3d text in another pgoram and saved it as a .jpg file. I imported it to the flash stage and then I added a timeline effect. I was wondering if I can add multiple timeline effects to the same image...also, I want the text only of the first logo pic to be animated, but it animates the whole jpg with the background. Also, how do I add another image and add a timeline effect? do I hafta make a new scene? When I make a new scene with the same background and a new pic it's not that smooth when going to next scene..Here's what I am aiming for...a logo wehere the text only zooms in then zooms out, I know how to do the zoom in in transform effect which makes the whole pic move and not the text only which I want....Then I want the text to zoom out or fade out, not sure which effect I want yet, then fade or zoom in with another picture, I can add the stars background and send it to back and then add the pic I want in front on top and animate just the pic there, for the other pics..I have done that before. So for now this is my problem...adding mulitple timeline effects to a jpg. How do I make the effect last longer or shorter? even when I slide the bar to slow at end, it's still a bit too fast. I'm sorry I made this post as long as I did, but I need some help with these things. Also I will be using mp3s playing while the images are loading. I know how to add the sound, it's just that I want the mp3 to keep playing while the images are on screen with the effects applied to each one. So far I get the audio with the pics, but can't add a new timeline effect to the 2nd pic I use unless I make it a new scene and then only part of the mp3 will play and it goes to the next scene. Hope someone can guide me on my way with this. Being a newbie I have a lot of stuff to ask.
Animating A .gif
I'm trying to animate a .gif for an AIM icon in Flash.
Everything works just fine, except for the text. It looks hideous and completely illegible.
I was wondering what my publish settings should be or how the text should be? I noticed that it really screwed up when I tried using static text or any text that was selectable.
Age For Animating
about what age do you think most poeple start or should start using things like flash animator
[F8] Need Animating Help
So I have a question about creating a growing animation. Basically my navigation has straight lines that go into a rounded curve. I want the mousover to animate the bars starting from the straight part and into the curve. Anyone have any expereice with this? I want it to be as smooth as possible. Some of the curves come back around (see the attached example), and I think that is what is so hard for me to get my head around.
See Example
THANK YOU
Animating With AS2
Hey I'm trying to create this animated interface where when you click on each paper, it'll rotate out and load some content, and if you click it again it will go back. I'm only up to the rotating part. This is really just an experiment so that I can learn. Anyway, it all works well, but only once. It goes out, you click it again and it goes back, but if you click it again it just kind of jumps around instead of repeating the process.
Also, I may be getting ahead of myself, but I'm sure you'll notice that the mcBluePaper is clickable even behind other mc's. I'd like only the visible parts of the mc's to be clickable.
I'm really new so there's a chance that I've just done everything in some weird backwards way that isn't working out, so thanks ahead of time.
http://jtnatoli.googlepages.com/papers.fla
Flash 8
[F8] Help Animating
i just got the trial version of flash cs3 yesterday so i can try to make some animations...i searched for tutorials on google and only found how to make something slide across the screen...I'm trying to make something like a stick figure walking...if anyone can help either post here, or you can message me on xfire if you have it, names the same on it...thanks guys
Animating Out
im working on my website and i have 5 buttons that go to five different scenes and each scene animates out. So say for example, everytime i press a btn i want it to animate out- no matter which btn is press.( if currently on scene 1- and i press the scene2 btn, i want it to use the scene1 animation- out. if its on scene 5, and i want to play scene2, i want it to use scene 5- animation out?
can someone please help.
i tried setting up a simple variable, but after pressing the btns more than once, it would randomly go to different scenes- but it did play the animation "out" -scene.
Animating
lo all.
im tryin to animate a pencil/paintbrush to draw/paint the intro for a site.
http://www.kaoss.org.uk/drawn/
if youve got 5 mins take a look at the link. thats what i got so far, im usin shape tweens and such. the problem is the frames/layers are buildin up and im strugglin to keep the pencil/lines in sync.
anybody got any tips/hints/links for a source on how to do this in a more efficient/simple way, i feel like im goin the wrong way about it and wastin precious time!
ne help much appreciated...
kev.
Animating With XML
Hey people,
Basically I just want to use an XML file to animate a symbol.
So the pseudo code is this:
Code:
on each frame
symbol.angle=reading[counterID].angle
counterID=counterID+1
XML file:
Code:
<reading id="1">
<angle>10</angle>
</reading>
<reading id="2">
<angle>10</angle>
</reading>
<reading id="3">
<angle>10</angle>
</reading>
Many thanks for any help!
Marc
Animating An Arc In AS3
hello,
i need to animate a sprite in an arc motion using dynamic start and end positions at runtime. hopefully with an easing function at the end of the path. since i'm not animating in a straight line i don't think i can use Tween since that class doesn't seem to support anything but a straight path. nothing's in the timeline. actionscript only.
any advice as to the best way to do this? is the Animator class using XML the best way? can i use the BezierSegment class? can i create a custom easing function for Tween and get an arc path that way?
the tough thing about using an XML doc is that i have to calculate each keyframe at runtime since i don't know the start/end points at compile time. that's an option but i'm wondering if there's a simpler way.
any advice appreciated.
thx
michael
Animating An Arc In AS3
hello,
i need to animate a sprite in an arc motion using dynamic start and end positions at runtime. hopefully with an easing function at the end of the path. since i'm not animating in a straight line i don't think i can use Tween since that class doesn't seem to support anything but a straight path. nothing's in the timeline. actionscript only.
any advice as to the best way to do this? is the Animator class using XML the best way? can i use the BezierSegment class? can i create a custom easing function for Tween and get an arc path that way?
the tough thing about using an XML doc is that i have to calculate each keyframe at runtime since i don't know the start/end points at compile time. that's an option but i'm wondering if there's a simpler way.
any advice appreciated.
thx
michael
Animating Car.
I designed this car in flash. and Im having trouble on animating it to look like its moving can someone help me.
Help With Animating
Hi,
I need to illustrate via an animation how a frame opens and closes. I've done two rough illustrations of an opened and closed frame (it's just a frame that holds images) in Illustrator. I'm sure that if I want to show the four sides opening from the closed position to the fully opened position that I'd need to create the inbetween frames but I'm not sure how to go about this in flash.
I've uploaded the two rough illustrations here: http://www.officelinkonline.com.au/testimages.htm
... if anyone's interested in taking a look.
Can someone tell me how I'd go about making the animation work?
Thanks for any help offered.
Animating
hey ive been using flash for a few years but never bothered really getting that into it i make pretty basic sites etc anyway i wanna make a animation of a just a arrow coming in and forming just 2d very simple but i dont have a clue animation has never been my strong point haha anyway just wondering how i do it and any sources that i coulduse to learn to animate and stuff
cheers
-Tom
[F8] Animating Via AS
Is there an easy way to animate multiple movieclips without using a lot of functions and setInterval??
I want an animation to start and before it's finished another one starts, right now I'm using a ton of functions and setInterval but I'm sure there's a cleaner more efficient way to achieve this.
can anyone please enlighten me?
Animating Arm
hi guys,
i have the following image (attached), basically i want his arm to move to simulate he is conducting..can someone please advise me on how to do this..
thanks guys
andy
|