Executing a function in onEnterFrame

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()
{
}

shouldn’t it be

this.onEnterFrame = function() {

or maybe

_root.onEnterFrame = function() {

There shouldn’t be the () after the onenterframe…

sorry that was a typo.there is actually no “()” in the code.

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