in object oriented programing, objects on the stage are not used, so ideal is to attach them from library and give them a reference. and because you switched to mtasc i suppose you want to do OOP. i recomend you to use haXe instead anyway, mtasc is not developed anymore.<br>
<br><div class="gmail_quote">On Fri, May 23, 2008 at 2:47 PM, Alistair Colling <<a href="mailto:alistair.colling@fpp.net">alistair.colling@fpp.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hiya, I've started compiling using MTASC from Textmate using the 'Build with MTASC' option. I'm using the XTraceTest.as file (at the bottom) and it compiles great.<br>
<br>
What I can't figure out is how to target the Stage from my class, if I have movieclips on there that I want to target for example. I can target the _root but this isn't ideal.<br>
<br>
Any suggestions much appreciated<br>
<br>
<br>
Cheers :)<br>
Ali<br>
<br>
<br>
<br>
<br>
<br>
import com.mab.util.debug;<br>
<br>
class XTraceTest extends MovieClip{ <br>
static function main() {<br>
debug.waitForSocketConnection = true;<br>
debug.initSocket("<a href="http://127.0.0.1" target="_blank">127.0.0.1</a>");<br>
debug.trace("Yo, whaz upppppp:?");<br>
debug.trace("This is a really really really really really really really really really really really long string");<br>
debug.trace("[DEBUG] This is a debug string");<br>
debug.trace("[WARN] This is a warning");<br>
debug.trace("[NORMAL] This is a normal formatter string");<br>
debug.trace("[CRITICAL] This is a critical warning");<br>
<br>
for(var a = 0; a < 10; a++) {//say hi 10 times<br>
debug.trace("Hi server! " + a);<br>
}<br>
<br>
var testOb = {question:"Are you cool?", response:"Of course!"};<br>
debug.dumpObject(testOb);<br>
}<br>
<br>
}<br>
<br>
<br>
<br>
--------------------------------------------------------------------------<br>
Alistair Colling<br>
Interactive Developer<br>
<br>
FPP Brand Communications (Newcastle upon Tyne)<br>
The Courtyard<br>
Dinsdale Place<br>
Sandyford<br>
Newcastle upon Tyne NE2 1BD<br>
Telephone: +44 (0)191 261 6662<br>
Fax: +44 (0)191 233 2511<br>
<br>
This transmission is confidential and intended solely for the person or organisation to whom it is addressed.<br>
It may contain privileged and confidential information. If you are not the intended recipient, you should not<br>
copy, distribute or take any action in reliance on it. If you have received this transmission in error, please<br>
notify the sender at the e-mail address above.FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD.Registered Number 3775564. Registered in England and Wales. Visit our website at <a href="http://www.fpp.net/" target="_blank">http://www.fpp.net/</a><br>
<br>
______________________________________________________________________<br>
For new threads USE THIS: <a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
(threading gets destroyed and the universe will collapse if you don't)<br>
<a href="http://lists.macromates.com/mailman/listinfo/textmate" target="_blank">http://lists.macromates.com/mailman/listinfo/textmate</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Cristi<br><a href="http://www.ralcr.com">www.ralcr.com</a>