<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
If you really, really need AS3, than Xerte 3 is an option. But that is
a bit of a different beast, (i.e. no templates yet)<br>
<br>
Tom<br>
<br>
Op 1-7-2011 14:11, Deborah Delin schreef:
<blockquote
 cite="mid:BANLkTikSy+-NxQu9BgSy+JYR1d8f0d2B0A@mail.gmail.com"
 type="cite">
  <div dir="ltr"><font>Hi,<br clear="all">
  <br>
  </font>
  <div></div>
  <div><font>I may be duplicating one part of this plea - my previous
post didn't seem to come through.</font></div>
  <div><font><br>
  </font></div>
  <div><font>I have to use Actionscript 3 for a particular exercise and
the code, which works fine in the SWF, doesn't work in Xerte.  Is there
a problem with Xerte and AS3?</font></div>
  <div><font><br>
  </font></div>
  <div><font>This is the code:</font></div>
  <div><font><br>
  </font></div>
  <div><font>1) To attach sound to a movie clip:</font></div>
  <div><font><br>
  </font></div>
  <div><font>
  <div>/var snd:grey_rod= new grey_rod();</div>
  <div><br>
  </div>
  <div>//speaker_grey.addEventListener (MouseEvent.CLICK,
soundbutton_Handler);</div>
  <div><br>
  </div>
  <div>//function soundbutton_Handler (e:MouseEvent):void {</div>
  <div>//snd.play();</div>
  <div><br>
  </div>
  <div>2) for a drag and drop game:</div>
  <div><br>
  </div>
  <div>
  <div>var objectoriginalX:Number;</div>
  <div>var objectoriginalY:Number; </div>
  <div><br>
  </div>
  <div>triangle_mc.buttonMode = true; </div>
  <div>triangle_mc.addEventListener(MouseEvent.MOUSE_DOWN,pickupObject); </div>
  <div>triangle_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);</div>
  <div><br>
  </div>
  <div>function pickupObject(event:MouseEvent):void { </div>
  <div>  event.target.startDrag(true); </div>
  <div>  event.target.parent.addChild(event.target); </div>
  <div>  objectoriginalX = event.target.x; </div>
  <div>  objectoriginalY = event.target.y; </div>
  <div>    response_txt.text = " "</div>
  <div>} </div>
  <div>function dropObject(event:MouseEvent):void { </div>
  <div>  event.target.stopDrag(); </div>
  <div>  var matchingTargetName:String = "target" + <a
 moz-do-not-send="true" href="http://event.target.name">event.target.name</a>; </div>
  <div>  var matchingTarget:DisplayObject =
getChildByName(matchingTargetName); </div>
  <div>  if (event.target.dropTarget != null &&
event.target.dropTarget.parent == matchingTarget){ </div>
  <div>   event.target.removeEventListener(MouseEvent.MOUSE_DOWN,
pickupObject); </div>
  <div>   event.target.removeEventListener(MouseEvent.MOUSE_UP,
dropObject); </div>
  <div>   event.target.buttonMode = false; </div>
  <div>   event.target.x = matchingTarget.x; </div>
  <div>   event.target.y = matchingTarget.y;</div>
  <div>    response_txt.text = "You did it!"</div>
  <div>  }else { </div>
  <div>   event.target.x = objectoriginalX; </div>
  <div>   event.target.y = objectoriginalY; </div>
  <div>    response_txt.text = "Try again"</div>
  <div>   </div>
  <div>  }</div>
  <div>}</div>
  </div>
  <div><br>
  </div>
  <div>Please help - why might Xerte not like this code?</div>
  <div><br>
  </div>
  <div>Deborah</div>
  <div><br>
  </div>
  </font></div>
  </div>
  <br>
  <p>
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.
  </p>
  <p>
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.
  </p>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Xerte mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a>

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.

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196

</pre>
</body>
</html>