Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 跳转到下一帧时出现错误#1009_Actionscript 3_Flash - Fatal编程技术网

Actionscript 3 跳转到下一帧时出现错误#1009

Actionscript 3 跳转到下一帧时出现错误#1009,actionscript-3,flash,Actionscript 3,Flash,我得到一个TypeError:跳转到下一帧时出错#1009 此代码位于第3帧中: this.addEventListener(Event.ENTER_FRAME,activate); function activate(event:Event) { if (fname.length > 2 && sname.length > 2 && cname.length > 1) { bt_Send.alpha = 1.0; b

我得到一个TypeError:跳转到下一帧时出错#1009

此代码位于第3帧中:

this.addEventListener(Event.ENTER_FRAME,activate);


function activate(event:Event)
{
  if (fname.length > 2 && sname.length > 2 && cname.length > 1)
  {
    bt_Send.alpha = 1.0;
    bt_Send.enabled = true;
    enableIt = true;
  }
  else
  {
    bt_Send.alpha = 0.05;
    bt_Send.enabled = false;
    enableIt = false;
   }
}
当我点击“下一步”按钮时,电影跳转到第4帧。单击按钮后,会出现new_cics_fla::MainTimeline/activate()处的类型错误:错误35; 1009

第4帧中未提及功能“激活”

电影正常播放,但我想知道为什么我会收到这个信息

提前谢谢


干杯,Sergio

听起来您的
enterFrame
正在继续执行,但是
激活
方法作用的属性在您发送播放头的帧中不可用

尝试在处理单击下一步按钮的方法中删除
enterFrame

function nextClick(event:MouseEvent):void 
{
    // Clean up the enterFrame
    this.removeEventListener(Event.ENTER_FRAME,activate);

    // Now advance to the next frame
    this.gotoAndPlay(4);
}
工作得很有魅力!谢谢net.uk.sweet。你真是太好了。