<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><font style=""><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif">var Sound1:Sound = new Sound()</font></font><br><br><br>AS3 declarations, no?<br>AS2 only, and in the case of Xerte I don't think you can set var either.<br><br>my_sound = new Sound();<br><br><br><div><hr id="stopSpelling">Date: Tue, 12 Jul 2011 21:33:09 +0300<br>From: admin@strivney.com<br>To: xerte@lists.nottingham.ac.uk<br>Subject: [Xerte] SWF Sound Problem<br><br><div dir="ltr"><font color="#000066"><font face="verdana,sans-serif">Hi,<br clear="all"></font></font><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif">I have put sound on some movie clips in a drag and drop exercise. They play fine in the SWF but not in Xerte.<br>
</font></div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif">The sound code, which is in the main timeline is as follows:</font></div>
<div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><div>var Sound1:Sound = new Sound()</div><div>
Sound1.attachSound("Sound1")</div><div><br></div><div>And in the movie clip's onPress code (also in main timeline):</div><div><br></div><div><div>movie_clip.onPress = function(){</div><div><span class="ecxApple-tab-span" style="white-space: pre;"> </span>Sound1.start()</div>
<div><span class="ecxApple-tab-span" style="white-space: pre;"> </span>this.startDrag();</div></div><div><br></div><div>I also have this._lockroot = true; in the first frame of the movie.</div><div><br></div><div>In case it's relevant, I have had no problems in Xerte with adding sound dynamically to buttons with the following:</div>
<div><br></div><div><div><div>on (press) {</div><div><span class="ecxApple-tab-span" style="white-space: pre;"> </span>yellow = new Sound(this);</div><div><span class="ecxApple-tab-span" style="white-space: pre;"> </span>yellow.attachSound("yellow");</div>
<div><span class="ecxApple-tab-span" style="white-space: pre;"> </span>yellow.start(0, 1);</div><div>}</div></div></div></font><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><div><br></div><div>But this time I need the sound on movie clips for the drag and drop. </div>
<div><br></div><div>Any suggestions gratefully appreciated!</div><div><br></div><div>Deborah</div><div><br></div><div><br></div></font></div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><br>
</font>
</div><div><font class="ecxApple-style-span" color="#000066" face="verdana, sans-serif"><br></font></div></div>
<br>
This message and any attachment are intended solely for the addressee and may
contain confidential information. If you have received this message in error,
please send it back to me, and immediately delete it. Please do not use,
copy or disclose the information contained in this message or in any attachment.
Any views or opinions expressed by the author of this email do not necessarily
reflect the views of the University of Nottingham.
<BR>
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
<BR>
<br>_______________________________________________
Xerte mailing list
Xerte@lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.</div> </div></body>
</html>