How Do I Repeat Actions In A Frame
hello
sorry for being stupid
i made some variables equals something
such as:
x= y
y= math.w/e(blahblah)
but what i want it to do is keep changing,
i see the script
if(i=0; i<this; i++)
how does that work?
if anything will that work?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 08-05-2004, 03:13 AM
View Complete Forum Thread with Replies
Sponsored Links:
Repeat A Frame?
What should I script to make a frame repeat itself? One thinks that simply putting gotoAndPlay(1); (if _currentFrame is frame 1) and that should be it. But it's not.
View Replies !
View Related
Repeat AS From Frame?
Hey,
I was just wondering if it's possible to repeat an AS on frame..
I've got a MC containing several frames, and each frame calling the same function with different arguments. What I would like to do, is call that same function again, even when you're already on that frame. So it's like when you gotoAndStop on that frame.
Is this even possible or do I need to work around it?
Thanks,
~Sph
View Replies !
View Related
Random Frame No Repeat
hello all.
how i would write a frame action that tells my movie to goto a random frame on the root timeline but not to be the one it's on at present. please help as i have NO IDEA! how to do this
thanks alot.
View Replies !
View Related
How To Repeat (go To Frame ...) Looks Like A Loop..
Hello, i have a question and maybe someone knows this.
In my timeline i have put the command "gotoAndPlay (4);"
If i do this.. the movie wil repeat itself infinity..
But i would like to repeat the gotoandplay commando for like 3 times.
As if you loop the time line for 3 times.
Can anybody help me please?
greetings, Chris.
View Replies !
View Related
Repeat/Timer For A Frame
Hi, ppl...
I need some help, with this,
I have a square that moves from a place to another, its 10 frames, and i whant to repeat that move "every 5secs" .
I have put this....
stop();
??????
gotoAndPlay(1);
What do i need to do, is there any command to do some thing like, time 5secs.
Thank you for the help ( sorry if this is in the wrong place )
View Replies !
View Related
How Do I Repeat As In Stopped Frame?
I made this new design: http://home.scarlet.be/~pkestens/the_playground
and when a page is opened, the clock stops ticking because there's a stop script where the page is completely visible, now i'm woundering, if there's an actionscript that keeps repeating the actionscript in a frame when it has stopped?
many thanx in advance
View Replies !
View Related
How Do I Repeat As In Stopped Frame?
I made this new design: http://home.scarlet.be/~pkestens/the_playground
and when a page is opened, the clock stops ticking because there's a stop script where the page is completely visible, now i'm woundering, if there's an actionscript that keeps repeating the actionscript in a frame when it has stopped?
many thanx in advance
View Replies !
View Related
Hold Frame (seconds) Then Repeat
hello flashkit!
ive been looking around for a simple script that will hold a frame, count to say
5 seconds then repeat from frame 1, over and over.
Ive searched around and some scripts just arn't working. would someone be able to help?
Im using Flash 8.
Ta,
andyk
View Replies !
View Related
How Do I Tell Flash To Repeat The ActionScript On Frame 2?
I have a 3 frame Flash quiz.
Frame 1 is the intro + most of the Actionscript that runs the application.
Frame 2 is where the questions are presented, one at a time by being loaded in a dynamic text field.
My question is, once the user has answered the question and clicked the Next button, how do I get Flash to repeat all the actions it took when it first entered Frame 2 (until all questions have been answered)?
Here is my code for Frame 1... the last lines are where the app halts...i dont know how to tell it to just redo everything it did for the next question!
stop();
//INITIALIZE VARIABLES-----------------------
var nTotalQuestions:Number = 5; //until dynamically determined by XML file (childNodes)
var nAnswered:Number = 0;
var correct:Number = 0;
var nCurQuestion:Number = 0;
var sAnswerSubmitted = "";
//----------------------------
var sQuestion1:String = "It can be dangerous to try to change your natural body size.";
var sAnswer1:String = "true";
var sExplanation1:String = "TRUE: Each person is born with a size, shape and weight that are unique. Trying to change your natural size can be harmful to your body and maybe even make you sick. All bodies are good bodies-so feel great about your natural body!";
var bSuccess1:Boolean = false;
var sQuestion2:String = "Adolescence (teen years) is when bone mass is built for life.";
var sAnswer2:String = "true";
var sExplanation2:String = "TRUE: It is especially important during your growing and teen years to make sure you are active and getting balanced nutrition to make and keep your bones strong for life!";
//var bSuccess1:Boolean = false;
var sQuestion3:String = "The Female Athlete Triad is the name for a combination of not eating enough, loss of menstrual periods, and loss of bone mass.";
var sAnswer3:String = "true";
var sExplanation3:String = "TRUE: Female athletes need to be sure they are eating a variety of food to fuel their active bodies. For female athletes, a healthy teenage body includes having regular menstrual cycles which means their bones will be strong for sport and daily activity!";
//var bSuccess1:Boolean = false;
var sQuestion4:String = "Fat, protein and carbohydrates are all essential parts of an athlete's meals.";
var sAnswer4:String = "true";
var sExplanation4:String = "TRUE: Athletes require more food energy then non-athletes to keep them going through all of their hard practice and play! Eating a variety of foods help keep bodies performing at their best! So enjoy everything from pasta to fruits and veggies to meat to chocolate!! – When balanced, all food is good food.";
//var bSuccess1:Boolean = false;
var sQuestion5:String = "Balancing sport with other aspects of life, like friendships, is important.";
var sAnswer5:String = "true";
var sExplanation5:String = "TRUE: Take breaks to be with your friends and to try new things, you will find you keep your passion for sport and will discover all kinds of activities you like and are good at.";
//var bSuccess1:Boolean = false;
//NEW ARRAY TO THEN BE RANDOMIZED//
var aChallenges:Array = new Array();
aChallenges[0] = [sQuestion1, sAnswer1, "incorrect"];
aChallenges[1] = [sQuestion2, sAnswer2, "incorrect"];
aChallenges[2] = [sQuestion3, sAnswer3, "incorrect"];
aChallenges[3] = [sQuestion4, sAnswer4, "incorrect"];
aChallenges[4] = [sQuestion5, sAnswer5, "incorrect"];
//trace (aChallenges[0][0]); //displays question 1
//RANDOMIZE THE ABOVE ARRAY OF CHALLENGES UPON LAUNCH--------------------
Array.prototype.shuffle = function(){
for (i=0; i < this.length; i++){
this.push(this.splice(Math.floor(Math.random() * this.length), 1));
}
}
aChallenges.shuffle();
//trace(aChallenges[0][0]);
//TO STORE IN A NEW ARRAY THE SHUFFLED RESULTS:
//var myShuffledArray=aFramedLabels.slice(); //slice will make a copy of the array, instead of using a reference to the array.
//--------------------------------------------------------------------
//INITIALIZING PAGE AND SETTING UP LISTENER OBJECT TO ENABLE NEXT BTN WHEN USER MAKES A CHOICE-----------------
//USE EVENT/LISTENER MODEL TO HAVE THE NEXT BUTTON BECOME ENABLED ONCE THE USER HAS MADE A SELECTION
//Create a (virtual) invisible listener object
var TrueFalseListener = new Object();
//Specify what kind of signal the object should be listening for (in this case radio button activity)
TrueFalseListener.click = function(evt) { // the event is defined as a click, and the function says what should be done
//trace("The selected radio instance is "+evt.target.selection);
next_btn.enabled = true;
};
//Note that to complete the model, a real object on stage needs to be assigned to the listener, using addEventListener
//This addEventListener line should ALWAYS be OUTSIDE the above function
//FUNCTIONS CALLED BY CHALLENGE FRAME---------------------------------
//DISABLES NEXT BTN, POPULATES TEXT FIELD WITH QUESTION, LISTENS FOR USER SELECTION, AND REMOVES ONE CHALLENGE FROM LIST OF AVAILABLES
function newInitializeQuizPage(){
//Flash picks the [0] index position (which varies every game due to the shuffle) to display the info that makes up this challenge
//trace(aChallenges[0][0]); //TEST ONLY
question_txt.text = aChallenges[0][0];
next_btn.enabled = false; //disables Next button
TFgroup.addEventListener("click", TrueFalseListener); //This was alot trickier in my previous version!
}
//INCREMENTS BOTTOM RIGHT DISPLAY---------------------------------
function incrementQuestion(){
nCurQuestion ++;
nCurQuestion_txt.text = "Question " + nCurQuestion + "/" + nTotalQuestions ;
/*if (nCurQuestion > total){
trace("All done!");
}*/
}
//--------------------------------------------------------------------
//FUNCTIONS CALLED BY THE NEXT BUTTONS, SERVES 2 PURPOSES: Splice the array and go to the new item at index 0
//NOTE: This function is NOT called at the end of the runner animation because we dont want to splice up the array before any questions have been answered!
function spliceAndGo(){ //I think I will need to pass a parameter here
trace("You've just answered the following question:" + aChallenges[0][0]);
nAnswered ++;
//Check what the user answered (for scoring purposes)
if (true_btn.selected){ //If user selected True
sAnswerSubmitted = "true"; //set variable to true
} else if (false_btn.selected){ //If user selected False
sAnswerSubmitted = "false"; //set variable to false
}
//trace("Your answer is " + sAnswerSubmitted); // TEST ONLY
if (sAnswerSubmitted == aChallenges[0][1]){
//trace("That answer is correct!"); // TEST ONLY
correct ++; //increment number of correct answers
aChallenges[0][2] = "correct" // marks this question as answered correctly by switching its value in 3rd slot
trace(aChallenges[0][0] + " is now marked as " + aChallenges[0][2]); // TEST ONLY
} else {
//trace("That answer will be left as incorrect!"); // TEST ONLY
}
//Check to see if user has finished the quiz
if (nAnswered == nTotalQuestions){
trace("You've answered them all!");
gotoAndStop("results");
} else {
trace("Should now move on to next question");
//aChallenges.splice(0,1);//remove 1 challenge starting at index 0 (everything slides over)
//trace("Challenges remaining:" + aChallenges.length); // TEST ONLY
//trace("Questions remaining:" + aFrameLabels.length);
//gotoAndStop(2); //THIS IS NOT WORKING
}
}
//--------------------------------------------------------------------
View Replies !
View Related
Random Frame Prevent Repeat
obj.gotoAndStop(random(8));
this goes to a frame number. eg. on first load, obj frame jumps to 5, next load ,another frame number but sometimes back to 5. because 5 is still within the random condition of 8. how to I prevent a repete?
View Replies !
View Related
Frame Actions Vs Object Actions
In preparation for AS3 which no longer supports object actions, I am on the process of converting flash movies created with Object actions in AS2 to Frame actions. While I understand some valid reasons for switching to Frame actions, I am discovering that converting button and clip actions to Frame actions is a very tedious process and so far, more than half the files I have tried to convert do not work. Having worked with Flash since version 3, I know about timelines, targeting and variable scope but this whole conversion process is driving me nuts! Is there a place that I can go to or tutorials available that teach how to attack this conversion? What are the main guidelines in converting from Object to Frame Actions? I have looked in the CS3 Help (from the program or Adobe online) and I have not found anything to guide me. Am I the only one experiencing this? Thanks for your help.
Yvan
View Replies !
View Related
Object Created In A Frame's Actions Telling Parent Frame To Delete It?
I've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:
Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();
addChild(foobar);
stop();
CFoobar then creates and manages some buttons, etc. At a certain point, CFoobar knows it's time has come, and it wants to be deleted, and have the frame go to another frame.
What's the best way to have it do this?
View Replies !
View Related
Frame Actions
I am having trouble getting frame actions to work in Flash 5. I have 3 movies all with the same frames except with change in text. The first movie has two scenes. All three movies are going to play at the same times. Except that movie 1, at the last frame, in scene 1 is suppose to go to and play scene 4, frame 1, and at the end of the last frame for scene 4, it is suppose to go to and play current scene, frame 1. This does not happen. The movie just stops and the frame actions are not activated. Please help.
View Replies !
View Related
Help With Frame Actions
Basically I'm trying to make some drawers in a box go in and out.
When you click on one drawer, it slides out.
Then when you click on the another drawer it will open, and the one that was open closes.
Each drawer is a button inside of a movie clip. and the movie clip has the open and close animations.
The open animation starts on frame 2 of each drawer movie, and ends opening on fram 8. Then the closing animations starts on frame 9 and will go to and stop on Frame 1.
this is the code I was using:
on (release) {
gotoAndPlay(2);
if (_root.box.drawer1, 8){
_root.box.drawer1.gotoAndPlay(9);
}
My guess was like using the ifFrameLoaded script, though that only works for Preloaders, so I tried something like you see above. I'm trying to say that if the drawer1 movie is on Frame 8, then when you click on any other drawer it will play the close animation. And if the drawer1 is not on frame 8 then nothing will happen when you click on other drawers, except that the drawers you click on will do their own opening animation themselves. Make Sense?
Anyways.. the problem I am having is with this code, when I click on a another drawer that has this code in it.. and drawer1 is closed, it opens with the other drawer I clicked on.
So, yeah.. anyways.. any help would be great!!
View Replies !
View Related
Frame Actions...
Frame Actions:
I am currently making a game, called Rancher. Every thing goes fine untill you reach the loaction of which the flash program randomly selects a monster for you. It's all fine and dandy, then when you go back to the town the monsters not there!
In the frame actions in the Town Scene I have this:
_root.hare._visible = 0;
_root.Naga._visible = 0;
_root.wolf._visible = 0;
_root.dino._visible = 0;
_root.Golem._visible = 0;
_root.Suezo._visible = 0;
In the button actions in which it is in the scene of the monster cut-scene at the end of it I have this:
on (release) {
gotoAndStop("Town", 1);
_root.Naga._visible = 1;
}
In _root.Naga._visible = 1; Naga is for all the other monsters up there, I didn't want to spam this thread with same AS just differnt names.
Me my self, I thought it was the frame actions, If any one else knows why this is happening; Please let me know.
Thanks in advance
View Replies !
View Related
Frame 1 Actions Bypassed
I've noticed that very often, if you gotoAndStop(1) that certain ActionScript calls (such as stop()) are sometimes ignored, and the movie will play from that point, for example. I remember someone else referring to this once as a bug in Flash (even back in ver. 4), but never read anything very definitive about it.
Can someone point me in the right direction? my guess is that there's a technote on MM's support site about it, or some posts on the more popular forums, like were-here, but I'm not really sure what to try searching for.
[Edited by verto on 11-21-2001 at 08:00 AM]
View Replies !
View Related
Sound And Frame Actions
I am having real problems.
I have a long sound (a song) in a mc called sound on the main timeline. The main timeline loops whilst the sound plays.
I want to break the loop when the sound is finshed.
I have put the following on the a frame at the end of the sound mc before the very last one.
_root.gotoAndPlay(261);
but it seems to ignore it completely I have set the sound to be 'stream'
Anybody any suggestions?
View Replies !
View Related
Assigning Actions To First Frame
Newbie here, just wondering how to assign an action to the first frame which makes the movie play, then when it gets to frame 40, it stops to wait for user input. If it makes a difference, i will be using a preloader which has yet to be made/intergrated. Do I just assign an action that instructs goto and play frame one, and add another action that says stop at aforementioned frame? Any assistnce would be appreciated. This forum has been of great assistance to me, I hope to find results to this quandry...
Q
View Replies !
View Related
Problems With Frame Actions
I'm lost with frame actions,
I want to build a slide bar to scroll text.
Why if I write the following on frame #1
I get an error (script slowing down your system)
---------------------------------
if (movie._ymouse == previouspos)
gotoAndPlay(1);
else
nextFrame();
--------------------------------
View Replies !
View Related
Problems With Frame Actions
I'm lost with frame actions,
I want to build a slide bar to scroll text.
Why if I write the following on frame #1
I get an error (script slowing down your system)
---------------------------------
if (movie._ymouse == previouspos)
gotoAndPlay(1);
else
nextFrame();
--------------------------------
View Replies !
View Related
How Do You 'unload' Actions Before You Get To The Next Frame?
I am having issues with the same dynamically loaded images and text staying on the screen when I get to the next frame. How do I get these to go away when I get to the next frame?
I am using _root.createTextField and _root.createEmptyMovieClip to load text and an image to the screen. I have actions on each frame, one right next to the other, but I have different actions on each frame.
Thank you!
View Replies !
View Related
Should All Actions Go On The Same Layer Frame?
1.) If I need to apply a stop action and actions for a button on frame 1, should these be placed on different Action layers? So a Frame Actions layer and a Button Actions layer?
2.) If there are multiple buttons on the same frame, should a separate layer be created for each button action that will need actions applied to it?
Thank you.
View Replies !
View Related
Need Some Help With Frame Actions/behaviors
The dimension of my flash file is around 850 by 800, so it is a little too big for most screen sizes. The problem I am having however is that I want each frame to start back at the top. When I click on the next button or previous button, it shows the frame in the same orientation as the previous one. Any help please?
View Replies !
View Related
Repeating Frame Actions
How do make it so that the actionscript on a stopped frame repeats itself instantly over and over again, kind of like with OnClipEvent (enterFrame) although that only works for movie clips and I want to have the actionscript on the frame?
And does anyone have any idea of what framerate flashstuff on a nice website should have?
View Replies !
View Related
Frame Label Actions
Does anybody know if there are any commands which relate to frame labels?
Such as:
Finding if a specific frame has a label and its name.
or
returning an array of a movieclip's frame labels
????
View Replies !
View Related
Position Of Actions Frame
Hi this sounds like a stupid question but i've farely new to flash.
I've always thought you put the frame with all your actions in it on the top layer in the 1st frame.
I've discovered these actions won't affect for example a Movie clip that doesn't come in until frame 10.
But if i put the actions for the clip in frame 10 then it works for that clip.
Do your actions have to always be at the frame where your object begins in the timeline?
Shouldn't the actions just cover the whole movie?
Any help would be great..
Thanks guys & gals.
View Replies !
View Related
Actions Based On MovieClip Frame
I am trying to set up a script where a button on the main timeline targets a clip, but depending on the current frame of the clip's timeline, it will trigger to a different area on the movieclip timeline.
something like this:
tell target "animationclip"
if currentframe==1
goto and play 10
if currentframe==10
goto and play 25
Anyone have any ideas?
Thanks.
View Replies !
View Related
GotoandPlay - Buttons Vs. Frame Actions
Does gotoandPlay() behave diff. if it is being used as a button action vs. being used as a simple frame action?
When I use it (as in the example below) directly from a frame as a frame action it seems to behave the same as gotoandStop()
example:
I have a movie clip with 10 frames and 2 layers.
Layer 1 has a stop() action in frames 1 and 10.
Layer 2 is a shape tween.
When I say movieclip.gotoandPlay(2) from a frame action it doesn't play... it goes there and stops. But if I call it from a button
on(release){
movieclip.gotoandPlay(2);
}
It works just fine.
The main time line is one frame. and the only scripts in the movie are the goto action(s) and the 2 stop scripts in the movieclip.
Any ideas? I don't know what else to try. Am I missing something simple?
any suggestions would be greatly appreciated.
thanks
--Mizary
(My 1st post!!)
View Replies !
View Related
Controlling MovieClip Via Actions In Frame
Hi all,
It's been a long, long while since I posted here. I would like your help on controlling a movieclip through action script.
My problem is:
My movieclip is a car, it is called "mycar". The only thing that is animated are the car wheels which spins 360 degrees, as if it is on the move. I would put the movie clip outside the Movie stage on the right, then I would make it move to the left. It would give the effect of a car driving to the centre.
In the centre, the car would stop. The prob is the car wheels won't stop spinning. I thought my solution would be putting a script in a frame, at the point where the car stops. It was in frame 40 of the main movie timeline. There are no scripts in "mycar" movieclip.
This was the first script I put in frame 40, to stop the movieclip playing.
mycar.stop()
It didn't work, so I tried the following steps. In "mycar" movie clip, I placed static wheels in frame 11. Then I put the following script in frame 40.
mycar.goandstop(11)
It didn't work, either. The car wheels keeps spinning no matter what.
Am I able to control movieclips through actions in a frame, when the playhead enters? It is a bit like Director, e.g.:
on exitframe
do this
do that
end exitframe
Can you, please, help me out? Apologises for the long post!
View Replies !
View Related
Need Some Frame Actions Substitute For OnClipEvent
Hi pplz..
I have some problems with ... it's rather stupid but i cant figure it out..
im loading a XML driven menu that holds a writer and some of its publications..
(its like Category - Products kind of menu)
Well i borrowed a scollbar source from a flashkit submition
that's based on The movieclip action (onClipEvent)
All is well but i need to run the actions from the timeline
instead of from the clip....
is there anyone who has a good way to run this script from the timeline
onClipEvent (load) {
this.loadVariables(SelectedStory);
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 3;
origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;
function initScrollbar() {
var totalLines = numLines+TextBox.maxscroll-1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight-scrollbar._height;
lineHeight = deltaHeight/(TextBox.maxScroll-1);
}
function updateScrollBarPos() {
scrollbar._y = lineHeight*(TextBox.scroll-1);
}
}
onClipEvent (enterFrame) {
if (needInit) {
if (TextBox.maxscroll>1) {
initScrollbar();
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && TextBox.scroll>1) {
TextBox.scroll--;
updateScrollBarPos();
} else if (scrolling == "down" && TextBox.scroll<TextBox.maxscroll) {
TextBox.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
scrollbar.startDrag(0, origX, deltaHeight, origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();
updateAfterEvent();
}
onClipEvent (mouseMove) {
if (scrolling == "scrollbar") {
TextBox.scroll = Math.round((scrollbar._y)/lineHeight+1);
}
updateAfterEvent();
}
onClipEvent (data) {
needInit = true;
}
........................................
Thanx
View Replies !
View Related
Actions That Change Html Frame
I need to learn how to make a hybrid site. I want my buttons (top frame) to be flash and my bottom frame to be html (maybe some flash too)
I hate to use 2 advanced as an example... but I really want to accomplish the layout of http://www.xs-engineering.com/
Tutorials are good, but is there just a simple action script that I am forgetting about to change the bottom frame?
Let me know,
View Replies !
View Related
Buttons Vs Frame Actions - Which Has Precedence
I placed timing actions in each frame to cause the movie to pause five seconds and then play the next frame.
Then I decided to install a pause, fast forward, next frame and return button.
But the buttons seem to upset the normal flow of the frame actions and the frames are played out of sequence and jump all over the place.
I first tried on release, gotoAndStop. Then thought the Stop was the problem, so I tried gotoAndPlay for my buttons. For the fast forward I used gotoAndPlay (_currentframe + 3)
Are there rules of precedence going on here? Anyone. For anyone answering, just a simple,
yes, I have done it, your code must be wrong would be sufficient or
no, there are always conflicts when button actions interupting frame actions of this type are put together.
Many thanks for anyone who answers.
View Replies !
View Related
Button Actions In One Frame Not Working
Hi,
I found out the other day how to apply actions to buttons from one frame, which is great. But I've just tested the file now and its not working right, i'm confused to hell because I really can't see anything wrong with the scripting or otherwise.
I've created a slideshow which chooses random images from the selection, the user can then click each image to take them to a specific site, this info is loaded from the text file onto the button. You will see that clicking on the images doesn't open the website everytime, but sometimes it does, the error is completely random, which is why its so hard to figure out.
It'd be great if a couple of you Flash gurus out there could take a look at this and see if you can figure it out better than I can, it's driving me nutts!!
View Replies !
View Related
Actions Work For Button, But Not Frame, Why?
the code below works when attached to a button using on(release), but i need the code to run independent of any user interaction.
i put the code in a frame, but it doesn't work.. any ideas?
result="waiting";
fscommand("get_cookie", "bg,result");
text=result;
tellTarget ("ValueChecker") {
gotoAndPlay(2);
}
i've also tried _root.ValueChecker.gotoAndPlay(2); instead of using tell target, both methods work when triggered by a button, but not via frame actions
thnx
View Replies !
View Related
Actions/Frame Text Hyperlink Help
It seems so simple and yet it is so hard! All I want to do is create a text hyperlink in the Text Variables area of my actions frame...I have modified all of my content in there and everything looks great with the excetion of this issue!
If someone could give me an example of the correct script from the beginning to end I would be SO VERY GRATEFUL...I am loosing my patience and have spent way too much time with syntax errors to last a LIFETIME!
Right Now I am only displaying this text in the text variable frame...
text ="<b>Ultimate Trade Shows:</b> www.tsnn.com"+newline+newline+"<b>Seminar Information:</b> www.seminarinformation.com"+newline+newline+"<b>Juvenile Product Manufacturers Association:</b> www.jpma.org"+newline+newline+"<b>GiftWare News:</b> www.giftwarenes.com"
View Replies !
View Related
Button With Multiple Frame Actions
I've got a button that is acting essentially as the stage of the mc. I want to have the the button "the stage" when clicked to go to the desired frame. I wan't something to the figure of 30 actions on this button, each time going to a new frame. Is there an easy way to write an action script 2.0 for this opposed to keyframing the button over and over and changing the variable on the action going down the timeline...
View Replies !
View Related
[F8] Function + Variables All In Actions Frame
The following code is what I have in an actions frame:
Code:
function FLOAT_engine() {
this._x = this.cenX+Math.sin(this.angleX)*this.rangeX;
this._y = this.cenY+Math.sin(this.angleY)*this.rangeY;
this.angleX += this.xspeed;
this.angleY += this.yspeed;
}
floaty.onEnterFrame = FLOAT_engine;
floaty2.onEnterFrame = FLOAT_engine;
etc.
And in my movieclip (floaty) I have the variables:
Code:
onClipEvent (load) {
cenX = this._x;
cenY = this._y;
angleX = 0;
angleY = 0;
rangeX = 5;
rangeY = 5;
xspeed = .05;
yspeed = .06;
}
How would I got about re-writing this code so it is all in the actions frame? The way that I have it set up now, I'd have to paste the variables into every movieclip. It would be a pain if I ever wanted to change the values. Thanks in advance.
View Replies !
View Related
Frame Actions In Embeded MC Not Working
I have a movieclip embedded in another clip which is embedded in another clip which is on the stage. Tracing does not show up when I trace from a frame. Code only ever seems to run if it's broken- as in, code doesn't seem to do anything, but if there is an error, the compiler will complain!
The clip is playing and omit trace actions is UNchecked.
is there something new about AS3 I'm missing here?
View Replies !
View Related
Frame Actions And ENTER_FRAME Problem
Hello,
I have a flash that will show pictures when user click and drag in the main area:
+++++++++++++++++++++++
+ +
+ THIS_IS_PICTURE +
+ +
+ +
+++++++++++++++++++++++
Something like above. When user click and drag the picture, the picture will change to another one, and so on, there are 10 pictures.
To implement this, I created a .fla file with 10 key frames, one each frame I added a MovieClip symbol, and in the document class, I have 10 loaders to load each picture individually, and add those loaders to the MC's.
Here's the problem, what I'm doing now, is to add Actions to each frame, by right clicking on the frame dot and select Actions, then add code that would add the loaders to MC's. But this is inefficient.
Then I tried to use Event.ENTER_FRAME in the constructor of the document class. However, this did not work: in the event handler, the MC's on different frames cannot be accessed.
Here's the code.
Code:
addEventListener(Event.ENTER_FRAME, test);
function test(e:Event): void
{
if (!(e.target is MyClass)) {
return;
}
for (var i = 0; i < numChildren; ++i) {
trace(e.target.getChildAt(i)); // same thing if just use getChildAt(i);
}
}
The result is always "null", instead of MovieClip. The strange thing is, "numChildren" is 1. Please help, thanks a lot in advance!
View Replies !
View Related
Load Clip Before Frame Actions
Dear Colleagues,
In one frame I have 8 clips. On the frame itself I am calling a function inside the clips. The problem (I believe) is that the frame actions are called before the clip is loaded. How do I verify that the clips are loaded before the frame action is called?
View Replies !
View Related
Actions Frame Redraws Very Slowly
When I move a window in flash 9.0 it takes ages to redraw. Even when I use the keyboard to scroll throgh code-lines it redraws so slowly that it is actually useless.
Any hints how to getting around this problem? (I'm thinking about reinstalling the old version).
Edited: 12/02/2007 at 08:42:53 AM by andersduus
View Replies !
View Related
Need Some Help With Flash Actions/frame Behaviors
The dimension of my flash file is around 850 by 800, so it is a little too big for most screen sizes. The problem I am having however is that I want each frame to start back at the top. When I click on the next button or previous button, it shows the frame in the same orientation as the previous one. Any help please?
View Replies !
View Related
Frame Actions, Basic Navigation
Hi
I've recently started using CS4 and am having a problems trying to put actions into a frame. i used MX years ago so i thought i has a slight understanding of creating a simple website but am having a few lil problems.
I have a scene which has an intro animation, and an outro animation. What id like to be able to do is to have buttons that when pressed will play the outro animation then automatically goto a scene.
is it possible to make a button play the outro animation then goto scene 2, and have another button on the same stage that will play the outro animation then goto scene 3?
im sure this is real noob teritory but maybe im not seeing the wood for the trees?
many thanks in advance
View Replies !
View Related
Put The Button Script In The Actions Frame
When I click each button I want it to advance the play head to the Frame Lable.
This code works but I need to change the state of the button.
If I change the button State to Graphic in the Key Frame Lable it makes the code not work.
I would like to have all the code the the main timeline Actions Layer.
ie: When Button1 is pressed it goes to "F1" and is now in the Down State.
When Button 2 is press it goes to "F2" and is in the Down State and Button 1 goes back to its' Up State.
Here's the code:
stop();
Button1.onRelease = function() {
gotoAndStop("F1");
trace ("Frame 1");
};
Button2.onRelease = function() {
gotoAndStop("F2");
trace ("Frame 2");
};
Button3.onRelease = function() {
gotoAndStop("F3");
trace ("Frame 3");
};
View Replies !
View Related
Actions To Play Mc-move To Next Frame?
This may be a rather silly question but can somebody help me with this. I have a movie clip in frame 1, then my site starts in frame 2. What actions do I need to place in frame 1 to tell it to play the movie clip then once the movie clip has finished move onto frame 2? I just have the mc sitting in frame 1 and it plays then stops but doesn't move onto frame 2. Thanks in advance for any help.
View Replies !
View Related
|