在当前帧 as3 上工作时将数据保存在另一帧的动态文本中
Save data in dynamical text in another frame while working on current frame as3
我正在使用 Flash actionscript 3 创建一个使用 combobox
的测验。我使用了以下代码。
stop();
box1.addEventListener(Event.CHANGE, changeHandler);
\box1 is combobox 1
function changeHandler(event:Event):void
{
if (box1.selectedIndex == 1)
\there are two values in combobox with index 1 and 2
{
name1.text = "1) Wrong";
\name1 is the dynamical text box
}
else if (box1.selectedIndex == 2)
{
name1.text = "1) Right";
}
else
{
name1.text = "";
}
}
我将动态文本框放在第 4 帧,而组合框在第 2 帧
我创建了两个组合框。当我 select 来自组合框 1 的选项时,我收到如下错误:Error #1009: Cannot access a property or method of a null object reference.
所以我将动态文本层从第 2 帧扩展到第 4 帧。但是在 运行 程序之后,结果仅在 select 从组合框 1 中输入值后立即显示在第 2 帧中;以便结果显示在 selecting 组合框 2 之前。
我需要的是将结果保存在第 4 帧中,只有当我使用 next
按钮转到该帧时才会显示它。
如有任何帮助,我们将不胜感激。我是 Flash actionscript 的初学者。(我更喜欢使用界面而不是编码)。
如果满足所有条件,则应显示您的输出。所以代码可能看起来像这样
if (condition1 && condition2 && condition3 && condition4)
{
// do stuff
}
我正在使用 Flash actionscript 3 创建一个使用 combobox
的测验。我使用了以下代码。
stop();
box1.addEventListener(Event.CHANGE, changeHandler);
\box1 is combobox 1
function changeHandler(event:Event):void
{
if (box1.selectedIndex == 1)
\there are two values in combobox with index 1 and 2
{
name1.text = "1) Wrong";
\name1 is the dynamical text box
}
else if (box1.selectedIndex == 2)
{
name1.text = "1) Right";
}
else
{
name1.text = "";
}
}
我将动态文本框放在第 4 帧,而组合框在第 2 帧
我创建了两个组合框。当我 select 来自组合框 1 的选项时,我收到如下错误:Error #1009: Cannot access a property or method of a null object reference.
所以我将动态文本层从第 2 帧扩展到第 4 帧。但是在 运行 程序之后,结果仅在 select 从组合框 1 中输入值后立即显示在第 2 帧中;以便结果显示在 selecting 组合框 2 之前。
我需要的是将结果保存在第 4 帧中,只有当我使用 next
按钮转到该帧时才会显示它。
如有任何帮助,我们将不胜感激。我是 Flash actionscript 的初学者。(我更喜欢使用界面而不是编码)。
如果满足所有条件,则应显示您的输出。所以代码可能看起来像这样
if (condition1 && condition2 && condition3 && condition4)
{
// do stuff
}