Simple Actionscript...
I have a movie clip called ball. how do i make it so when the user pushes control the movieclip will go to the next keyframe? thanks.
FlashKit > Flash Help > Flash Newbies
Posted on: 04-28-2003, 03:48 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SIMPLE Simple Actionscript Question
Hey guys this is an easy one, but I don't know it.
I want to create a dynamic text box that says page 1 (or just 1). And every time I click the next button (which also controls something else), it should add 1. The limit is 4 pages so, if it exceeds 4, it should back to 1.
Thanks for the help
HELP WITH SIMPLE ACTIONSCRIPT
Right, I have a movie that loads an swf into level20.
That swf then tells a MC in the orignal movie (base one) to goto a certain frame.
I have this actionscript in the swf on level 20
_level0.LOADING.gotoAndPlay("Con1");
Is that right?? _root at the beginning does not work either, I know nearly naff all actionscripting beyond simplicity so help me please
Need Some Simple Actionscript Help
Howdy.
I was busy making my site 'n stuff, when i thought of this: a fake login page. All nice, but i dont want the visitors to actually click in the box where they type their name, like the name box kinda avoids the mouse Anyone know if this is possible? And willing to help me?
PS Gotta love dan the cow
Simple Actionscript
Hi there,
How do i set the initial value of a 'button' to be invisible, and then have it appear on an event.
I got this to work when i have it as a movie clip, but not when i have it as a button?
Thank you
Ari
Simple Help On ActionScript
The following code is ment to make invisible something but amazling in the keyframe 127 is empty(?!?!) I cannot understand why! and the things it's suposed to become invisible, it doesn't! Why?
This was given to me by a third person and i cannot figure it out...
------------------------
ifFrameLoaded (127) {
_root.arvore_menus.sub_activos._visible = false;
_root.arvore_menus.sub_jovens._visible = false;
_root.arvore_menus.bandeiras._visible = false;
_root.arvore_menus.tipo_cursos._visible = false;
_root.arvore_menus.sub_empresas._visible = false;
}
-----------------------
Simple Actionscript Help
ok well im tryin to make a simple preloader as on this sites lil tutorial, well it wont accept my script or soemthing heres what i get in my ouput window
Scene=Preloader, Layer=Layer 1, Frame=1: Line 2: ';' expected
{Go to and Play (1, 1)
anyone tell me how to fix this?? i have 80 total frames in my movie, what am i doing wrong?
Simple ActionScript Q
I need to put the equivalent to this code:
on (release) {
_root.gotoAndPlay("1");
}
on a text rather than a button. does anyone know the syntax to that?
Thanks,
Simple Actionscript Help
Hello,
I am a vb/ASP... programmer and i would like to know the correct syntax for this... im close i know that much...
Code:
mc.link = _root["editor.asp?mode=editor&pageID=" +'PageID'+n];
regards,
dafunk
Simple Actionscript
so im busy mangling some action script here. what i want to do is have the user set their connection speed as being either fast or slow and then deliver content in the sections based on that.
i have set this variable to begin with
connection = "fast";
the user then has a quick choice of either clicking fast or slow before they proceed to the main menus. so i can hold onto the "fast" or "slow" thing when im in the main movie but this is the part thats messing me up.
in the movies section i have two empty movie clips. one for a large movie ( for faster connections ) and one smaller. on the movie clip i have this code
onClipEvent (load) {
if (_root.connection = "fast") {
loadMovie(traileronehigh.swf, _root.trailerone.high);
}
}
and it's not working. what am i doing wrong?
Need Simple Actionscript - Please
In creating a concentration type game online, you have to match two cards that have the same image. But when someone clicks on more than two cards, it messes everything up.
- is there an actionscript that says:
-After two buttons are clicked, no more buttons can be clicked, until it resets itself.
The way it works is, if the two cards don't match, they flip back over. If they match, they stay revealed. So I need a way to prevent people from trying to uncover more than the two cards at once (cheaters) by not allowing them to click more than those two cards.
Thanks!
Need SIMPLE Actionscript Help
Ok this will take most people 5 minutes
i need the 07bouncingball.fla file or someone to get this excerpt from a book working.
Task: Bouncing Ball
1. Start a new Flash movie. Create a movie clip that has a ball graphic inside it. See the movie 07bouncingball.fla for an example.
2. You can name the instance of the movie clip, MyClip, but our code will not depend on the name of the clip.
3. Attach the following code to the movie clip:
onClipEvent(enterframe) {
this._x +=5;
}
This code acts once per frame. It pushes the movie clip over by one pixel each frame. The result is a clip that moves slowly across the screen until it reaches the other side. It actually continues even past there.
-Ok can't get it working if you can post the .fla PLEASE!
Simple Actionscript
HI everyone,
this shud be a simple 1 to do. just forgotton how to do it.
I have a movie clip called 'opps'.
and i have a button. i want it so that everytime i press that button it shud play the movie 'oops' on top of the current scene.
Can some1 help me please
Simple Actionscript Help
Hi, I have a problem with a simple little thing I'm trying to create. I have a movie clip and all I want to do is that when I click it, it moves down until it moves to a specified position. When the movie clip is pressed again, it should move back up to some position. I want to do it all without motion tweening. I am fairly new to actionscripting so please help me out.
Here's the code I have on the actions layer:
code:
var _abc = "top";
b1.onRelease = function () {
if (_abc = "top") {
b1.onEnterFrame = function () {
yvalue = b1._y;
yvalue = yvalue + 5;
b1._y = yvalue;
if (yvalue > 150) {
b1.onEnterFrame = null
_abc = "bottom"
}
}
}
else if (_abc = "bottom") {
b1.onEnterFrame = function () {
yvalue = b1._y;
yvalue = yvalue - 5;
b1._y = yvalue;
if (yvalue < 15) {
b1.onEnterFrame = null
_abc = "top"
}
}
}
}
b1 is the name of the movie clip that needs to be moved..
I am also going to attach the fla so if anyone can help me out that would be great. thanks.
Simple Actionscript ;(
Here is my code
on (release) {
_root.homemov.dash.stop;
The movie doesnt stop! Is there a script to stop the movie at its current location on the timeframe when the user finally lets go of my button? Thanks guys!!!
Simple Actionscript
This is probably really simple, but I have virtually no knowledge of actionscript.
In Flash MX 2004 I need to make a small circle (which is already a mc) randomly 'jiggle' about or move randomly around a small area.
Can anyone point me in the direction of a tutorial or the right actionscript for this
Simple Help With Some Actionscript Please.
Below is some code to set the position of a movie clip, the movie clip being "pages". The default setting is "0" set by "desitation = 0" on the main frame. When I click buttons with "desitnation = number" it moves the movie clip up to that _y desination. The code works great if the "pages" movie clip is in the root level, but I want the "pages" movie clip to be places in another movie clicp called "works". Everytime I place pages in another movie clip the code stops working. I have tried editing the below code in all the ways I can think of but nothing works.
Can anyone look at the below code and tell me what I need to change so the code effects "works.pages" movie clip?
if (Number(/pages:_y)<Number(/:destination)) {
speed = (/:destination-/pages:_y)/14;
setProperty("/pages", _y, Number(/pages:_y)+Number(speed));
} else {
speed = (/pages:_y-/:destination)/14;
setProperty("/pages", _y, /pages:_y-speed);
}
I can email you a fla if you so request it.
Thank you so much for your time,
Dale Jacobs
Simple Actionscript...
So I have a banner I made:
www.peterjun.com/misc/rashard2.swf
This is what I want it to do:
When you click on the "player profile" have it play a certain part of a movie clip (of it scrolling up). Then when the user clicks on the image it will play another part of a movie clip (of it closing).
Right now I have the "player profile" as a movie clip "profile_mc" and the "up" label is of it going up. I have the following actionscript on actions layer:
profile_mc.onRelease = function () {
profile_mc.gotoAndPlay("up");
}
As you can see now it works when you click it once but I dont want them to be able to click it over and over and play the repeated animation. Sorry I'm kinda new to actionscript as you can tell.
Very Simple ActionScript
Hey guys, I am stuck on some simple ActionScript. I want to enter some text into a text field I have but want to do it in ActionScript. When I write my text in ActionScript, it doesn't seem to work.
I want my text to appear like this...
Hey my name is Paul
I am blah blah
ect ect ect
How do I do this, when I put text into action script like this;
Code:
myBox_mc.myText_txt.text = "Hey my name is paul
I am blah blah
etc ect";
myBox_mc.onRelease = function(){
myBox_mc.myText_txt.text = "Hey I am going now
blah blah blah
woo woo woo";
}
It didn't work .. lol .. It's probably really easy to do, but I don't have a clue
Also, one more thing, If I make a button, and want it to load a frame, how do I make it so it would load say frame 15 when it's on frame 1?
Many thanks,
Paul
Simple Actionscript Help
I am building an all flash web site for a restaurant.
I have set it up so that the main timeline will stop on a bunch of frames that are labeled "menu", "contact", etc
I want the buttons on the nav bar to set a variable named "item" to the frame lable that I want the movie to eventually jump to. Before it jumps there I want a movie clip to run that will cover the current content on the page, then have it jump to the new area that was clicked on.
my code for one of these buttons is the following:
on (release) {
item = "menu";
this.cbox.gotoAndPlay(2);
}
Then I have the movieclip cbox do it's thing and at the end of that movieclip I have the following code:
stop();
this._root.gotoAndPlay("item");
I think this should work, but it doesn't.
Theoretically I set item to = menu, so how is that line of code supposed to read that calls "item" which I want o automatically replace with the frame label name I set when the button was pushed?
Help!!!! Very frustrating syntax issue (I think)
Thanks,
Brian
Simple ActionScript Help
.
I'm not a coder and I haven't had much luck finding the answer to this...
I'm using this code below to run a flash movie -- which I didn't do as I can't code -- and want to know how to make the movie simulate that constant looping effect (using the current code below) even when the mouse is not over it? Also, how would I slow the overall speed down by altering the code below?
MY flash sample:* http://www.rupda.com/flash
Sample of what I'm trying to acheive: http://www.cbsparamount.com/television
Is it even possible?? Help!!
Quote:
onClipEvent (load){
center = 522/2;
//length of entire row of pics - movie width
lengthy = -2155.3 + 522;
}
onClipEvent (enterFrame) {
/*
//original code
if (_root.mainVar == 0)
{
homeX = (-_root._xmouse)+1000;
} else
{
homeX = (-_root.mainVar)+1000;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.mainVar == 0)
{
moveX = diffX/30;
} else
{
moveX = diffX/5;
}
_x = thisX+moveX;
*/
diffX = _root._xmouse - center;
_x -= diffX/20;
if(_x >=0){ //making sure it doesn't overscroll
_x = 0;
}else if(_x <= lengthy){
_x = lengthy;
}
}
THANKS IN ADVANCE!
.
Please, Please Help With Simple Actionscript
I've tried everything imaginable and usually my scripts always work for me, but for some reason I cannot get this to work. I know it's a really simple thing too which is why I'm so baffled.
I have a movie, that's within a movie. The trace to this movie is _level0.Gallery.galopen (flash told me this when I traced it).
I want another movie (stock) that is in the same movie as galopen (both are in Gallery but separate frames) to play -- which it does just fine -- and at the end of the movie (stock) I have a frame that has code on it, telling it to go back to galopen and stop on a specific frame (67). Why can't I do this?
I have this script on my last frame of stock: _root.Gallery.galopen.gotoAndStop("67"); and it does nothing but replay stock.
I've tried using the script with a button, it didn't work. I don't want to use a button in the first place -- I want the script on a frame -- but I tried it to see if at least the script was working, and it's not. So I'm really, really lost here. All I'm essentially doing is going from one frame in a movie clip, back to another frame in another movie clip. It sounds so simple -- I have no idea why I can't do it.
Any help at this point would be greatly, greatly appreciated. I'm about to just redesign it and go about it another way but I feel like this is such a simple thing, I shouldn't have to do that.
edit: I forgot to hit that little thing on top (I'm new obviously) that says what program I'm using. I know this can matter in some cases so I'm using Flash8.
[F8] Simple Actionscript/sql/php
I need a bit of help with some pretty simple flash/sql/php coding
Basically I've created a flash website, in which the user can submit product data to a SQL database using PHP. Now I need to display all of the data in the database in flash, using actionscript. I can echo all of product data in another PHP file easily enough, but I'm having trouble getting it to display in flash.
Anyone got any ideas on the php/actionscripting that I would need display the data in a dynamic text box or something like that? I've tried a couple of online tutorials but they all seemed to include loads of functions and crap I don't need.
[F8] Really Simple Actionscript Help
I am making a flash thing to show a percanetage of how many donations my site has received against what we need. But i am stuck with the code. Need to make it so that it works out a percentage of what i already have then resizes the progress bar.
Action script i have is:
Code:
toget = received / goal;
bsize = toget * 3.45;
pbar.width = bsize;
received and goal are dynamic text boxs and pbar is the movie progress bar
File is attached
Simple Actionscript
why doesn't this work?
Code:
f
unction fadein():Void{
this._xscale = this._xscale - 1;
this._yscale = this._yscale - 1;
this._rotation = this._rotation + 1;
}
blueboxMC.onEnterFrame = fadein;
if (blueboxMC._xscale == 75) {
delete blueboxMC.onEnterFrame;
}
All I am trying to do is take a box and shrink it and rotate it in, then when the box gets to 75 it stops
thanks a lot, just trying to learn how functions work!
Help With Simple Actionscript
I need some help with a piece of ActionScript that should be very simple to create. Right now I have an animation that is 250 frames long and I want it to loop back to frame 1 after about ten seconds. I know I can cheat and add ten seconds worth of frames to the end of my animation but there has to be a way to do this with ActionScript. If anyone knows how to achieve this I would appreciate it.
Some Simple Actionscript Help
I have the following actionscript
ActionScript Code:
if (_root.time==0) {
_root.gotoAndPlay(6)
}
it doesn't work however, the variable is exactly the same and i dont have a clue whats wrong
Cheesybanana
Simple Actionscript
I need to have 2 input text boxes in which the size and speed of something can be set....
I want it so that when speed = 1 and size = 1 I want another dynamic text box called 'overall' to be set to 57 once the user clicks a button.
Can anyone help?
Simple Actionscript Please Help...
Heya ... hope someone can help me thanks :D,
I have a movie clip mc, inside it is another movie clip mc2, inside that there is a dynamic text field = btnTitle (instance name)
I am trying to load the variables into the text field but it doesnt work....
this code is on the first frame _root.
I cannot change the structure of the the movie clips... anybody ideas ... thanks
Attach Code
function myMenuTitles(myParameterTitle:String) {
var myVarTitle:String = myParameterTitle;
trace(myVarTitle);
}
mc1.mc2.btnTitle.text = function() {
myMenuTitles("asd");
};
Edited: 02/06/2007 at 05:04:13 PM by Kaneon
Help In Simple Actionscript
Hello and help!,
I need some advice or if someone can help me program simple script, i need it for my school project:
I have to do like in this swf:
help1.swf
Move in random direction, skew larger size, and fast return to original size and place.
http://img206.imageshack.us/my.php?image=help1ng5.swf
Help2.swf
Duplicate Movie clip and form a circle.
http://www.mediafire.com/?2zh1lpexjmd
I am novice in actionscript programming, nobody to ask, and need help the soon as possibile!
I use Flash8.
Thanks!
Angelo.
Simple Actionscript
I am using a component where thumbnail pictures are enlarged when clicked. The images are pulling in with an xml file. There is also some text that is pulling in from the xml file. I would like to create a link from the text.
The files are located at http://www.anythingdesign.com/proof/files.zip
Any help would be appreciated
Simple Using Xml + Actionscript?
Simple problem, simple player.
Currently I am using an mp3 player tutorial produced by the gurusnetwork, and while it is nice, its terribly complex and not as aesthetic for my site's "minimalist" needs. So what I have done is created the basic format and a dynamic text box where I load my playlist from my stream into using xml and a simple stop and play button, curtesy of kirupa's very helpful tutorials. However this is my dilema. And this maybe very simple, but I cant find my way through it using simple trial and error. Now that I have this dynamic text box, I am having a hard time writing the code for the xml to pull up random songs from my root folder and playing them, and simutaneously displaying them in this text box. my code is as follows:
<?xml version="1.0" ?>
<songs>
<song display="Original Bedroom Rockers" url="kndoriginal.mp3" />
<song display="Everything I Do" url="Everything_I_Do.m4p" />
</songs>
Its simple. But bridging the gap is not. My player is basically this- Now Playing: "dynamic text box here" "Start/Stop" button here. I cant figure out how to make a songs load randomly into the start stop player, and have the dynamic text load those corresponding songs. And no, the text doesnt have to move or anything, just display what is being played. Anyway thats all I can think of atm. Any help would be great!
Thanks guys
Simple Actionscript
but don't know how to make it work
so I have this sqaure moves 30 frames to the left, then I have this button which if clicked will make the square goes reverse to frame 1
this is the code that i have:
Code:
this_btn.onRelease=function () {
onEnterFrame=function () {
orange.gotoAndStop(_currentframe - 1);
trace (orange._currentframe);
}
}
thanks you
A Simple Actionscript I'm SURE, Except For ME
Really simple. If someone could please help me. In the first picture I have movieclip logomovie running in frame1. In the second picture shows inside the movieclip and at the end when the clip is done running I need to go back to Scene 1 frame 2. I knows it's simple, but I'm racking my simple brain over it. The movieclip instance is already labeled and can be targeted, but I can't get it jump back.
Any help would be great.
Thanks.
MARCOS
Simple ActionScript Help - MX
I have done the tutorial 'Movement Using ActionScript' which is just what I was looking for. However, I want an object get to a certain location on the stage ie 200 pixels across, then come back the other way. I have had a go myself but failed miserably.
I am very new to ActionScript so I have no idea how to do this. Can anyne please help me out???
Thankyiu very much.
Help With SIMPLE Actionscript
It's been SOOO long since I've done this! Now I have a client that wants it, and I cannot remember how to do it! You guys are gonna laugh at this.
I need a MC to move across the stage using AS, not tweens. Just from left to right. Not using a button or anything, just play the movie and have a MC go from left to right using AS.
I know, I know, Im retarded. Please help.
P
HELP Can Anyone Help Me With A Simple Actionscript?
HELP! I'm new to actionscripts and trying to do something simple and getting a bit confuddled!
I've got one main SWF loading other SWF files and these need to run a php script. I'm nearly there, but need the php to run in the background without opening up another browser window. Can anyone help please?!?
Simple Using Xml + Actionscript?
Simple problem, simple player.
Currently I am using an mp3 player tutorial produced by the gurusnetwork, and while it is nice, its terribly complex and not as aesthetic for my site's "minimalist" needs. So what I have done is created the basic format and a dynamic text box where I load my playlist from my stream into using xml and a simple stop and play button, curtesy of kirupa's very helpful tutorials. However this is my dilema. And this maybe very simple, but I cant find my way through it using simple trial and error. Now that I have this dynamic text box, I am having a hard time writing the code for the xml to pull up random songs from my root folder and playing them, and simutaneously displaying them in this text box. my code is as follows:
<?xml version="1.0" ?>
<songs>
<song display="Original Bedroom Rockers" url="kndoriginal.mp3" />
<song display="Everything I Do" url="Everything_I_Do.m4p" />
</songs>
Its simple. But bridging the gap is not. My player is basically this- Now Playing: "dynamic text box here" "Start/Stop" button here. I cant figure out how to make a songs load randomly into the start stop player, and have the dynamic text load those corresponding songs. And no, the text doesnt have to move or anything, just display what is being played. Anyway thats all I can think of atm. Any help would be great!
Thanks guys
Simple Actionscript
but don't know how to make it work
so I have this sqaure moves 30 frames to the left, then I have this button which if clicked will make the square goes reverse to frame 1
this is the code that i have:
Code:
this_btn.onRelease=function () {
onEnterFrame=function () {
orange.gotoAndStop(_currentframe - 1);
trace (orange._currentframe);
}
}
thanks you
A Simple Actionscript I'm SURE, Except For ME
Really simple. If someone could please help me. In the first picture I have movieclip logomovie running in frame1. In the second picture shows inside the movieclip and at the end when the clip is done running I need to go back to Scene 1 frame 2. I knows it's simple, but I'm racking my simple brain over it. The movieclip instance is already labeled and can be targeted, but I can't get it jump back.
Any help would be great.
Thanks.
MARCOS
(probably) Very Simple Actionscript Help
Hi,
Basically the problem is:
Ive made a movie clip called "square", and drag it onto the screen. when i select the clip and press F9 to bring up the actions frame, i can use this code:
Actionscript Code:
onClipEvent(enterFrame){
this.onRollOver = function() {
gotoAndStop(2);
}
this.onRollOut = function() {
gotoAndStop(1);
}
}
to make the clip change colour when i roll over or roll out of the MC.
How can i do this for multiple MC's?
for example if i made code to make a 10x10 grid of the MC's next to eachother, how can i keep the same functionality?
thanks,
Gareth
Simple Actionscript
Hi all,
My problem is button's in movies. They still act as a button but the linkage to other scene's or movie's fail to work. What i want to do is have my button - on press link to another movie that resides in another scene.
The code i have used is this:
on (press) {
_root.beenfound.gotoAndPlay(1);
}
Beenfound is the name (named in the instance panel) of the movie i want the button to link to.
Pleae help me.
P.S using flash 5
Simple Actionscript Help
Basically I'm trying to get an object to move 50 pixels and then stop. I can get the object to move, however I can't get it to stop where I want. What's wrong?
PLEASE Help...simple Actionscript But Can't Get.
Hello, I am building a photo album. I have the "next" and "back" buttons set up for the navigation but I also need to build a thumbnail option. So there will be two ways you can flip through the photos: through the "next" and "back" buttons but you can also choose which photo via thumbnails.
What action do I put in each thumbnail so it calls that specific photo?
Here is the array I have for the next/back navigation:
Simple Actionscript Help
hi,
i have a flash menu which has a few buttons on it, each button will link to a diffent url. I have written the basic actionscript to create the button, however i would like to load the values of the actual url's which the buttons link to from an external source, xml or text file etc.
ActionScript Code:
on (release){
getURL("link");
}
so basically i would like to load in the value of link above perhaps as a variable from an external source, can someone help me out.
thanks alot
SImple Zooming Of An MC Using Actionscript
I have a movie clip which plays in a constant loop (even when the .swf is not playing) in the background of a movie. When a button is clicked, I need the movie clip to zoom in, without breaking its loop.
If I tween it, obviously the MC jumps to another frame (of itself) before zooming in.
So far I've given the MC an instance name - now what's the action script to zoom in?
Any help much obliged.
Simple ActionScript Problem
Im confused on adding action commands to symbols and keyframes. When you add an action to a key frame, such as stop, you get that symbol above the keyframe letting you know there is an action on it. But if you are doing a button action you have to click on the symbol and add actions which eliminates the symbol above the keyframe. What is the difference, and how are you suppose to know which way to add actions? Is this a confusing explanation??????
Thanks,
Amordicai
Simple Animation Via Actionscript.
got this code i wrote to animate a sqaure the sqaure is in a movie clip
Code:
onClipEvent (enterFrame) {
this._x = this._x+2;
if (this._x>=359) {
this._x=this._x/2;
}
}
when i dont use the if statement its fine but i want it togo back and forth not jump
any ideas
|