操作脚本3升级到Flash CS6后出错

时间:2013-01-15 07:40:32

标签: actionscript-3 flash flash-cs6

我最近从CS4升级到Flash CS6。在CS6之前我没有收到任何关于此脚本的错误,但现在我收到以下错误:

符号'wholePlayer,Layer,'Layer9'Frame 3第12行 - 1152存在与继承定义flash.display:movieclip.isPlaying在名称空间public中存在冲突。

这是我的剧本:

import flash.net.URLRequest;

stop();

// Create the sound object
var snd:Sound = new Sound();
// Assign a var name for the sound channel
var channel:SoundChannel;
// Initialize the pause position
var pausePosition:int = 0;
// Boolean value for button functions, to switch in the conditionals

var isPlaying:Boolean = false;  ******HERE'S THE LINE REFERENCED IN THE ERROR*******

// Set the play buffer to 5 seconds, you can adjust this
var context:SoundLoaderContext = new SoundLoaderContext(5000,true);
// Load the requested URL sound into the snd var, along with context
snd.load(req, context);
// Create the play channel using snd
channel = snd.play();// Start playing
// --- Stop sound from autoplaying --- \\
if(firstTime == true)
{
    stopSound(null);
}

这是.MP3播放器的脚本。我已经指出了上面错误中提到的那一行。任何帮助将不胜感激。感谢。

索兰

1 个答案:

答案 0 :(得分:2)

Flash Player的第11版添加了一个名为 isPlaying 的MovieClip属性。重命名变量将解决问题。