
Welcome Guest
|
#1
|
||||
|
||||
|
Javascript in Director MX 2004
So they added JS syntax to Director, making it much easier for us Actionscripters to head on over and dip our toes for certain projects, that's what was meant to happen...
It seems they didn't implement the ECMA standard too well due to incompatibilities with lingo, can anyone really good at understanding scoped languages (Tim u there :P) take a look at this and tell me what they think: Actionscript:
trace("Global script scope");
_global.a = 1;
function locals() {
a = 6;
trace(a); // 6
delete a;
trace(a); // 1
// var a = 5; // If you uncomment this line, the previous 2 traces, trace "5" also ???
}
function locals2() {
var a = 10;
trace(a); // 10
}
function locals3() {
trace (a); // 1
this.a = 8;
trace(a); // 8
}
function locals4() {
delete a; // Comment out this line & next trace is "8" ??
delete _global.a; // Comment out this line & next trace is "1" ??
trace(a); // Don't comment either and trace is "undefined"
}
locals(); // Expected results until line is uncommented
locals2(); // Expected results
locals3(); // Expected results
locals4(); // What the hell is going on when you comment out linesRich p.p.s Anyone managed to get code coloring working properly with JS syntax?
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
|
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My Flash and JavaScript don't like each other. | BlackHatHunter | Flash MX 2004 |
4 | 07-25-2006 06:15 PM |
| Flash and javascript? | stunter | Flash MX 2004 |
0 | 07-13-2005 08:47 AM |
| New Screen Capture/Recording Extension for Flash MX 2004 | curi1122 | New Softwares | 6 | 06-16-2005 02:42 PM |
| Flash, Javascript, Do something on variable change... | Splitz | Flash MX 2004 |
7 | 04-20-2005 11:58 AM |
| MX 2004 Pro - Javascript TCallLabel Oddities | Weevil | Flash MX ActionScript |
0 | 05-20-2004 04:23 PM |






