A function has to “run”(execute) inside the onEnterFrame event method but the function does not seem to run when called. Why?
Example:
_root.onEnterFrame()=function(){
if(something==true){
performFunction();
}
}
function performFunction()
{
}
system
2
shouldn’t it be
this.onEnterFrame = function() {
or maybe
_root.onEnterFrame = function() {
There shouldn’t be the () after the onenterframe…
system
3
sorry that was a typo.there is actually no “()” in the code.
system
4
actually,there is no mistake in the code. but you can use
[AS]if(something){
}[/AS]
instead of
[AS]
if(something==true){
}[/AS]
…
and u can place
function performFunction()
{
}
before
_root.onEnterFrame()=function(){
if(something==true){
performFunction();
}
}
e.s.x.s