• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 143
  • Last Modified:

calling a function from html (problem)

im callin a function from html

function redirect(frame) {
      if (this._currentframe != frame) {
            removeAllTextFields();
            gotoAndStop(frame);
      }
}

the if condition doesnt work. can anyone look into it? i want the actions to only be performed if the parameter "frame" (passed by the html) is NOT the same as the currentframe.
0
mrsam007
Asked:
mrsam007
1 Solution
 
oddhoursCommented:
function redirect(frame:Number) {
      trace("this._currentframe = " + this._currentframe);
      trace("frame = " + frame);
  if (this._currentframe != frame) {
            trace("this._currentframe and frame are NOT equal.");
    //removeAllTextFields();
            //gotoAndStop(frame);
            //Any other actions you choose...
      }else{
            trace("this._currentframe and frame ARE equal.");
  }
}


That’s the actionscript.

If you're having trouble with the communication between the page and the swf, the JavaScript to swf communication is explained here: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15683

Hope this helps.
0
 
blue-genieCommented:
Hi, I'm not sure I understand the question.
You have the method in your swf file and you're calling that method from the html?
how are you doing that? why are you doing that?
why not just handle it in the flash.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now