tests: Test net.getClassByAlias
This commit is contained in:
parent
ab99eb3e09
commit
7e40abe0f0
|
@ -0,0 +1,26 @@
|
|||
package {
|
||||
import flash.display.Sprite;
|
||||
public class Test extends Sprite {
|
||||
public function Test() { }
|
||||
}
|
||||
}
|
||||
|
||||
import flash.net.*;
|
||||
|
||||
try {
|
||||
getClassByAlias("toString");
|
||||
} catch (e) {
|
||||
trace(e);
|
||||
}
|
||||
|
||||
try {
|
||||
getClassByAlias("MyClass");
|
||||
} catch (e) {
|
||||
trace(e);
|
||||
}
|
||||
|
||||
final class TestClass {
|
||||
};
|
||||
|
||||
registerClassAlias("MyClass", TestClass);
|
||||
trace(getClassByAlias("MyClass"));
|
|
@ -0,0 +1,3 @@
|
|||
ReferenceError: Error #1014: Class toString could not be found.
|
||||
ReferenceError: Error #1014: Class MyClass could not be found.
|
||||
[class TestClass]
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
num_frames = 1
|
Loading…
Reference in New Issue