I want to set multiple conditions for an if statement, but I don't want the conditions to all have to be true, I want to say if (a or b or c or d, etc. is true) then do this. I don't want to say if (a && b && c && d, etc. is true). Is it possible to have an if statement with an "or" in the condition? If so, what's the proper syntax for that?
I want to set multiple conditions for an if statement, but I don't want the conditions to all have to be true, I want to say if (a or b or c or d, etc. is true) then do this. I don't want to say if (a && b && c && d, etc. is true). Is it possible to have an if statement with an "or" in the condition? If so, what's the proper syntax for that?
i have an if statement, an object will go to a new frame if multiple buttons are pressed
PHP Code:[code].....
now i want it so that if one condition is met the mc will goto frame 2, if 2 conditions are met, frame 3 and if 3 conditions are met, frame 4.i know i could do this with a lot of if statements but i have a lot of movie clips to use this code on, so is there any way to write an if statement that will trigger different options if multiple conditions are met?
I've created a simple drag n drop activitiy but there is a small problem. There is a repeat of a word within the activity (the words are the drag objects). Now I want the user to be able to drag the first instance of the word onto either drop target when it first appears. When the second instance appears I have told the expression to look to confirm the location of the first instance of the word (which target it sits within) and make the word snap back if the user drags the word onto a drop target where the first instance already sits - and allow it to snap to the drop target where the first instance does not appear. (I HOPE THIS MAKES SOME SENSE) - if it does not make sense, I have cut and paste the script below:
I've got two functions that work separately, but don't like to work together. Specifically, function "onEnterFrame" stops working after function "connectT."
function onEnterFrame(){ connectT(); checkBounds(); }
I have some code that needs to read like the following:IF the original position(origX) DOES NOT EQUAL where my object is(this._x) AND delay variable(delay) is set to 0, then I need to display a movieclip. There is an X on the movieclip so users can close it, and when they click the X, the delay variable is set back to 1, so the movieclip won't keep loading.
ActionScript Code: var delay = 1; if (origX == this._x && delay == 1) {
If I have one parent class that instantiates 5-10 different child classes, each of which need to load multiple assets etc, how can I check within that parent class to make sure all of the 5-10 children are loaded & ready to go before telling the program to continue?
The tricky part is that the exact number of those 5-10 classes that are instantiated is determined at runtime, so I can never be certain which I should be waiting on and which not to be waiting on. And just to be clear, these are different modules of sorts, not multiple instances of the same exact class.
I am trying to filter xml data based on a varying amount of factors, both category and range (code below). Is it even possible to put more than one conditional statement in an XML filter?
How would you stop an FLV using a conditional statement where the condition is if the FLV is playing?
I'm using AS 3.0. My best shot was this:
if (demo.flv == play){ demo.flv.stop(); }
I'm sure the "== play" part is wrong, but I cannot find the correct code that checks to see if the video is currently playing.
My flv component does have an instance name of "demo". The command "demo.flv.stop(); works fine as a non-conditional, but the flv is not always playing with my navigation set-up when you land on the frame with the code, so I need a conditional.
How can I put multiple conditions into an IF block? I have tried the following and it doesnt work ;[AS]if(_root.neo.hitTest(_root.camera2)) & (camera2Off = true){[/AS] I have also tried two &'s but that doesnt work ether
I'm trying to declare a few variables in a for statement using the variable in the for statement. In older flash versions I would use something like this.
Code: for(a=0;a<10;a++) { _root["variable"+a] = "Some text "+a;
I am trying to do a multiple if statement checking to determine which frame label within a MC (NE) and is located on frame 3 of the main timeline, to display. In the main timeline frame 1, I have declared a new var: var n_e; button1.onRelease = function (){ n_e1 = 1; main timeline go to and stop at frame 3 } [Code] ..... But it doesn't seem to work, and most of the time it lands up on Ne("2") instead...
I have a conditional statement (if) that I am trying to use contingent on multiple variables being true. So the AS I have right now is:
[Code]...
But when I run that I get the following error message: "Error 1050: Can not assign to a non reference value" What do I need to change so that once 1,2 and 3 have been visited visitComplete is set to true?
I have a menu movieclip and an externally loaded swf on my main stage. The menu mc needs to control the externally loaded swf. For example the swf plays and pauses, then when any of the menu buttons are clicked the swf needs to play thru and be removed. currently I am dispatching an event for each button clicked with a switch statement. In the main timeline I need to listen for each of theses events and based on what button is clicked proceed to the correct content frame. How can I listen for different events and run one function that based on which event is registered perform a task with a switch or if statement?
This shouldn't be too difficult. Heres my code: for(i=0; i<30; i++){ var box[i]:Object = new Object() box[i].id = [i] box[i].name = "default" box[i].location = "default" box[i].type = "default" But its not working. I keep getting error messages concerning the var box[i] statement.
Where and how I'd put the rest for the score tracker? I'm going to be making 3 of these multiple choice questions, so what would be the best way I lay that out and transition from one question to another?[code]...
I have a few movieClips and I would like them to play one after the other. [At end of MovieClip play next movieClip]. Using AS3 to Tween, this is my first Clip props. import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween = new Tween(FloatRight_mc, "x", Regular.easeOut, 22.00, 495.95, 3, true); var myTweenAlpha:Tween = new Tween(FloatRight_mc, "alpha", Regular.easeOut, 1, 0, 3, true); How do I get the next movieClip to start playing before its completion, and so on?
What I have is a SWF that loads multiple smaller SWFs into an array and then uses buttons to switch between them in a movie clip container on the stage.
Everything works when I pub my main SWF and even when I run it in a browser from my desktop.
When I upload to the server and try to run it online, I run into this problem. All the SWFs load, but only the last one to load actually plays in the container. The others seem to be stuck in frame 1.
The clips have no code in them, they are simple animations. And if I change the load order, still only the last clip plays. So I know it isn't the SWFs causing the problem. I am locked into using IE 8 and the flashplayer is version 10.3.
Anyone know of any issues with IE 8 or a reason that only the last file loaded would play?
here is my code, but as I said it seems to work fine until I run it online.
Working on a project with multiple sounds (all contained in different MCs) played by different key board events. Most of it works, but when I try to use simultaneous 2 button combinations to call upon a different sound, all 3 sounds play at once. The 3 sounds are as follows: the sound associated with the first button, the sound associated with the second button, and the sound associated with the 2 button combo. I've made several different true/false statements to override different events and states, but they don't affect the playing of the MCs. I've also tried using attachSound but I don't like the results I'm getting from that either.
How can I stop the first 2 sounds from being played, so only the 3rd sound can be heard?
Having a few problems with what I thought was a simple if statement. Here is the code:
[Code]...
I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.