  | | | AS 2.0 accessing prototyped methods in an external class file | AS 2.0 accessing prototyped methods in an external class file 2004-03-17 - By Johan Nel
Back declare ur class as dynamic
dynamic class bla extends blabla{
}
-- --Original Message-- -- From: Derrick Grigg [mailto:derrick@(protected)] Sent: Wednesday, March 17, 2004 8:53 PM To: flashcoders@(protected) Subject: [Flashcoders] AS 2.0 accessing prototyped methods in an external class file
I have added a new method to the intrinsic XML and XMLNode classes in AS 2.0 using the 'prototype' method. I had to do this because the XML and XMLNode classes are so intertwined I cannot easily extend both since there is no way to access the underlying code for either class in order to make sure that when a new node/element gets added it adds the new class (say XMLNode2) with the new methods vs the current one.
The new methods work fine within the Flash movie, however if I try to access the new 'prototyped' methods from an external class file I get a compiler error saying the method does not exist. I think the problem lies in the fact that the classes get compiled before anything from an '#include' statement (my prototyped methods).
Does anyone know how to work around this problem??
-- ---- ---- ---- ---- ---- ---- ----- Derrick Grigg Web Application Developer 905-479-5555 dgrigg@(protected) www.innovasium.com
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107226 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107228 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |