1

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

Symbol 'wholePlayer,Layer,'Layer9'Frame 3 Line 12 - 1152 与命名空间 public 中的继承定义 flash.display:movieclip.isPlaying 存在冲突。

这是我的脚本:

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 播放器的脚本。我已经指出了上面错误中提到的那一行。任何帮助将不胜感激。谢谢。

索兰

4

1 回答 1

3

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

于 2013-01-15T08:12:44.307 回答