Advice On Getting A Disc To Spin When Play Button Is Clicked
hello, im new to the world of ActionScript and have done a bit of reading around it, however im still unsure of how I would go about getitng an image of a record disc to spin (in the same position) when for example one out of three buttons are clicked?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-14-2007, 12:26 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Spin Cd Disc
Hi im trying to recreate a cd rom spining and slowing down.
Ie: the cd starts static spins then slows down to static will maybe use a blur effect of image to show the content spining.
Is there a way to ease in ease out the motion using actionscript im trying to use robert penner script but not sure how to use these.
Math.easeInOutCirc = function (t, b, c, d) {
t /= d/2;
if (t < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
t -= 2;
return c/2 * (Math.sqrt(1 - t*t) + 1) + b;
};
Can this be used on a circle to get it to spin as explained
cheers
Play MP3 From URL When Button Is Clicked
Hello,
Can anyone give me the ActionScript to solve this problem.
I have a button, when this button is clicked I want it to play an MP3 from a URL somewhere on the web. In this case "
Play Movie When Button Is Clicked
I'm relativly new to Flash and I created a button (all four functions). I wanted to know how I can jump to the next scene when that button is clicked. I tried adding an action to the "down" frame of the button but the program wont allow me to. How can I accomplish this?
Play Same Movie When Button Is Clicked
I have a movie, but I want the movie to play whenever you click on a button.
Example: Whenever you click on the buttons "Home" "Products" "Enroll" and etc it will play that movie autmatically.
Thanks in advance.
Play Outro When Button Clicked
hi folks,
how will i make an outro animation play before going to the clicked button destination...
sounds quite easy but not really when you have multipule destinations...
thanx in advance....
Marius
Getting A Seperate Clip To Play When Button Clicked?
I'm not quite sure how to explain this. It's a pretty basic concept but I'm having trouble implementing it. Basically, I want the user to be able to click each of the (4) names to the left and have a biography pop up in the white square (called whiteboard)
How could I do this?
I've attached the file if its easier to explain that way. [URL, too big for here)
http://www.rednax.net/flash/partner_template.fla
Thank you!
rednax
Actions? How To..Button Syntex To Open HTML From Local Disc When Publishing As EXE?
I'm making an FLA that I want to save as an Executable file and use as a menu system to load HTML and EXE files for use on a hard drive or CD.
I've created my buttons, but can't seem to figure out what I have to enter in the Actions to open my Locally saved HTML files.
I've tried something called "Get_URL" or something like that, but it insists on throwing "HTTP:" in front for the "Index.html" file name I've entered, and threrfore tried to connect online.
My desired target is "Index.html" which I plan to store in the same directory as my FLA file once it's published as an Executable. ie: C:MenuIndex.html and C:MenuFlashmenu.exe .
Any help would be greatly appreiciated.
Thanks in advance.
I Want These MC's To Play Frame 1, 2, 3 And When They Are Clicked
Character MC's have 3 frames each.
1st frame - on rollover (breathing)
2nd frame - first click (strike pose)
3rd frame - second click (finish pose)
MENU system (only 1st frame rollover works)
http://www.artic.edu/~sdodso1/fighting9.swf
I want to make it so each of these aniamtions play when thw button is CLICKED ON
http://www.artic.edu/~sdodso1/fight4.swf
anyone have any idea? it isnt working
Play Btn Out Label When Another Btn Clicked?
Well here it goes....
Pretend a button is selected - when that button is selected it goes to the active frame which shows that the button is selected. When you click another button it currently resets itself - BUT - I want it to go to and play frame "mouse_out" and than reset itself. Below is the code I am currently working wtih:
Code:
button1.onRelease=function(){
resetall();
this.gotoAndStop("active");
this.enabled=false;
gotoAndPlay("home");
}
function resetall(){
for(var i=1; i<=4; i++){
eval("mybutton"+i).enabled=true;
}
}
button1.onRollOver=function(){
this.gotoAndPlay("mouse_over");
}
button1.onRollOut=function(){
this.gotoAndPlay("mouse_out");
}
I would appreciate any help - oh and Im pretty much a beginner when it comes to Actionscript!!
Thanks again,
RED
Spin A Button
HI All, Pretty new to flash...Couple of questions?
1. How can I spin a button in flash (360 degrees)
2. How can add fade effect to a picture?
TIA
How To Make Swf File Play When Clicked
I am working on a website for a client and there is a flash video in the header, you can view it at pageonedemo5{dot}info (I don't have enough post to directly link here yet.)
I want it to play ONLY when clicked upon, I know how to turn the autoplay off, but on the other hand my client wants to keep the video avaiable to play for people who don't know enough to right click and select play. Any help would be greatly appreciated.
SWF Only Plays When 'play' Is Clicked, Not Auto...
Hi Guys,
I have constructed an intro movie sequence, just as a place holder and to do some test etc. that has a preloader that graphically displays the download progress percentage. The trouble is from the web server nothing actually plays until you click 'play' in the Flash controls. Previewed on my local machine things are somewhat different as it works every other time (but not the first) when I click 'simulate download' in bandwidth profiler.
Does anyone know why this might be happening?
I'd be very gratefull for your words of advice!
Recording What I've Clicked And Play Back?
Hi, I was looking for some tutorial like for example, there's some Movieclips,
1. I press Record button
2. I press Stop
3. I press Play, (and it playes what I've recorded)
does anyone have this tutorial or article?? thanks a lot for your help...
please reply me, I've been post 4 questions and I got only 1 people reply within couple of days..kind of disappointed...please hep..
Mouse Over Button Spin?
Hi all, was hoping someone could point me towards a good tutorial or give me some advice on the following:
I need to create a button that looks like a sawblade, and when you mouse over it, it spins. I'm hoping that when you mouse off of it, it will slow down and stop.
Is this as difficult as it seems? thanks for any ideas!
Making Movieclips Play/Pause When Clicked
Can anyone explain to me how I can make this work?
I don't have an example, because I'm not sure how I should approach it.
Basically, I want to have it so user can click on a movieclip and make it play. When they don't click, the movieclip would be a still frame.
It's a dumb question when I write it out, but I'm still not sure how to approach it.
Thanks in advance
Play Movie Clip Wherever Custom Cursor Clicked
I am just playing around with some demo stuff...
Thanks for your anticipated replies.
Within my overall flash movie, whenever there is a "mouseclick", I would like a movieclip to play where the mouse is clicked.
As an example I am using a custom cursor, and I have created a small fireball movieclip, and given it an instance name. Whenever and wherever the mouse is clicked, I would like the clip to play at that spot.
I hope this makes sense.
I am using flash MX.
Thanks,
Pipedog
[F8] Reset Pause/play Toggle When Replay Is Clicked?
I've got a pause/play toggle button for the whole movie, and also a replay button. When I've got the movie paused, and I click the replay button, then the pause/play toggle button is out of synch (says pause but the movie is now playing).
How can I "reset" the pause/play toggle button when the reset button is clicked?
The pause/play toggle is in a two-frame mc setup.
Thanks for looking.
How Do I Play A Movie Once A Link Is Clicked And Then Move To The Next Clip?
I'm still trying to figure out how to do navigation and what not in flash. I know how to load a particular scene and have everything move into place like I want it to, but what I want to do is when you click on a link (we'll say "print") I want it to do another animation and then go to the "print" scene in the file. Hopefully that made since. How would I do that? A very simple example of this would be: http://www.dvdsgn.com/index_flash.htm . Upon clicking on a link, the top picture fades out and then fades in the next page. The fading out part is what I'm trying to figure out.
Display Movie-clip With Image/text/button ..when Clicked On A Button
We had generated a template.
Template has 2 area
Buttons on left and right had side area is blank
on click of button we want to display a movie-clip having image/text and buttons for nvaigation.
We found that on click we can display the movie ...it displays image text is not diapled. Also we want to display buttons on the same.
Your help is great value addtion to us.
Thanks in advance
Ramesh
Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}
on(release){
_parent.gotoAndStop("about");
}
There's my button code. Now a rundown on my delima.
I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.
Please help!! Thanks
Text Field Over Button Prevents Button Being Clicked
I'm trying to create a custom button class that lets you specify some simple parameters, including the text that goes on the button. However, the text field blocks the button (because it's on top of the button), and so the even listener assigned to the button doesn't detect a CLICK event.
I've read about setting mouseChildren = true, but that works for other display objects and isn't an option for a TextField instance.
Can anybody tell me what I'm missing here. And also, is there a different way of going about having some sort of customizable button that might be better?
If it helps, here is my basic class. An instance of the class is instantiated with:
var btn:ButtonSimpleText = new ButtonSimpleText(120, 20, "Button Label");
addChild(btn);
CLASS BELOW
Attach Code
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class ButtonSimpleText extends Sprite {
public function ButtonSimpleText(w:Number, h:Number, labelText:String){
// Button
var button:SimpleButton = new SimpleButton();
var up:Shape = new Shape()
up.graphics.lineStyle(0,0xFFFFFF,1);
up.graphics.beginFill(0xCC0000);
up.graphics.drawRect(0,0,w,h);
up.graphics.endFill();
button.upState = up;
button.overState = up;
button.downState = up;
button.hitTestState = up;
button.addEventListener(MouseEvent.CLICK, clickListener);
// Text format
var tf:TextFormat = new TextFormat();
tf.font = "Arial";
tf.size = 12;
tf.bold = true;
tf.align = TextFormatAlign.CENTER;
tf.color = 0xFFFFFF;
// Text label
var label_txt:TextField = new TextField();
label_txt.selectable = false;
label_txt.text = labelText;
label_txt.width = w;
label_txt.setTextFormat(tf);
var btnHolder:Sprite = new Sprite();
btnHolder.addChild(button);
btnHolder.addChild(label_txt);
addChild(btnHolder);
}
private function clickListener (e:MouseEvent):void{
trace ("Click");
}
}
}
Make Button GotoAndPlay When Another Button Is Clicked
ok. next dilemma.
once the button is pressed it stops on frame 16. there will be several other buttons. what i'd like to happen is that when another button is pressed the previous button that was pressed (which would currently be on 16) will gotoAndPlay frame 17 which animates it and makes it known to the user that they have already clicked it.
here is the code i have right now which all it currently does is make the frame stop on 16 when it is clicked. i'm not sure what the best way to go with the code on making it jump to frame 17 when another button is clicked. i've included the fla file for reference.
if i used something like:
if (button1._currentframe==16)
gotoAndPlay(17)
then i would have to create this code for every instanced button...which could be time consuming if there are around 30 buttons or so.....
stop();
this.onRollOver = function() {
this.gotoAndPlay(2);
}
this.onRollOut = function() {
this.gotoAndPlay(3);
}
this.onPress = function() {
delete this.onRollOver;
delete this.onRollOut;
this.gotoAndStop(16);
}
If Button Has Been Clicked...
I know there's something that can do this, but I just don't know what it's called... Here's what's going on:
I have music changing throughout the entire movie. It changes whenever it gets to the frame, and the frame actions tell it to change to a certain song. Now, this makes it a little difficult to have an on / off feature for the radio. Basically, when the user clicks the "off" button, I want some variable or something (I'm horrible with actionscrip terms) to be set to a certain number (let's just say 0 is off, 1 is on in this example). When the movie reaches the frame that starts the new music, I would like to make it have a choice. If the certain variable is set to 0, it doesn't start to play the music. If it's set to 1, it plays the music as normal. I also want the movie to start out with the variable set to 1.
Yes, I know, I need to work on my actionscript vocabulary... But does anybody understand what I'm trying to do? If not, let me know, I might be able to set up some sort of .fla example. Thanks for any help!
Button Has Been Clicked
If I could kick myself in the head I would.
I am trying to create buttons that will change their appearance after they've been clicked. Just like when you click an html link, that link has now changed color to indicate it has been clicked.
I've tried for weeks now and keep coming up against a brick wall.
Why is there no simple way to do this, a component, something?!
I've come close by making a MC that has 2 frames and two buttons, one click brings you to the next frame. If I place that MC on the stage it works. However when I place the same MC on the stage and attach code to it:
on(press)...
the buttons in the MC are no longer active?
Turning grey.
please help......
B
Button If Not Clicked
Is there a possibilty to make a button, and give him the action that if there's not clicked in (example: 10 seconds, or 250 frames or what ever) the button plays the action?'
Thx in forward
Want To Allow Button To Be Clicked Only Once.
I searched but couldn't find anything like this, so I thought I'd just ask. Apologizes if it's been explained before! Just so you know, I'm still using Flash 5 (sad, I know.)
This is probably a simple problem to solve- I have a few buttons for navigation, and when someone clicks on one of the buttons I don't want the button to be available to be clicked on again until you're back on the main menu. How is that done? Any help greatly appreciated!
Button Clicked
I want to add a text when a button is clicked. I try to put the additional text on the Hit Event of the button, but it doesn't work, can Anyone help, please?
I Need A Pop-up Box To Appear When A Certain Button Is Clicked...
My current project is a site for my band.
I have 6 links, all of which work wonderfully.
-EXCEPT the "E-MAIL" button.
All the other buttons envoke simple timeline shifts.
But I would like the "E-MAIL" button to simply open a new window that makes the user ready to email my band, by just typing in their message (and return adress) then clicking "SUBMIT".
I know this might be a lot to ask of some one so...
THANKS TO ANYONE THAT CAN HELP ME...
Thanks,
XAQ
If (button Was Clicked)
i want to write somthing like this:
if(_root.nextbtn[[onrelease]]){
this.gotoAndStop(gotopage);
}
else(){
play();
}
how would i do this
thanks!
austin
Which Button Was Clicked
I'm making a set of buttons from xml...each button is corresponding with a picture in a photogallery...
Code:
for (var i:Number = 0; i < intSlideCount; i++) {
var newThumb = this.addChild(new Thumb());
newThumb.x = X + (SPACE * i);
newThumb.y = Y;
newThumb.theNum.text = i + 1;
newThumb.addEventListener(MouseEvent.CLICK, onClick);
}
Here is my onClick listener...
Code:
private function onClick(e:MouseEvent):void {
if(slideTimer.running) {
slideTimer.stop();
}
slideLoader = new Loader();
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
slideLoader.load(new URLRequest(xmlSlideshow..image[????????].@src));
}
i can't figure out how to get the button to correspond with the correct picture... hence the question marks...please help
Play Button+ 1loop +play Button Again (the Definitive Question)
Hi!
I´m using the attachSound method in my movie. I have a play button and a stop button. When you click on the play button a sound begins to play. And the stop button stops it. After this,if you click on play button again, the sound begins. Here´s all right. I use the following code to avoid the sound plays more than once at same time if you click on play button while it´s playing:
Code for play button:
on (press) {
if (!playing) {
sound1.start(0, 1);
playing = true;
}
Javascript Button Needs To Be Dbl Clicked, Why?
I am adding a javascript button. The purpose of the button is to go back. I have the following script and it is needing to be clicked twice before actually going back to the previous page. I have tried it with and with out the onclick in the code and nothing has changed. Can you help? Thanks in advance, I am desperate...
This is the code i have tried, both with the onClick and without:
on (release) {
getURL ("javascript: onClick(history.go(-1))", "_self");
}
Run 2 Movieclips When Button Is Clicked.
ok here is my problem...it is simple i don't know why i can't figure it out ! When i click on a button i need my movie to run 2 movie clips, but i totaly forget how to use the _root. command. Could somebody please help me . Thanks for your time .
Actions After A Button Is Clicked
what code and procedure would i use to do this:
i have a set of buttons that will each show up a new movie clip. i have each different movie clip on a different layer. how would i make it so when you click on a button it will go to the next movie clip, but before that it will play, say the 10 frames of the movie clip that is already visibile? what i have is squares that basically fade in, then i want them to fade out on the exit. thanks.
Wich Button Was Clicked?
Hi!
I've made a small flash application where the user answers a couple of questions and the result is a graph. At first the user was supposed to answer the questions as fast as possible with no option to go back (and change the answer). The only way to make changes was to start from the beginning.
My problem now is that my boss have changed her mind and wants to have the possibility to go back and to be able to change the answers.
There's no problem to make the back-button and so on. The problem is the variables. When the user clicks the back-button and the application jumps back to the previous scene the state of the different buttons goes back to the default, unclicked state and the user cannot see what answer they have given. If they give the same answer once again the variable for that particular question is doubled. All buttons are movieclips and have different instance names. When a button is clicked the button-movieclip jumps to either a "clicked state" or a "unclicked state". The clicked state adds value to the variable and the unclicked state subtracts the same value.
I need to know wich button was clicked so I can use an array to "remember" the buttons state and the value of the variable so the user can change their mind and their canges are reflected in the variables ...
As there are 80 questions, I don't want to have 80 different
buttons. Now I got four different buttons for the four alternative answer possibilities.
So, how can I trace wich button that was clicked, and remember it.
Eh ... sorry 'bout the long question, but I wanted to make myself clear. ( I think I failed though ... ) If anybody understands what I'm asking and don't fall asleep while reading it, please help me.
Thanx
/
Can Button Do A Different Command After Being Clicked Once?
Can a button know if it's been clicked before, and if it has, do a different function the second and all subsequent clicks?
For example, the first time a button is clicked, I want the user to be taken to a specific frame where an intro MC sits. Lets call this frame 10 for discussion sake. If a user has already clicked the button once, visits somewhere else within the site and decides to come back, I don't want them to have to view the intro MC again, I want them to bypass it and go to frame 11.
Is this possible, if so how?
Thanks!
Button Only Works When Clicked Twice
I created a simple button which works fine in the .fla file. It has a "go to frame 2 and play" action. Whenever I export the file, the button does not work on the first click. It shows the down state fine, but you have to click twice to activate the action.
Please help.
Yes, I'm more or less a beginner.
Hide The Clicked Button
in Director, you can use 'Me' to call on the object that has been clicked, dragged, whatever...
is there a way to call on an object in flash in that same way?
for example, i'm wanting to have a button disappear once it is clicked. thing is, i have 25 buttons on the screen with different instance names.
i could go to every button and put in 'button01._visible = 0;' but there's gotta be another way.
something like...
Code:
on (release) {
me._visible = 0;
}
Button Needs To STAY Clicked
I'm creating multiple swf palettes for a project in Director, and the navigation is multi-tiered.
it's important for each button in a palette that the user clicks to stay down until they click another button in the same palette. Please don't tell me I have to do this through the timeline...
Hope someone can help.
|