Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




"if" Statement Syntax Problem



i'm trying to make a ball move back and fourth across the screen without it leaving the screen using if statements. I have something but i have no idea why it's not working...

ball.onEnterFrame= function ()
{ball._x += 10;}

if(ball.onEnterFrame= function() { ball._x += bob }
if(ball._x >= 300){
bob =-10;
}

hope someone can help.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 10-13-2008, 05:45 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

If Statement Syntax
here is the script, it says there is a syntax error: Left side of assignment operator must be variable or property.

any ideas?? could u explain if u see what is wrong as well




MovieClip.prototype.dClick = function (tempo)
{
ASSetPropFlags(this, ["clickZeit"], 1);
if (this.clickZeit - this.clickZeit = getTimer() + tempo > 0)
{
return(true);
} // end if
};

If Statement Syntax Question
All of the following examples work without issue. Just wondering which is recommended or best practice. Should any one of these be avoided? Why?

In books, usually the curly braces are used... in practice, I see a lot of advanced coders using the first example...


Code:
if (condition) trace("works");

if (condition) { trace("works"); }

if (condition) {
trace("works1");
trace("works2");
trace("works3");
}

if (condition)
trace("works1");
trace("works2");
trace("works3");
Thanks!

Help With Conditional Statement Syntax
hey peeps, can somebody help me write this into a conditional statement?

if all the frames in a movieclip called boximage have played, load these movies into these levels, otherwise wait until all the frames in the movieclip called boximage have loaded.

somebody please?

Syntax Error With Else If Statement
Here is my code:


// Play/Pause Toggle
playPause.onRollOver = function() {
if(this._currentframe == 1) this.gotoAndStop("pauseOver");

else if(this._currentframe== 20) this.gotoAndStop("playOver")

}

playPause.onRollOut = playPause.onReleaseOutside = function() {
if(this._currentframe == 10) this.gotoAndStop("pause");

else if(this._currentframe== 30) this.gotoAndStop("play")
}

playPause.onRelease = function() {
if(this._currentframe == 10)
this.gotoAndStop("play")
this._parent.pauseit();
} else if (this._currentframe == 20) {
this.gotoAndStop("pause")
this._parent.unPauseit();
}

I don't understand what's wrong with the code in red. When I check it, it says I have a syntax error on line 74, which is what I've highlighted in green.

Please, any help would be greatly appreciated.

Thanks,
bfg

Help With Conditional Statement Syntax
hey peeps, can somebody help me write this into a conditional statement?

if all the frames in a movieclip called boximage have played, load these movies into these levels, otherwise wait until all the frames in the movieclip called boximage have loaded.

somebody please?

Need Proper Syntax For If Statement
how would i properly actionscript this ???
its just a slideshow-like function. when im
on the last frame, i want the "next" to go to frame 1,
and when im on the first frame, i want the "back"
button to go to the last frame. thats all.
ive tried 2 methods.....

first:

Code:

on (release) {
if (_root._currentFrame = 16) { _root.gotoAndStop(1); }
else { _root.gotoAndStop(_root._currentFrame + 1); }
}



second:

Code:

if (_root._currentFrame = 1) {
on (release) { _root.gotoAndStop(16); }
}
else {
on (release) { _root.gotoAndStop(_root._currentFrame - 1); } }

If Statement Syntax - Simple But Frustrating
Hello everyone. I'm pulling my hair out trying to get the simplest if statement to work in flash MX. Here's what I have in frame 3 of my main movie:

fornow is a random number from 1 to 5
Hill1 through Hill5 are movie clips on my stage

If (fornow == 1) {
_root.hill1.gotoAndPlay(3);

}Else If (fornow == 2){
_root.hill2.gotoAndPlay(3);

}Else If (fornow == 3){
_root.hill3.gotoAndPlay(3);

}Else If (fornow == 4){
_root.hill4.gotoAndPlay(3);

}Else{
_root.hill5.gotoAndPlay(3);
}


Now here are the error messages I'm getting:

Scene=Scene 1, Layer=Actions 2, Frame=3: Line 9: ';' expected
If (fornow == 1) {

Scene=Scene 1, Layer=Actions 2, Frame=3: Line 11: ';' expected
}Else If (fornow == 2){

Scene=Scene 1, Layer=Actions 2, Frame=3: Line 13: ';' expected
}Else If (fornow == 3){

Scene=Scene 1, Layer=Actions 2, Frame=3: Line 15: ';' expected
}Else If (fornow == 4){

Scene=Scene 1, Layer=Actions 2, Frame=3: Line 17: ';' expected
}Else{

Why, why WHY is it doing this?

Syntax Error In If Statement Using Variables
Hi guys.

I've got a problem with a script.

This is an example from part of the script. The problem is that the script "_root.main.gotoAndPlay("shut");" doesn't execute, even though I've just defined that _global.moviename is equal to "front";


Code:
_global.moviename = "front";
this.btn1.onRelease = function() {
if (_global.moviename != "second") {
_global.moviename = "second";
if (_global.moviename == "front") {
_root.main.gotoAndPlay("shut");
} else {
_root.container.gotoAndPlay("close");
}
}
};
Can anyone give me a clue to, what's wrong with this?

Thanks a lot.

Syntax For Using Scene Variable In To Goto Statement
I have a variable named "destination" that I set based on button selections at various points.

My intent is to run some more frames then redirect the movie flow to the scene with the name that matches the value of the "destination" variable.

I can't figure out the correct syntax for the goto action, though.

Please help!!!

Thanks in advance.

Syntax For Conditional Statement With Array Position...
Okay guys,

What am I doing wrong now?

This is my code:

trace(_iconWood1b[4]);
if (_iconWood1b[4] == iconWood_mc)
{
removeChild(_iconWood1b[4]);
delete _iconWood1b[4];
trace(_iconWood1b);
}

The output from the trace statement is:

[object iconWood_mc]

My delete and removeChild don't fire. I tried:

if (_iconWood1b[4] == [object iconWood_mc])

but it complained about the brackets.

Need Proper Syntax For "if" Statement, Please
in english, this is what i want to say (we're in Scene 2):

go to and play "Scene 3" when the playhead reaches frame 45 ONLY if "nailtarget1_mc" AND "nailtarget2_mc" are visible in frame 45.
if "nailtarget1_mc" and "nailtarget2_mc" are NOT visible when the playhead reaches frame 45, wait until they are visible, and then go to and play "Scene 3".

what is the exact code to write for this, and where would i put it? would i put it in my actions layer on frame 45? or on frame 1?

Please help me out; especially with the "else" part of it (waiting until those two MCs are visible in frame 45..)

"for" Statement Syntax
Hello.
I can't seem to track down how to write a for statement in AS.

ie.

for (i=0; i<8; i++) {
colorOut(i)_btn.useHandCursor = false;
}

the (i) is throwing the syntax off.

Any help?

Thanks,
1M.

Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails.
[Flash CS3 (Flash 8 available as well)]
[Actionscript V2 (AS3 Not available for this project. End result must be in AS2. Plus I haven't learned AS3 yet)]

Hi

Sorry about running two posts so close together, but I couldn't change the other one to reflect the changes I've made in my problem.

The 1st post dealt with my theory that my IF statement wasn't written correctly, and so failed. But I've since disproved that.

Okay here is the situation.
I isolated elements from a larger app that I'm putting together and the problem still followed.
The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.
The purpose of the application is to load an XML file(works)
Populate 2 text fields with information from the XML file(works)
Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {

data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {
if (success) {
//point to the first node with information
var track_xml = data_xml.firstChild;
//loop through each node
while (track_xml != null) {
//print out each node
test1 = track_xml.toString();
//point to the next node
track_xml = track_xml.nextSibling;

//Runs my code

//Define the contents of two text fields located in the movie
textOne = data_xml.firstChild.childNodes[3].firstChild;
textTwo = data_xml.firstChild.childNodes[5].firstChild;
trace("data_xml.firstChild.childNodes[3].firstChild = " + data_xml.firstChild.childNodes[3].firstChild);
trace("data_xml.firstChild.childNodes[5].firstChild = " + data_xml.firstChild.childNodes[5].firstChild);
/*dummyYes = data_xml.firstChild.childNodes[5].firstChild;
dummyNo = data_xml.firstChild.childNodes[6].firstChild;
dummyMaybeEmail = data_xml.firstChild.childNodes[3].firstChild;
dummyMaybeFax = data_xml.firstChild.childNodes[4].firstChild;*/

//Checks between the two text fields for a match
if (textOne == textTwo) {
trace("It is selected!" + textOne + " " + textTwo);
check_fax.selected = true;
} else {
trace("Ir is NOT selected!" + textOne + " " + textTwo);
check_fax.selected = false;
};


}
} else {
trace("error reading file");
}

delete data_xml;

};

data_xml.load("XML/dummy2 - email.xml");

};
After you read the code, you'll have noticed the trace commands I stuck in there.
They send this to the output panel:

Code:
data_xml.firstChild.childNodes[3].firstChild = 1
data_xml.firstChild.childNodes[5].firstChild = 1
Ir is NOT selected!1 1
So as far as I can see, it reads the XML file with no problems, it loads the text fields with no problem. But for some reason the IF statement refuses to recognize that both the XML nodes contain the same information.

If I alter the code like so:

Code:
textOne = 1;
textTwo = 1;
Then the IF statement works. It sees that the two text fields are identical in content, and the checkbox is selected.

So whats wrong with the Data from the XML file?
I haven't a clue.
I tried converting from a string to a Numeral using:

Code:
newText = Number(textOne);
But that didn't work, it just produced "NaN" when traced.
I tried populating the XML file with text versus numbers, still no luck.
What came from the trace:

Code:
data_xml.firstChild.childNodes[3].firstChild = hi
data_xml.firstChild.childNodes[5].firstChild = hi
Ir is NOT selected!hi hi
The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.
CheckBoxes are mandatory.
But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

I'd really appreciate some help and suggestions with this, I think I'm out of ideas.

Thanks

-Lem

Problem With Continue Statement And Label Statement
What am I doing wrong?

ActionScript Code:
var a = {
    a:[1,2,3,4,5,6,7,8,9,0],
    b:[1,2,3,4,5,6,7,8,9,0],
    c:[1,2,3,4,5,6,7,8,9,0],
    d:[1,2,3,4,5,6,7,8,9,0],
    e:[1,2,3,4,5,6,7,8,9,0],
    f:[1,2,3,4,5,6,7,8,9,0],
    g:[1,2,3,4,5,6,7,8,9,0]
}

outerLoop: for(var i in a){
    trace(i);
    for(var j in a[i]){
        trace(' '+j);
        continue outerLoop;
    }
}


Quote:




1039: Target of continue statement was not found.

Converting 'If Else' Statement To A 'switch' Statement
I am attempting to convert the following If statement to a Switch statement and I'm unclear as to the details of the execution of it. If someone could help me with this I would be very grateful. Here is the If statement followed by the shell of my attempted switch statement. TIA.

var spotOne:Boolean = true;
var spotTwo:Boolean = false;
var spotThree:Boolean = false;
var spotFour:Boolean = false;

btn.onRelease = function() {
f (spotOne) {
ball.slideTo(450, 100, 1);
spotOne = false;
spotTwo = true;
} else if (spotTwo) {
ball.slideTo(450, 150, .5);
spotTwo = false;
spotThree = true;
} else if (spotThree) {
ball.slideTo(100, 150, 1);
spotThree = false;
spotFour = true;
} else {
ball.slideTo(100, 100, 1);
spotFour = false;
spotOne = true;
}
};
---------------------------------
(attempt at conversion to switch)

var spotOne:Boolean = true;
var spotTwo:Boolean = false;
var spotThree:Boolean = false;
var spotFour:Boolean = false;

btn.onRelease = function() {
var location:Number = ?

switch(location) {
case spotOne:
ball.slideTo(450, 100, 1);
spotOne = false;
spotTwo = true;
break;
case spotTwo:
ball.slideTo(450, 150, .5);
spotTwo = false;
spotThree = true;
break;
case spotThree:
ball.slideTo(100, 150, 1);
spotThree = false;
spotFour = true;
break;
case spotFour:
ball.slideTo(100, 100, 1);
spotFour = false;
spotOne = true;
break;
}

Actins:wrong Syntax=correct, Right Syntax=wrong
Has any body made a similar observation:
when I want to load a pic into mc and write

_root.loadMovie("pic.jpg","mc");

I get a little window just the size of my pic but not my stage. But when I write:

_root.mc.loadMovie("pic.jpg");

everything is fine. I have a Mac, OS9.1. Is this related to the flashplayer in mac or what?

Need A Simple If/else Statement, SOSneed A Simple If/else Statement, SOS
hi, i'm a new learner.

currently, doing an exercise on button.
i want to do a navigation button like
www.fendi.com (pls refer, thx ; )
where button that onPress it will remain,
the rest not clicked, will fade out.

i think i need a right if/else statement.
i've tried few, but still not working.

i have my flash file attached.
hope some experts here can help.

hear from you guys soon, thanks

Syntax? Why Cant I Do This Way?
Please take a look at the code below. Could someone please explain to me why I cant call a instance by its name until it has played (or that seems to be the case). Basically I cant use the statement: "_root.Intro.gotoAndPlay(1);" in the "else" statement it only allow me to identify it as "_root.gotoAndPlay(2);". Why wont the actionscript allow me to call it as an instance name? It works fine in the "if" portion of the statement...I assume because it has already begun playing. Please clarify this for me.





on (release) {
if (_root.Intro._framesloaded > 0) {
stopAllSounds ();
_root.Stop();
_root.Intro.gotoAndPlay(1);
} else {
_root.gotoAndPlay(2);
}
}


Thanks for your help

Sean

Syntax Help
I have 30 webpages named 1.htm, 2.htm etc.
I'm trying to select one at random and open in a specific frame
Can I use random to construct the URL and getURL to open ?
And if so HOW ?
I'm sure I'm doing something wrong with all the Expression checkboxes but can't work out if there's something deeper wrong in my logic.

Dot Syntax
I have a for loop in which I want to do a tell target..since it's depreciated I thought I try dot syntax.
But I can't figure it out...what I want is this:
_root."char" add i.gotoAndPlay(14)
but that doesn't work
again please help...
Thanks

Dot Syntax
where can i find an in-depth walkthrough of flash 5's dot syntax? i have no experience with javascript, and i'm still using the slashes to target levels and movieclips. sigh... please help!

Dot Syntax
can someone convert this to flash 5 syntax (not that this won't work in 5

height = getProperty ("../../body_text/" add ../../body_text:scrollTarget add "/scrolling", _height );

thanks

Need Some Help With My Syntax
Here's the question:

If I have a variable x getting a random number

ie. x = Math.random()

How do I get the value of x to show up in a loadMovie URL?

ie. mymovie.swf?x

(I want x to be the random number, instead of it interpreting it as the actual letter x)

Any suggetions would greatly appreciated. Thanx.

Bad Syntax?
I know I'm just writing this wrong. I know this because I always write actions with variables wrong. How do I write:

'_root.darts.whole_game.buggy.bug_run_' + Number( _root.darts.whole_game.whichbug) + '.stop()'


I just want to send a Stop acticton to a movie clip using the variable "whichbug"

Thanks

Frequent-C

Bad Syntax
Why does this work
_root.Explode_1.duplicateMovieClip ("Explode_2", 1);


but this doesnt
"_root.Explode_" + _root.CurrentBall + ".duplicateMovieClip ("Explode_2", 1);"

Right Syntax?
how to attach several for example _levels 1-10:

for (...)
level[+n] ...

whats the right syntax for _level+variable

Need Some Syntax Help... I Think...
ok, in this example:

getURL("javascript:functionName(variable1,variable 2,cariable3)");


I want to use a dynamic variable for "functionName" so I can change the function I am calling at runtime.

so i would assume it would look something like:

getURL("javascript:"_root.variableName"(variable1, variable2,variable3)");

but that does not work... and this is most likely a result of my not understanding JS as well as I should.,.. but could anyone shed some light ont his for me?

Raiven...

thx in advance

Help With Dot Syntax
What am I doing wrong?

//This is how you would do it without the dot syntax
for(i=1; i<=10; i++) {
target = "target" + i;
tellTarget (target) {
gotoAndPlay(2);
}
}


//This doesnt't work because there is no movie named "target", only ones named "target1","target2"...

for(i=1; i<=10; i++) {
target = "target" + i;
target.gotoAndPlay(1);
}


//This is what I'm trying do do, but I can't get it to work in the for loop
target1.gotoAndPlay(1);
target2.gotoAndPlay(1);
target3.gotoAndPlay(1);
target4.gotoAndPlay(1);
target5.gotoAndPlay(1);
target6.gotoAndPlay(1);
target7.gotoAndPlay(1);
target8.gotoAndPlay(1);
target9.gotoAndPlay(1);
target10.gotoAndPlay(1);


Please help me, Thanks

Syntax
I need some help putting a loop together.

1 function coinHit() {
2 i = 1;
3 while (i<=3) {
4 if (_root.coin+i.hitTest(_root.ball)) {
5 _root.coin+i.play();
6 }
7 i++;
8 }
9 }


I have tried every combination I can think of, to get this to work.

I have three coins. (coin1, coin2 and coin3) I want to run a hitTest on each of those three coins, by calling this single function. However, I don't know how to write lines 4 and 5 correctly.

Can anyone help?

Also, where can I find this out in future? Does anyone know whwre I can look up concatenation like this? I always get stuck on this. A mental block /

Thanks.

Dot Syntax
hi | i'm building a shell for a movie and i'm having one problem. on the main timeline i have a movie with a button. on release, that button sets a variable on the main timeline and it also jumps back to the main timeline and has the playhead go to frame 3, i.e.

on(release) {
myVariable=1;
_root.gotoAndPlay(3);
}

-- this part is working fine --

on frame 3 of the main timeline is another movie which has a condition:

if(_root.myVariable=1 {
placeholder.loadMovie("one.swf");
}

the problem is that the placeholder movie clip (which has the instance name of placeholder) isn't loading the external movie -- which is targeted correctly. i also ran a trace statement in this second movie just to make sure that _root.myVariable=1; -- and it did. does anyone have any ideas why my placeholder isn't responding to the command?

thanks, - matt.

Syntax?
Is their an on line source for flash like the java doc are for java? To help explain all the syntax?

Thanks
JOptionPane

Syntax Help
Ok,

I'm trying to preload a external swf but i cant seem to get it to preload right. Can anyone help me out with the correct syntax?

Dot Syntax Help
I made a slideshow that fades in and out. With a link back to the root time line in the last frame like so _root.nextFrame(); then it would go to the next frame in the root time line and start the next movie and it all worked well. Then I made it in to a movie called slideshow with an instance name of sh can anyone tell me what the path would be to make it work again? What I basically have is a movie inside a movie and I want it to go to the next frame on the root time line of the outside movie. Hope this makes sense.

Thanks
JOptionPane

Another Old Syntax
hi,
what is this in mx actionscript n

its the ":" that paticularly confuses me

Code:
ny = eval("../" add n add ":ymov");

thanks
mark

Syntax Help?
Could anyone tell me the syntax for 'on click' tell a movie clip to go to frame 2 (of itself) and play. (ie: so a button is clicked and another movie clips plays from frame 2)

it used to be telltarget didn't it?

thanks

IF Syntax
I want to use the IF statement to determine whether or not a movie should play and would like to know how to lay it out.

These are the factors:

If the movie is at frame 6 then play the movie
but if is at any other frame then dont play.

This will be activated by clicking on a button.

Thanks - Joe

Syntax
Could anyone give me the correct syntax here.

If you are finding the x position of an object using it's library identifier you use this
for (x=0;x<100;x++)
x=_root["identifier"+i]._x

What is it if you are using it's instance name?

x=_root.identifier[i]._x

would this be it???

Thanks

What Does The Syntax 'in' Mean?
I have a sample .fla I got from FK that I am learning how to build an mp3 from. one of the functions is this.
code:
function select(){
for(i in playlist_mc.target_mc){
if(playlist_mc.target_mc[i].songNum != songNum){
playlist_mc.target_mc[i].gotoAndStop(1);
}
else{
playlist_mc.target_mc[i].gotoAndStop(2);
}

}

}


What does the 'in' mean in the line
for(i in playlist_mc.target_mc){

There is no listing for this in Flash's reference.

Syntax Help
Is this syntax correct? I'm not sure how to interpolate the i variable in this for loop:


Code:
for (i=1; i <= 3; i++) {
pic[i]_mc._alpha = 0;
}


What I'm trying to get is simply:

pic1_mc._alpha = 0;
pic2_mc._alpha = 0;
pic3_mc._alpha = 0;

Syntax
Hi

what is the syntax to specify something like this

idClients = new array("Party22","Fox22","Elite");
//load the names from the array (as dynamic text)
for(i=0;i<11;i++)
{
idText+i.text = idClients[i]; //this bit here
}

how do u write idText+i.text so it works as if idText+i is one variable ??? It should be something with [] but I can't remember. Also is there a way to maybe load these names from single external file insted of array and how would I specify as many variables as needed in one file so when u pull it in each text field pulls right variable contents. i know how to have a txt file with single variable but not multiple variables.

Cheers

What's The Syntax?
Hi all, I have a movie with an empty MC called "container" in which I need to attach "pages" from the library. on each page I'll have 2 buttons, next and previous. Also on the first frame of each page I have this:

_root.currentpage = 1; (or 2, 3, 4 etc)

The pages are linked as page1, page2, page3 etc.

What I want to do is have the "next" button attach the next page by it's number and then go to a frame label on that page. I don't know the proper syntax but here's what I've got:

on (release) {

container.attachMovie("page" + (_root.currentpage + 1) ,"page" +(_root.currentpage + 1),1);

container.page+(_root.currentpage).gotoAndStop("pa ge");
}

Can anyone help me out?

Syntax For 'using'
I recently saw in the middle of a thread a cunning way of putting 'using' then I think, a path, and then a whole load of variables so you didn't have to rewrite the path the whole time.

Would be really useful if someone could let me know what the syntax was.

Thanks.

XML Syntax
Hi, I get an error when trying to view the following xml.

<coworker1 imageURL="Einstein.jpg" linkURL="http://iwww.org.distr.com/news_detail.asp?news_id=88183"></coworker1>

The '=' sign is not accepted. Anyone now how to rewrite the XML to get it to work.

Thanks!
/october

Syntax
I'm sure this is easy but i don't know why this isn't working. The path is correct but it keep giving me this error. It is written on an MC.

onClipEvent (enterFrame)
_root.cater.cattext._visible = false;


BUG REPORT
Scene=catering, Layer=cater, Frame=1: Line 2: '{' expected
_root.cater.cattext._visible = false;

Syntax
hi

what is the syntax to get dot+i to work ?
dot is the name of a movie clip ??? undefined at the moment?

for(i=1;i<96;i++)
{
cordX[i] = getProperty((dot+i), _x);

cheers

For.in Syntax Help.
Brain is not working properly today.
Why isnt this code working? I need to continue coding yet Iam totally stumped why this isnt working. What Iam I not seeing here ?


Quote:




onClipEvent (load) {
for (c = 1; c <= 5; c++) {
_root.mc_bm.mc0[c]._visible = 0
//_root.mc_bm.mc01._visible = 0
}
}






Quote:




onClipEvent (load) {
for (c = 1; c <= 5; c++) {
Trace( "mc0"+[c]+"._visible = 0" )
Eval(mc0[c]._visible = 0)
//mc04._visible = 0
}
}

Syntax Help
code:
this.["MC"+b].["holder"+b].loadMovie("totalmovie"+b+".swf");

this.["MC"+b]["holder"+b].loadMovie("totalmovie"+b+".swf");

this.["MC"+b+".holder"+b].loadMovie("totalmovie"+b+".swf");


Flash doesnt like any of these....

What is correct here

Syntax
hi.. i came across this fla file..

and it has this line of code in it.

/:target_bg = _level0.target_bg0;

what does "/:" mean?

and how do i find "_level0.target_bg0" in the movie without going through the entire libray list.. i tried using the movie explorer.. but i cant find "target_bg0".

any help guys?

Syntax Help.....?
Hi guys.

I have the following code, where rana,ranb,ranc and rand are all numbers. boolVal is either > or <.


Code:
if ((rana/ranb)+boolVal+(ranc/rand))
{
//do something
}
else
{

//do something else
}


The trouble is it doesn't work!! I'm sure there's a way of passing a var (boolVal) into an if statement like this, but my syntax is incorrect.

Can someone please tell me how it's done?

Copyright © 2005-08 www.BigResource.com, All rights reserved