Acition With Action Script
How do I use action script to move a MC or graphic from one position to another, smoothly.
Can someone give me some code or somewhere to start???
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-04-2001, 02:08 AM
View Complete Forum Thread with Replies
Sponsored Links:
Action Script Question: Where Is The OnRelease Action In The Action Folders
I’m working on a project and I trying to make it when you click down on a button that click will send you to a point in the movie and then a symbol will play from there. I know that you need to pick the key with the button on it in the time line and then I know you need to pick the button that you would like to assign the GoToAndPlay statement on.
But what’s really messing with me is where in the heck the on release or the on mouse down statement is in the little action a book when are looking in the action window.
Any help would be much appreciated.
View Replies !
View Related
Action Script Question: Where Is The OnRelease Action In The Action Folders
I’m working on a project and I trying to make it when you click down on a button that click will send you to a point in the movie and then a symbol will play from there. I know that you need to pick the key with the button on it in the time line and then I know you need to pick the button that you would like to assign the GoToAndPlay statement on.
But what’s really messing with me is where in the heck the on release or the on mouse down statement is in the little action a book when are looking in the action window.
Any help would be much appreciated.
View Replies !
View Related
Action Script Question: Where Is The OnRelease Action In The Action Folders
I’m working on a project and I trying to make it when you click down on a button that click will send you to a point in the movie and then a symbol will play from there. I know that you need to pick the key with the button on it in the time line and then I know you need to pick the button that you would like to assign the GoToAndPlay statement on.
But what’s really messing with me is where in the heck the on release or the on mouse down statement is in the little action a book when are looking in the action window.
Any help would be much appreciated.
View Replies !
View Related
Action Script Question: Where Is The OnRelease Action In The Action Folders
Action Script Question: where is the OnRelease action in the action folders
I’m working on a project and I trying to make it when you click down on a button that click will send you to a point in the movie and then a symbol will play from there. I know that you need to pick the key with the button on it in the time line and then I know you need to pick the button that you would like to assign the GoToAndPlay statement on.
But what’s really messing with me is where in the heck the on release or the on mouse down statement is in the little action a book when are looking in the action window.
Any help would be much appreciated.
View Replies !
View Related
Action Script Replaycer, Action Script Viewer V.3,08 And URL Action Editor V.3
My friends! I urgently need the programs: Action script replaycer and URL action editor v.3 (or upgrade v.2 up to v.3).
In an exchange I can give you the programs: Action script viewer v.3,08, URL action editor v.2, SWF decompiler MX, SWF scanner v.2,63, SWF extractor, Action script obfuscator , Fla****! (deprotector), Vid2flash7t ( converter to format SWF), Fireworks (MX), Dreamweaver (MX), FreeHand (MX), Director (MX).
I shall be glad to send you any (or several) program in exchange for one or both programs which I need. And if you don't need its, send me please simply so.
My E-Mail: Flash_567@mail.ru
Flash_567@mail.ru
View Replies !
View Related
On(rollOver)action + On(release)action + Photo Transition
Okay, I'll try to describe what I want to do and probably just need help putting it together.
I have :
5 black & white photos -- all converted to MC's (bwimage1, bwimage2 etc)
5 color photos (same as b&w) -- all converted to MC's (image1,image2 etc)
5 buttons -- all converted to symbol-buttons (image1_btn, image2_btn etc)
I have the 5 buttons lined up vertically on the left side of the page. I have a spot on the right side of the page where I want the picture to be visible, the black&white version on (rollOver) and the color version on(release).
I know how to make just one of the photos appear on rollover or on release but I don't know how to change the photos from B&W to Color on the actions. I would like a transition between the photos from rollover to release (b&w to color) like a fade.
Any help is appreciated.
View Replies !
View Related
Assign Cursor Action To MovieClip Using OnRollOver Action?
Hi all
I have a cool component from FlashLoaded which lets me create brilliant 3d layouts with out much hassle. The componet uses the cursors to zoom in zoom out and pan left and right.
I dont want to have to put an explanation on the site, I would like to put some invisible mc's or buttons on the stage that when the user rolls over them with the mouse it triggers that action.
Is there a simple piece of code i can place on the buttons to make this happen?
Many thanks in advance
Greg
View Replies !
View Related
On(rollOver)action + On(release)action + Photo Transition
Okay, I'll try to describe what I want to do and probably just need help putting it together.
I have :
5 black & white photos -- all converted to MC's (bwimage1, bwimage2 etc)
5 color photos (same as b&w) -- all converted to MC's (image1,image2 etc)
5 buttons -- all converted to symbol-buttons (image1_btn, image2_btn etc)
I have the 5 buttons lined up vertically on the left side of the page. I have a spot on the right side of the page where I want the picture to be visible, the black&white version on (rollOver) and the color version on(release).
I know how to make just one of the photos appear on rollover or on release but I don't know how to change the photos from B&W to Color on the actions. I would like a transition between the photos from rollover to release (b&w to color) like a fade.
Any help is appreciated.
View Replies !
View Related
Adding Action To Button Stops Other Action.
Flash MX.....
I have two frames, there resides on the stage a button with the instance name "blabla".
First frame actionscript is.....
blabla._y = blabla._y + 1;
Second frame actionscript is........
gotoAndPlay(1);
The button slides down the screen when published, that is the desired effect.
Problem..... as soon as I add any actionscript to the button, even just two comment slashes "//", the movement stops.
I have a feeling that there is some really basic concept that is flying over my head at the moment.
View Replies !
View Related
Action Script Doubt For Changing The Action
i had used two this code to stop the movie and to play the movie
on (press) {
kk.onPress = function() {
this.count++;
if (this.count%2) {
stop();
} else {
play();
}
};
}
kk = button instance name.
it is working but the only thing is that on the very first click there is no action taking place
and on the next click onwards it is working properly
help me out to over come this.
from
aristotle
View Replies !
View Related
Button Triigers Action Only If Other Action Has Been Performed.
I need to make a button call an action only if another specific action has already been performed.
Here's the scenario:
I've got four MC's, each set up as a button, placed on my main stage and given an instance name.
Each MC has a stop action in the first frame. When the button is clicked the MC will begin to play simply by using this code:
on (release) {play();
Once it's off the screen (or no longer behind a mask I should say), the MC stops at a frame labeled "down" with a simple stop action. A few frames later, I have a frame labeled "up" that when triggered, will cause the mc to start again and the button/graphic that is off the screen will come back on the stage.
This works fine using the code below:
on (release) {play();
_root.associates.gotoAndPlay("up");
_root.services.gotoAndPlay("up");
_root.portfolio.gotoAndPlay("up");
}
However, I dont want the button to trigger any of the gotoAndPlay actions UNLESS the specific button has already been clicked and is off the stage.
I guess the code I am looking for would be something like this:
if_root.associates =("down") then _root.associates.gotoAndPlay("up");
any ideas?
Thanks
View Replies !
View Related
Passing Variables From Action To Action
Hi all Flashers!
In my Flash project I have 2 functions that has to use the same variable, they has infuence of eachother, but I understand stand variables in functions expires when the function ends. My question is: how do you pass a variable from action to action, or should I use global variables. If yes, how can I declare them properly.
For people interested to view my code. Here are some links:
http://www.eyecatchers-online.com/test/code001_temp.txt
Thanks in advance!
View Replies !
View Related
Question / MC Action (different Action By Clicking)
Hi. I am a beginner of ActionScript, and I need some help to do the Movie Clip action something like this:
(1) When you click a movie clip (say, square) itself, it moves to particular direction and stops.
(2) Then when you click it again, this time it moves to the other direction and stops at the position where it has used to be.
I would like to make this thing with all ActionScript.
I am appreciated if some of you could help me out. Thanks.
Have a nice day.
P.S.
I use Flash MX.
Karatechop
View Replies !
View Related
Delayed Action In CS3 Action Script 3.0
Hello everyone...
I've been working on a problem for three days now and have tried various forums attempting to get the answer. So..... I'm here to give the KIRUPA group a shot.
Here is my problem:
Using Flash CS3 and Action Script 3 I created a flash site with lots of pretty cool animation. On one page I have a few buttons which are linked to various urls. With my limited knowledge, the Flash CS3 Bible and the Action Script Bible I am able to get this far.
On this page, I would like to enter script for each of the buttons that will cause a delay of 5 seconds before the requested url action is taken and the user is taken to the next page. This is so the animation that is running can finish before the user is redirected to the requested url.
I hope that I've made myself clear on this issue. I've had a lot of practice attempting to explain this over the past few days.
Thank you VERY much in advance to the person who can help me with this problem.
Alasandro
View Replies !
View Related
To Run Action Script From Action Panel First
i am new in writting flash action script programming,besides being new on thi area , i have written a flash action script after pressing F9(windows-action) from flash 8 starting screen ,the action panel comes in semivissible format ,
then i select new action scriptfile from file menu ,then the action panel came out. there i have written the following:
var numM:number = 10 ;
trace("my number is" + numM);
then at the time of execution i couldn't find testmovie option on the control
menu.. so tell me how should i run the script..
View Replies !
View Related
Action Overrides Action...
i submitted my fla... pls read.
Q1.
my hitTest action in hitArea
overrides
my rollOver action of the button which controls the hitArea also.
but
i want to activate both actions, i.e. the hitTest... and on(rollOver)
at the same time,
Q2.
my button2 (in the hitArea) has an action on something else...
but as it's in the hitArea...,
when i rollover the button2, the hitTest assumes my mouse not in contact with hitArea...
but
i want my button2 works and at the same time, my hitTest assumes button2 to be a part of the hitArea...
so what should i do??
View Replies !
View Related
Execute An Action When Other Action Is Ok
hello,
i have 3 MovieClip with 3 buttons on the scenarion,
my problem is ...
I like to create an action hwo execute only when i click on my all of the 3 buttons(onRelease) and not befor ...
hiow can i do that
please i really need our help...
thanks...
_________________
dev203
View Replies !
View Related
Cancelling One Action With New Action?
hey all. here is what i'm trying to achiece.
i'd like when the button is pressed that it stays on frame 2. but the rollOut and rollOver actions are still begin activated. is there a better way to acheive this?
i've attached the .fla file.
here is the code:
stop();
this.onRollOver = function() {
this.gotoAndPlay(2);
}
this.onRollOut = function() {
this.gotoAndPlay(3);
}
this.onPress = function() {
this.gotoAndStop(2);
}
View Replies !
View Related
How To Write: Perform Action, Then Perform Action?
I have the following piece of script on a MC:
onClipEvent(load) {
startX = this._x;
startY = this._y;
move = false;
}
onClipEvent(enterFrame) {
if (move) {
this._x += (destX - this._x) / 6;
}
}
What I would like to change this script to do is: onClipEvent, after (move), saying if move = true, perform the following operation THEN make move=false.
anyone know how I can write this? so that after move = true an action is performed (the MC moves to a destination x coordinate with velocity), then after it gets to its destination, make move = false.
thanks so much
View Replies !
View Related
No Action Script In The Action Script Library
Ok... so for some reason in Flash all the actions in the actions panel library aren't displaying. it just says index. I uninstalled and reinstalled several times. no dice. I looked through the files and the XML doc for the actions is there. Flash just isn't displaying them. I don't know what else to do. got any ideas?
View Replies !
View Related
Action In One Clip Calls For Action In Another Clip
I'm wondering if it's possible to put an action in one movie that has an effect on a different movie clip.
more speciffically I am running one main movie that calls different other movies that are displayed on top. I want to put actions in the "bottom" movie that work as the "go to and play" action only in the movie that is on "top of" it. if that makes any sense at all.
when you click a button, the external movie clip is affected. is that possible?
View Replies !
View Related
Action Script 3.0 Covert To Action Script 2.0
OK....so I'm a newbie on this site but have a serious flash problem and was wondering if someone would be so kind to help me out. Here is my problem:
My site is built in (AS)3.0. I got to the end of building it and realized that the component(slideshow pro) that I wanted to use for the photo gallery is not 3.0 compatible, it needs to be 2.0.
So I figured this leaves me with two solutions, one easy way and one hard way. The easy way is to pull an external .swf (as2.0) file in a (as3.0) file. I couldn't get this way to work correctly though. The hard way to fix this problem is to convert the actionscript from 3.0 to 2.0. I couldn't find a generator or any software that could help me automatically do this(so if anyone knows of one please let me know).
Here is the code:
stop();
import flash.ui.Mouse;
import flash.display.MovieClip;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
var homeX:Number = -1660;
var homeY:Number = 963;
var newsX:Number = -676;
var newsY:Number = 963;
var aboutX:Number = 214;
var aboutY:Number = 963;
var xTween:Tween;
var yTween:Tween;
var inTween:Tween;
var outTween:Tween;
xTween = new Tween(main_mc,"x",Strong.easeInOut,main_mc.x,homeX ,2,true);
yTween = new Tween(main_mc,"y",Strong.easeInOut,main_mc.y,homeY ,2,true);
inTween = new Tween(main_mc.home_mc,"alpha",None.easeNone,0,1,.5 ,true);
outTween = new Tween(main_mc.home_mc,"alpha",None.easeNone,1,0,.5 ,true);
xTween.addEventListener(TweenEvent.MOTION_FINISH,f adeIn);
xTween.addEventListener(TweenEvent.MOTION_START,fa deOut);
home_btn.addEventListener(MouseEvent.CLICK, navigate);
news_btn.addEventListener(MouseEvent.CLICK, navigate);
about_btn.addEventListener(MouseEvent.CLICK, navigate);
function navigate(event:MouseEvent):void
{
if(event.target == home_btn)
{
setTween(homeX,homeY,main_mc.home_mc);
}
else if(event.target == news_btn)
{
setTween(newsX,newsY,main_mc.news_mc);
}
else
{
setTween(aboutX,aboutY,main_mc.about_mc);
}
}
function setTween(tweenX:Number,tweenY:Number,tweenMC:Movie Clip):void
{
xTween.begin = main_mc.x;
yTween.begin = main_mc.y;
xTween.finish = tweenX;
yTween.finish = tweenY;
tweenMC.alpha = 0;
inTween.obj = tweenMC;
xTween.start();
yTween.start();
}
function fadeIn(event:TweenEvent):void
{
inTween.start();
outTween.obj = inTween.obj;
}
function fadeOut(event:TweenEvent):void
{
outTween.start();
}
xTween.stop();
yTween.stop();
inTween.stop();
outTween.stop();
-If anyone could point me in the right direction it would be much appreciated. Thank you
-MH
View Replies !
View Related
How Do You Use The (If) Action?
I got a problem, I'm always getting something messed up when I try to use the If Action in Flash, It always returns the statement true, this is the action im using right now but it always returns it true so it just goes to frame 3 but its not true untill songplaying=true right?
if (songplaying) {
gotoAndStop (3);
} else {
gotoAndStop (1);
}
In another movie clip on my stage on the first frame there is a button and when you click on it it goes to frame 2 which has this code in it,
_soundbuftime=10;
song.stop;
song = new Sound();
song.attachSound(loadmovie ("MoveYourBody.swf", "../c_sound"));
song.start;
songplaying=true;
Anyone know what my problem is? Is that even how you use the Else command?
View Replies !
View Related
Get Url Action
I have a movie clip which contains a button, I have this code attached to the button
on (press) {
getURL ("http://www.parstat.com/" +stats+ "/.txt", "_root.datas");
}
Is that the correct syntax to read the stats variable and then load the txt file into the datas movie clip?
PT
View Replies !
View Related
Then Or After Action?
is there any action that is equivalent to "then" or "do after"
Like:
on (release){
gotoAndPlay (frame wahtever)
[then after that]
gotoAndPlay(some other frame)
}
??? Anyone know what I am getting at. Very confusing.
Spanks and thanks in advance.
View Replies !
View Related
What Is The Action For....
I have made a button and now the problem is that I want this button to open a folder which is location for example in my E: drive which is my CD Drive or a folder which is located in C: Drive. I have tried Get URL but I think I have not correcty written it. So please help me!!!
Thanks Alot
View Replies !
View Related
Action From One Swf To Another
I have a "nav bar" swf and "header bar" swf, both in an html page. Is there a way to send an action from the nav bar to the header bar telling the header essentially to load a movieclip.
Any advice would be helpful.
Thanks
[Edited by rudykin on 11-21-2001 at 12:23 PM]
View Replies !
View Related
Help With If-else Action
First i have an input text field. I want it so if that person enters a specific thing then it goes to a specific page for that...but if they enter something that i don't include it would take them to an error page. In other words...i need a else statment to work on like 1 if statments
Here is the code
on (release) {
if (name == "1") {
gotoAndPlay ("Scene 2", "1");
}
if (name == "2") {
gotoAndPlay ("Scene 2", "2");
}
if (name == "3") {
gotoAndPlay ("Scene 2", "3");
}
if (name == "4") {
gotoAndPlay ("Scene 2", "4");
}
if (name == "5") {
gotoAndPlay ("Scene 2", "5");
}
if (name == "6") {
gotoAndPlay ("Scene 2", "6");
}
if (name == "7") {
gotoAndPlay ("Scene 2", "7");
}
if (name == "8") {
gotoAndPlay ("Scene 2", "8");
}
}
I need to to say that if none of those inputed number equals 1-8....go to the error label thx
View Replies !
View Related
Action
Hello All:
O.k here is my question, I made a flash web site which has about 100 frames. I want certain frames of the movie let say from frame 40 to 50 to respond to viewers action for example when they hit a button they should be able to view only those frames, and if they don't hit the button I want them to be able to see the whole movie except those frames.
please let me know how to do it .thanks.
By the way I forgot to mention I want to be able to do all of this in one scene..
View Replies !
View Related
On Action
I want this to determine a mouse event over a button. But no matter what I use it on it still stays gray (not usable).
What must I do to make this available to me ?
View Replies !
View Related
Which Action Should I Use For This?
Once again it's back to the Flash gods for some help.
I have a page with 10 buttons. I want each button to call a movie clip with text in a box. There are 10 boxes of text each different. I need a script so If you press button 1, text box 1 is loaded, button 2 text box 2 is either loaded on top or duplicated. I tried with duplicate movie and it works except if you call a button that was called already it will not re appear. I used set property in another page and that was great but it was for movie instances that were exactly the same but in different locations on the stage. I know theres got to be a way to do this any suggestions?
rdee
View Replies !
View Related
IF Action
i have two input text fields, in MC 'first'
with a login button
now all the users can login with the same id en pass
so on my submit button there must be a if action
that looks if the id & pass are correct
my textfields variables are called 'one' and 'two'
one=name
two=password
i tried this action but it didnt work
on (release) {
if (_root.first.one=name) {
getURL("http://blabla.com", "_blank");
}
}
anybody who knows the solution?
thx in advance
View Replies !
View Related
Action What?
What is the best resource for learning everything about actioscripting? If its a site, whats the url? If its a book, whats the title, author, and why should i spend my money on it? Thanks alot.
View Replies !
View Related
Where Should This Action Be Placed?
Hi ---
Can someone tell me where exactly an "onClipEvent" action should be placed. I am attempting to use the following code:
onClipEvent (enterFrame) {
if (send) {
_root.Contact.sending.gotoAndStop(1);exist
send=false;
}
I have placed it in both my movie clip and along the main timeline and still receive the following error:
Symbol=Email, Layer=Action, Frame=1: Line 1: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {
Please help as I am pulling my hair out trying to figure this out.
Thanks for any and all replies.
Cheers
SDL
View Replies !
View Related
Go To Action
I've got a movie symbol and I'm trying to put an action on a button in it to go to frame one on the main timeline,
I've put this action on the button
on (release) {
gotoAndStop ("Scene 1", 1);
}
but its seems to be just going to the first frame in the movie symbol, how can i make this go to the 1st frame in the main timeline?
Ta.
View Replies !
View Related
While Action
i'm trying to create a bar graph that animates to the proper height when a user inputs a number into "text1", i've tried using both the while and for actions, when i use the while action i get an error message saying that the script is causing the movie to play too slowly so i gave up on that, when i use the for action though it doesn't animate, it simply jumps to the height. can anyone spot any mistakes or suggest another route, thanks.
onClipEvent (enterFrame) {
for (i=0; i<text1; i++) {
this._height = i;
}
}
View Replies !
View Related
Using The URL Action
Hi,
I have a flash movie which uses the get URL action to load an HTML page in a new window, and was wondering if the following was possible - its a little tricky to follow but I hope it comes across clear!
1) Is it possible to use the get URL action with many objects and open the corresponding windows in the first new window that would appear, rather than opening each and every link in a new window of its own?
2) Secondly, is it possible to get a Flash movie that was previously loaded, to load from an HTML page back to a certain frame in the movie, instead of loading back to frame 1? (Thus avoiding preloaders, and any repetitive animation?)
Thanks!
Alex
View Replies !
View Related
Action And (&&)
Hi everybody
I wnat to know that what is the use of & action in the script?
for example I have a move clip (history), on mouse over it should play till 15 frames only but on click same movie should play beyond the 15 frames, is it possible with & action?
Thanks
View Replies !
View Related
Help With The With Action...
I am using FlashMX.
I am readjusting to the 'with' action and I am having problems targeting from within nested MC's.
Here's the situation:
_root.floor_2.unit207W
this is the path and inside unit207W there is a button.
When clicked, I need it to go to a new scene.
I have this as my code, and it does not work....
The trace I set up after the path works, but it does not go to the new scene...
on (release) {
with (_root.floor_2.unit_207W) {
gotoAndPlay("unit_207W",1);
}
}
Am I even doing this right to begin with? Or is there another way????
HELP!!!!!
Thanks in advance!
View Replies !
View Related
I Can't Put An Action To A MC Help
I made a nice movie clip, and then put it in may main movie but I try to put an actin scrip but i get this:
Clip events are permited only for movie clip instances
How can I put some action scrip to a MC or make an instances of that movie clip
View Replies !
View Related
Action Help
Need HELP !!!!!!
Having a problem with a popup menu.
I have two Scene, Preloader and Main.
Main Scene has 5 labels for differnt content.
My menu is a movie clip that is on a layer in the Main scene time line.
The animation of the movie is working fine but when I click on a button to go to the main scene time line label it will not work…. The action I am using is as follows.
on (release) {
gotoAndStop("Main", "Bio");
}
If I change the action to the following it goes to that frame in the movie time line so it looks like it is never going to the main scene????
on (release) {
gotoAndStop("Main", "20");
}
View Replies !
View Related
Action Help
1. I have a clock where I want the clock to stop at 1:00 o'clock. This is in a MC.
2.There is a graphic anim in the MC of the pendelum that I want to continue playing (repeat playing) even after it comes to the end of the movie. I have tried putting an action at the end of the graphic anim indicating to goto and play frame 1 again. That makes the hour and minute hand continue also. Without getting into any intricate action, how can I do this?
Many thanks!
View Replies !
View Related
|