PDA

View Full Version : stupid easy questions...



kpxnamja
April 24th, 2006, 02:40 PM
hey I have several "noob-ed" questons:

1. Is there any way to do an "if-" statement on a frame?
I believe an on- something is needed.

2. If I want to create a timer, (this game will be played from a cd) what will dynamically display the time, what will be the best option?
getTimer()? or a setInterval? What's the pro's / con's of both?

3. I seem to have a depth issue where a mc seems to over lap the other mc even though perspective wise it shouldn't *(sorry bad wording)* basically how do I intertwine two mc top/bottom? I hear "swap-" something does the job?

sorry for the handful of questions... thanks.

KIERIOSHIMOTO
April 24th, 2006, 03:02 PM
yer how are you going to use the if statement on the frame? usually if you used an if statement on the frame it would be inside a function created on the frame.

KIERIOSHIMOTO
April 24th, 2006, 03:09 PM
i dont know about your depth thing but you time, i found an example on http://www.n99creations.com.

Joppe
April 24th, 2006, 03:33 PM
_root.movieclip.swapDepths(*number* or _getNextHighestDepth)

kpxnamja
April 24th, 2006, 04:27 PM
ah thanks for the reply, but I have a follow up...

For the if statement on a frame, If I wanted to say compare something would this work?

function test(x) {
if (x==0)
do this;
}

test(0);

without a handler?
---

For the swap method,

_root.movieclip.swapDepths(*number* or _getNextHighestDepth)

is 0 the highest in rank?

Nich
April 24th, 2006, 05:30 PM
0 is lowest
As far as I know, anyhting that you draw/drag on to the stage manually gets a negative depth value.

KIERIOSHIMOTO
April 24th, 2006, 11:51 PM
ah thanks for the reply, but I have a follow up...

For the if statement on a frame, If I wanted to say compare something would this work?

function test(x) {
if (x==0)
do this;
}

test(0);

without a handler?
---

For the swap method,

_root.movieclip.swapDepths(*number* or _getNextHighestDepth)

is 0 the highest in rank?

try it..

function test();
if (5=>20){
trace ("5 is equal to less then ten");
}
test ();