ActionScript 2.0 :: Read And Compare Variables And Then To Jump To A Particular Frame Based On The Result
Jun 28, 2011
I have written some code to read and compare variables and then to jump to a particular frame based on the results (pretty simple stuff). It works fine when I use a button to trigger the code but I want it to happen automatically.
I have tried using the OnEnterFrame thingy but it doesn't work and I tried just placing the code on frame 1 and letting it do its thang but that didn't work either....
I'm using the .swf in a third party program and using the API for that program to supply the values.
here is the code:
_parent.InitializeExternalVars();
var m_varStrEndSlide;
function display(){
[Code]....
View 0 Replies
Similar Posts:
Nov 28, 2010
I'm trying to develop a simple as3 flash program that passes a collection a variables and returns a result based on the filtered results of a mysql table. Here is my as3 file:
[Code]...
No value is returned. If I replace with '$test4' and '$test5' with numbers such as 1 and 17, a value is returned. Where am I making a mistake?
View 1 Replies
Mar 26, 2012
I need to make a SWF that should show some data from the DB. The DB will be read using PHP.I was thinking that the SWF would get the data by accessing "data.php" and data.php will read from the DB. The SWF would read the XML/JSON/RAW DATA from that file and update it's variables.
View 1 Replies
Jul 22, 2009
I need to make an edit to a flash projector that was built some time ago that changes what is playing based on the time of day. It is used to advertise breakfast or lunch/dinner for a restaurant. Previously we had set it up so that the time change happened at 5 in the morning and 10 in the morning. The code is below. The restaurant wants to change the time switch to be on the half hour now.[code]
View 5 Replies
Dec 2, 2009
I need to create a script that will jump to a certain frame in the scene when a movie cilp reaches its last frame. Putting a goto... within the MC itself doesn't work. I assume that I need to create a listener of some sort....I haven't been able to find what I need in any documentation (and I'm even been looking through AS dictionaries going back to Flash 4).
View 1 Replies
Sep 6, 2011
I built a button in one of the movie clips in my project,
when I release this button, it goes to the 41st frame of the main timeline and continue to play until the frame 70 which has got a stop; command. till here everything's just OK. But I want this button to do something more though I don't know whether it's possible or not.
I want this button to go and play the frame number 41 in the main timeline, and then after it stopped at the frame 70 , then jump to frame 73.
View 5 Replies
Oct 11, 2006
Im working on a quiz that have 4 questions with 3 options each.Example:
Q1 Which actionscript forum has the coolest viewers?
A: Actionscript.org
B: Kirupa
C: Stylegala
Now, if the surfer choose more A options than B or C he gets one result message, if he choose more B options than A or C he gets another result message. how do I compare more than one variables?
View 4 Replies
Dec 3, 2009
I'm trying to cut down the amount of code I type to complete a project. Using things like ?: and &&= over the typical if statements. Is there a way to compare a single variable to a group of variables? example...
var1==var2 || var1==var3 || var1==var4 ? doSomething : doSomethingElse;
is there a short way to check if var1==var2,var3,var4?
View 9 Replies
Oct 28, 2008
I have a movieclip containing 4 rotating handles. When the four handles linked with a variable returns a certain value, a door opens. I've tried to use && operator, in this way:
[Code]....
this doesn't function because && operator just compare two expressions, and no more than two (that is the function will function if I limit it to control just (_root.gira1>0) && (_root.gira2>0)) How can I replace this simple code with a 4-variables controlling one? A for cycle will be the solution?
View 3 Replies
Dec 9, 2009
I am new in flash actionscript... I am just starting to learn...How can I send variables from my flash project to PHP and get the resulting values back???
View 0 Replies
Oct 7, 2001
I have a movie clip with a button, clicking on it goes to another scene. When in the other scene, i want to be able to click another button and go back to the original scene and have the movie clip be at the frame where I left it, or any other that I specify.
View 2 Replies
Mar 18, 2012
I have a memory game here. And each time a card is removed from the gameboard I have "cardCount -2", when this cardCount gets to zero, I want the program to jump to the next frame which is like a "game over" page. I've tried using gotoAndStop(); as well as nextFrame(); but it doesn't seem to be working![code]...
View 2 Replies
Nov 10, 2011
I have problem to jump to a frame after a video clip (which is on server) is done playing. Do you have any idea how to do this?
View 7 Replies
Nov 21, 2009
if a flash website can jump into another url if it enters a certain frame...
For example maybe something like?
on enterFrame {
getURL("http://www.sample.com/", "_self");
}
how do i tell the timeline to get that url instead of the button?
View 3 Replies
Aug 4, 2008
On the main stage there is a MC on frame 4.
I have a drop down menu button that I want to jump me to frame 2 of that MC
I tried this:
button.onRelease = function () {
_root.instance_of_mc.gotoAndStop(2);
}
but it didn't work.
View 8 Replies
Dec 25, 2011
I want to display the result which is this "guess_txt.text.toLowerCase()+" is Correct"; then after a seconds of delay it will go on the next frame.
Here is my code :
enter_btn.onRelease = function () {
if (guess_txt.text.toLowerCase()== "waitress","waiter") {
result_txt.text = guess_txt.text.toLowerCase()+" is Correct";
}else{
result_txt.text = "Sorry try again";
}}
View 4 Replies
Apr 22, 2009
I want to jump to a specific frame in the swf I load using the Loader class. As it is now it goes directly to frame1 in the file, which I dont really want it to do. I'm using Flash CS4
View 2 Replies
Nov 20, 2009
I'm trying to create a movie, that when a correct word is entered, it goes to a specified frame. The code below words fine but I need to make an addition to it,
on (release, keyPress "<Enter>") {
if (inputtext eq "word1") { gotoAndStop("frame1");
} else if (inputtext eq "word2") {gotoAndStop("frame2");[code]....
I was hoping to add extra words that would go to the same frame. I know I ca do this by�
if (inputtext eq "word1") { gotoAndStop("frame1");
} else if (inputtext eq "word3") {gotoAndStop("frame1");
but was wondering if there is an easier way, something along the lines of�
if (inputtext eq "word1", "word2", "word3") { gotoAndStop("frame1");
View 1 Replies
Dec 3, 2008
I have an animation where I want to play a movie clip and then play another movie clip from the library (selecting randomly from a group of movie clips). I couldn't figure out how to get this to work, so I tried to play the first clip, and when it gets to its last frame jump to a random clip which is already on the time line. The AS is attached.
Clearly I'm missing something critical here.
View 5 Replies
Aug 6, 2010
how to accomplish my current task. I have an .fla with 32 frames in it, an open frame, a close frame, and a bank of 30 frames in between. I want to set up some AS so that once the user clicks a "Next" button on the first frame, it randomly jumps to another one of the frames within the bank of 30. Then, when they get to that frame and view the contents, and click next, they'll randomly jump to another one of the remaining frames. This will only happen for 20 frames, after the 20th viewed frame, I want the "Next" button to take them to the final slide in the series. The purpose being so that each time a user views the program, it's never the same (well not likely ever the same) - so they'll all see 20 different frames in a different order.
I'm guessing I could do this with arrays, and the math.random method, some if/else statements.
View 6 Replies
Nov 16, 2011
i have a clock, and a background the background contains an animated ocean (100 frames) there are four sky themes which change on the appropriate hour to night-time, morning, sunset, sunrise (could just use alpha to show another here although maybe processor intensive)
ok so the ocean could animate on its own and only the sky would need to change, that would be the easy part
but when it gets to night-time the ocean needs to jump to the night-time version of itself so if the user presses the hour button, and the ocean is on daytime at frame 80, how would i say play night version at frame 81 so that the ocean doesnt skip animation??
View 27 Replies
Mar 23, 2011
Today I found that flash had no option to jump to unassigned frames.
Say, I am working on frames numbered from 1 to 250. Now I need to jump to frame number 15000 and I found that I cannot jump to the frame number 15000 directly. I have to click in the Timelline and move the scroller right to its full extent, again click in the last frame visible in the time line and so on continue this until I reached the frame 15000.
Is there any easy way to jump to frame 15000 ??
View 2 Replies
Jan 20, 2006
i'm trying to make a transition, but unfortunatelly cannot make it work! it does not jump from the _root frame to the one i indicate, simply repeats the movie in that frame everytime i press the buttons! here are my actions on the buttons:
[Code]....
View 3 Replies
Aug 3, 2008
I work with flash 2.0 in CS3 When I click a button I want to load an swf in a higher level of a "main" swf and jump to a certain frame of the "main" swf. Is that possible? In a nutshell, I want to bring in an swf in a higher level that play a fade to white animation, which then hits a stop motion on a blank frame at the end, then the timeline of the main swf should go to a frame where a transition fades white to a new section of the flash website. Or the timeline could jump right away. Either way I need a goToAndPlay action to work with a loadMovie action simultaneously on a button click. For some reason these two actions seem to cancel each other out.
View 1 Replies
Oct 26, 2009
I need to know How to jump to a certain Movieclip, And Frame with AS2!? By Clicking on a button.
Right now I just know how to jump whitin a Movie clip. But I need to jump to a whole other movie clip from a other movie clip.
This is what I know! (Se below)
on(release){
gotoAndStop(5)
}
[Code]....
Been searching more then 10 hours all over the internet. With No Result. Either im a retard or the solution is so simple nobody cares to post it.
View 8 Replies
Nov 5, 2004
I know there's been a million "how do I load a movie and than jump to a specific frame" thead. Well all of those have been helpful :: HOWEVER I wouldn't be posting because I can't seem to get my script to run successfully First the background I have a nav. menu made up of seprate movies clips :: inside each movie clip is four buttons :: these buttons are shown using a rollOver, rollOut dealy
anyway when you click on one of the buttons it calls "student.swf" to load into an empty MC called content.I've tried everything :: What happens is the button will load the MC but will sit on the first frame and do nothing :: the movie clip "student.swf" is not that big so I doubt I'm waiting for it to load.
[Code]...
View 5 Replies
Nov 5, 2008
I am using actionscript 2 and I am trying to get my FLV to jump another frame in my flash movie after it's finished playing. I am using the FLV component that comes in flash to play the FLV and i've embedded an event cue point in the FLV but I am not sure what I am now supposed to do!
View 9 Replies
Dec 14, 2009
I am making a small website out of flash and I have a photo gallery in a separate scene. I have five photo galleries and so I have five buttons that will lead to those five galleries.
The code of one of the five buttons is
on (release) {
_root.gotoAndPlay("Content_Photography");
}
Works great, but the first 10 frames of this new scene "Content_Photography" is an intro and then I would like that it would jump to the corresponding gallery that these galleries will be laid out on the timeline.
What would i put after _root.gotoAndPlay("Content_Photography");?
View 9 Replies
Apr 13, 2010
I have been researching this for hours and cannot seem to find an answer anywhere. Right now I am linking one flash file or .swf file within my main flash site using a button.So in my main flash site, I connect to this .swf file by using...
on(release){
loadMovie ("MDsite2.swf", _level0);
}
This works perfect but the .swf file starts at the first frame. Is it possible to a jump to specific frame within that .swf file so it doesn't start on the first frame?
View 2 Replies
May 16, 2011
I am trying to use buttons to jump to frame labels. They jump to the label just fine, but they won't stop when pressed again. Below is the code I am using to have the button rest when pressed again.
getting_btn.addEventListener(MouseEvent.CLICK, gettingStarted);
function gettingStarted(evt:MouseEvent):void {
gotoAndPlay("ipad_in");
[code]...
View 4 Replies