actionscript3 -动作script3升级到Flash CS6后出现错误



我最近从CS4升级到Flash CS6。直到CS6,我才收到这个脚本的任何错误,但现在我收到以下错误:

Symbol 'wholePlayer,Layer,'Layer9'Frame 3 Line 12 - 1152与继承的定义flash.display: moviclip存在冲突。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播放器的脚本。我已经指出了上面错误中提到的行。任何帮助都将非常感激。谢谢。

塘鹅

版本11的Flash播放器增加了一个名为isPlaying的MovieClip属性。重命名变量可以解决这个问题。

最新更新