PDA

View Full Version : if...then??



cookie
February 24th, 2003, 07:51 PM
Ok I'm an actionscript newbie! I'm trying to make one function begin once another function has stopped, make sense?

ex.

function 1 (){}
function 2 (){}

when function 1(); is complete
start function 2();

I tried using an if statement:

if(function 1() == "something"){
function 2()
}

don't know what the "something" should be! :sure:

kode
February 24th, 2003, 09:10 PM
... hmmm :sigh:

something would be anything you want it to be !!

read this tutorial by ilyas
http://www.kirupa.com/developer/actionscript/tricks/dynamicevent.asp

ahmed
February 24th, 2003, 09:12 PM
try


if (function1()) { function2()}

if not, try adding this line at the end of function 1


return true

cookie
February 25th, 2003, 04:21 AM
No if I use return true then both functions happen simultaneously! Let me clarify what I have


onClipEvent(load){
function xscale(){
if statement in here
}
function yscale(){
if statement in here
}
}
onClipEvent(enterFrame){
xscale();
}

Ok this works and will evaluate function xscale, but as soon as that function is complete I want to evalute yscale!:q:

cookie
February 25th, 2003, 04:02 PM
Could someone please help me out with this! (-:

kode
February 25th, 2003, 06:27 PM
use dynamic event handlers cookieme :)

again .. http://www.kirupa.com/developer/actionscript/tricks/dynamicevent.asp