gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11196: Remove as3-related package c


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11196: Remove as3-related package code.
Date: Thu, 02 Jul 2009 14:10:56 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11196
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-07-02 14:10:56 +0200
message:
  Remove as3-related package code.
  
  Stub QName implementation.
  
  Find properties more successfully in AVM2.
removed:
  libcore/asobj/flash/accessibility/accessibility_pkg.cpp
  libcore/asobj/flash/accessibility/accessibility_pkg.h
  libcore/asobj/flash/desktop/desktop_pkg.cpp
  libcore/asobj/flash/desktop/desktop_pkg.h
  libcore/asobj/flash/errors/errors_pkg.cpp
  libcore/asobj/flash/errors/errors_pkg.h
  libcore/asobj/flash/events/events_pkg.cpp
  libcore/asobj/flash/events/events_pkg.h
  libcore/asobj/flash/media/media_pkg.cpp
  libcore/asobj/flash/media/media_pkg.h
  libcore/asobj/flash/printing/printing_pkg.cpp
  libcore/asobj/flash/printing/printing_pkg.h
  libcore/asobj/flash/sampler/sampler_pkg.cpp
  libcore/asobj/flash/sampler/sampler_pkg.h
  libcore/asobj/flash/system/System_as.cpp
  libcore/asobj/flash/system/system_pkg.cpp
  libcore/asobj/flash/system/system_pkg.h
  libcore/asobj/flash/ui/ui_pkg.cpp
  libcore/asobj/flash/ui/ui_pkg.h
  libcore/asobj/flash/utils/utils_pkg.cpp
  libcore/asobj/flash/utils/utils_pkg.h
  libcore/asobj/flash/xml/xml_pkg.cpp
  libcore/asobj/flash/xml/xml_pkg.h
added:
  libcore/asobj/QName_as.cpp
  libcore/asobj/QName_as.h
  testsuite/as3compile.all/QName.as
  testsuite/as3compile.all/System.as
renamed:
  libcore/asobj/System_as.cpp => libcore/asobj/flash/system/System_as.cpp
modified:
  libcore/PropertyList.cpp
  libcore/abc_function.cpp
  libcore/abc_function.h
  libcore/asMethod.cpp
  libcore/asMethod.h
  libcore/asobj/Global.cpp
  libcore/asobj/Makefile.am
  libcore/asobj/Namespace_as.cpp
  libcore/asobj/Namespace_as.h
  libcore/asobj/flash.am
  libcore/asobj/flash/accessibility/accessibility.am
  libcore/asobj/flash/desktop/desktop.am
  libcore/asobj/flash/display/display_pkg.cpp
  libcore/asobj/flash/display/displayclasses.h
  libcore/asobj/flash/errors/errors.am
  libcore/asobj/flash/events/events.am
  libcore/asobj/flash/external/external_pkg.cpp
  libcore/asobj/flash/external/externalclasses.h
  libcore/asobj/flash/filters/filters_pkg.cpp
  libcore/asobj/flash/filters/filtersclasses.h
  libcore/asobj/flash/flash_pkg.cpp
  libcore/asobj/flash/flashclasses.h
  libcore/asobj/flash/geom/geom_pkg.cpp
  libcore/asobj/flash/geom/geomclasses.h
  libcore/asobj/flash/media/media.am
  libcore/asobj/flash/net/net_pkg.cpp
  libcore/asobj/flash/net/netclasses.h
  libcore/asobj/flash/printing/printing.am
  libcore/asobj/flash/sampler/sampler.am
  libcore/asobj/flash/system/system.am
  libcore/asobj/flash/text/text_pkg.cpp
  libcore/asobj/flash/text/textclasses.h
  libcore/asobj/flash/ui/ui.am
  libcore/asobj/flash/utils/utils.am
  libcore/asobj/flash/xml/xml.am
  libcore/namedStrings.cpp
  libcore/namedStrings.h
  libcore/parser/abc_block.cpp
  libcore/vm/Machine.cpp
  testsuite/as3compile.all/Makefile.am
  libcore/asobj/flash/system/System_as.cpp
    ------------------------------------------------------------
    revno: 11194.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 07:31:02 +0200
    message:
      Add namespace to member dump.
    modified:
      libcore/PropertyList.cpp
    ------------------------------------------------------------
    revno: 11194.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 07:45:49 +0200
    message:
      Dump namespace in the other dump function too.
    modified:
      libcore/PropertyList.cpp
    ------------------------------------------------------------
    revno: 11194.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 07:46:01 +0200
    message:
      Use get_member in find_prop_strict, as getMember doesn't distinguish 
between
      not found and undefined.
    modified:
      libcore/vm/Machine.cpp
    ------------------------------------------------------------
    revno: 11194.1.5
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 08:19:09 +0200
    message:
      Add test for QName.
    added:
      testsuite/as3compile.all/QName.as
    modified:
      testsuite/as3compile.all/Makefile.am
    ------------------------------------------------------------
    revno: 11194.1.6
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 08:20:44 +0200
    message:
      Add xchecks.
    modified:
      testsuite/as3compile.all/QName.as
    ------------------------------------------------------------
    revno: 11194.1.7
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 08:34:39 +0200
    message:
      Drop debug logging.
    modified:
      libcore/parser/abc_block.cpp
    ------------------------------------------------------------
    revno: 11194.1.8
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 09:39:11 +0200
    message:
      Store NEEDS_ACTIVATION flag. Check it in NEWACTIVATION opcode.
            
      Clean up abc_function.
    modified:
      libcore/abc_function.cpp
      libcore/abc_function.h
      libcore/asMethod.cpp
      libcore/asMethod.h
      libcore/parser/abc_block.cpp
      libcore/vm/Machine.cpp
    ------------------------------------------------------------
    revno: 11194.1.9
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 10:46:07 +0200
    message:
      Enable some more abc finalization. Clean up.
    modified:
      libcore/parser/abc_block.cpp
    ------------------------------------------------------------
    revno: 11194.1.10
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 10:59:43 +0200
    message:
      Move the three necessary new functions from the supposed new System_as to 
the
      older and less messy System_as.
    modified:
      libcore/asobj/System_as.cpp
    ------------------------------------------------------------
    revno: 11194.1.11
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:04:07 +0200
    message:
      Move System class properly and remove the old files.
    removed:
      libcore/asobj/flash/system/System_as.cpp
    renamed:
      libcore/asobj/System_as.cpp => libcore/asobj/flash/system/System_as.cpp
    modified:
      libcore/asobj/flash/system/System_as.cpp
    ------------------------------------------------------------
    revno: 11194.1.12
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:23:08 +0200
    message:
      Test some System properties.
    added:
      testsuite/as3compile.all/System.as
    modified:
      testsuite/as3compile.all/Makefile.am
    ------------------------------------------------------------
    revno: 11194.1.13
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:30:25 +0200
    message:
      Correct super types for DisplayObject subclasses.
    modified:
      libcore/asobj/Global.cpp
    ------------------------------------------------------------
    revno: 11194.1.14
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:36:00 +0200
    message:
      Correct comments.
    modified:
      libcore/asobj/Namespace_as.cpp
      libcore/asobj/Namespace_as.h
    ------------------------------------------------------------
    revno: 11194.1.15
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:39:44 +0200
    message:
      Add stubbed QName class.
    added:
      libcore/asobj/QName_as.cpp
      libcore/asobj/QName_as.h
    ------------------------------------------------------------
    revno: 11194.1.16
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:39:55 +0200
    message:
      Build QName.
    modified:
      libcore/asobj/Makefile.am
    ------------------------------------------------------------
    revno: 11194.1.17
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:40:13 +0200
    message:
      Add CLASS_QNAME to named strings.
    modified:
      libcore/namedStrings.cpp
      libcore/namedStrings.h
    ------------------------------------------------------------
    revno: 11194.1.18
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:47:23 +0200
    message:
      Fix typo.
    modified:
      libcore/asobj/QName_as.cpp
    ------------------------------------------------------------
    revno: 11194.1.19
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:56:00 +0200
    message:
      Drop errors package.
    removed:
      libcore/asobj/flash/errors/errors_pkg.cpp
      libcore/asobj/flash/errors/errors_pkg.h
    modified:
      libcore/asobj/flash/errors/errors.am
    ------------------------------------------------------------
    revno: 11194.1.20
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:57:12 +0200
    message:
      Don't build accessibility package.
    modified:
      libcore/asobj/flash/accessibility/accessibility.am
    ------------------------------------------------------------
    revno: 11194.1.21
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:57:31 +0200
    message:
      Don't build desktop package.
    modified:
      libcore/asobj/flash/desktop/desktop.am
    ------------------------------------------------------------
    revno: 11194.1.22
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:57:56 +0200
    message:
      Don't build events package.
    modified:
      libcore/asobj/flash/events/events.am
    ------------------------------------------------------------
    revno: 11194.1.23
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:58:35 +0200
    message:
      Don't build media package.
    modified:
      libcore/asobj/flash/media/media.am
    ------------------------------------------------------------
    revno: 11194.1.24
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 11:59:01 +0200
    message:
      Don't build printing package.
    modified:
      libcore/asobj/flash/printing/printing.am
    ------------------------------------------------------------
    revno: 11194.1.25
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:00:54 +0200
    message:
      Don't build sampler, system, ui, utils or xml packages.
    modified:
      libcore/asobj/flash/sampler/sampler.am
      libcore/asobj/flash/system/system.am
      libcore/asobj/flash/ui/ui.am
      libcore/asobj/flash/utils/utils.am
      libcore/asobj/flash/xml/xml.am
    ------------------------------------------------------------
    revno: 11194.1.26
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:02:11 +0200
    message:
      Drop all as3 code from flash packages; it is bogus.
    modified:
      libcore/asobj/flash/flash_pkg.cpp
      libcore/asobj/flash/flashclasses.h
    ------------------------------------------------------------
    revno: 11194.1.27
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:09:21 +0200
    message:
      Drop accessibility and desktop packages.
    removed:
      libcore/asobj/flash/accessibility/accessibility_pkg.cpp
      libcore/asobj/flash/accessibility/accessibility_pkg.h
      libcore/asobj/flash/desktop/desktop_pkg.cpp
      libcore/asobj/flash/desktop/desktop_pkg.h
    modified:
      libcore/asobj/Global.cpp
    ------------------------------------------------------------
    revno: 11194.1.28
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:42:54 +0200
    message:
      Drop all non-as2 packages.
    removed:
      libcore/asobj/flash/events/events_pkg.cpp
      libcore/asobj/flash/events/events_pkg.h
      libcore/asobj/flash/media/media_pkg.cpp
      libcore/asobj/flash/media/media_pkg.h
      libcore/asobj/flash/printing/printing_pkg.cpp
      libcore/asobj/flash/printing/printing_pkg.h
      libcore/asobj/flash/sampler/sampler_pkg.cpp
      libcore/asobj/flash/sampler/sampler_pkg.h
      libcore/asobj/flash/system/system_pkg.cpp
      libcore/asobj/flash/system/system_pkg.h
      libcore/asobj/flash/ui/ui_pkg.cpp
      libcore/asobj/flash/ui/ui_pkg.h
      libcore/asobj/flash/utils/utils_pkg.cpp
      libcore/asobj/flash/utils/utils_pkg.h
      libcore/asobj/flash/xml/xml_pkg.cpp
      libcore/asobj/flash/xml/xml_pkg.h
    modified:
      libcore/asobj/Makefile.am
    ------------------------------------------------------------
    revno: 11194.1.29
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:44:10 +0200
    message:
      Drop as3 code from display package.
    modified:
      libcore/asobj/flash/display/display_pkg.cpp
      libcore/asobj/flash/display/displayclasses.h
    ------------------------------------------------------------
    revno: 11194.1.30
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:46:11 +0200
    message:
      Drop as3 code from external and filters packages.
    modified:
      libcore/asobj/flash/display/display_pkg.cpp
      libcore/asobj/flash/display/displayclasses.h
      libcore/asobj/flash/external/external_pkg.cpp
      libcore/asobj/flash/external/externalclasses.h
      libcore/asobj/flash/filters/filters_pkg.cpp
      libcore/asobj/flash/filters/filtersclasses.h
    ------------------------------------------------------------
    revno: 11194.1.31
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:47:17 +0200
    message:
      Drop as3 geom package code.
    modified:
      libcore/asobj/flash/geom/geom_pkg.cpp
      libcore/asobj/flash/geom/geomclasses.h
    ------------------------------------------------------------
    revno: 11194.1.32
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:49:15 +0200
    message:
      Drop as3 net and text package code.
    modified:
      libcore/asobj/flash/net/net_pkg.cpp
      libcore/asobj/flash/net/netclasses.h
      libcore/asobj/flash/text/text_pkg.cpp
      libcore/asobj/flash/text/textclasses.h
    ------------------------------------------------------------
    revno: 11194.1.33
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 12:58:42 +0200
    message:
      Add QName_as to the flash.am, as asobj/Makefile.am isn't used (but is
      still there...)
    modified:
      libcore/asobj/flash.am
    ------------------------------------------------------------
    revno: 11194.1.34
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 13:08:38 +0200
    message:
      Correct typo in QName, attach properties to instance not prototype. Passes
      in QName.as.
    modified:
      libcore/asobj/QName_as.cpp
      testsuite/as3compile.all/QName.as
    ------------------------------------------------------------
    revno: 11194.1.35
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-07-02 13:43:06 +0200
    message:
      Add some more tests for constructor and prototype of QName.
    modified:
      testsuite/as3compile.all/QName.as
=== modified file 'libcore/PropertyList.cpp'
--- a/libcore/PropertyList.cpp  2009-06-03 16:05:40 +0000
+++ b/libcore/PropertyList.cpp  2009-07-02 05:45:49 +0000
@@ -356,7 +356,8 @@
        for (container::const_iterator i=_props.begin(), ie=_props.end();
             i != ie; ++i)
        {
-               to.insert(std::make_pair(st.value(i->mName),
+               to.insert(std::make_pair(
+                    st.value(i->mNamespace) + "::" + st.value(i->mName),
                     i->getValue(this_ptr)));
        }
 }
@@ -367,8 +368,8 @@
        string_table& st = _vm.getStringTable();
        for (container::const_iterator it=_props.begin(), itEnd=_props.end(); 
it != itEnd; ++it )
        {
-               log_debug("  %s: %s", st.value(it->mName),
-                       it->getValue(this_ptr).to_string());
+               log_debug("  %s::%s: %s", st.value(it->mNamespace), 
st.value(it->mName),
+                       it->getValue(this_ptr));
        }
 }
 

=== modified file 'libcore/abc_function.cpp'
--- a/libcore/abc_function.cpp  2009-06-04 07:58:32 +0000
+++ b/libcore/abc_function.cpp  2009-07-02 07:39:11 +0000
@@ -23,12 +23,10 @@
 
 namespace gnash{
 
-abc_function::abc_function(asMethod *methodInfo, Machine* machine)
+abc_function::abc_function(asMethod* methodInfo, Machine* machine)
     :
-    as_function(),
-    mMethodInfo(methodInfo),
-    mMachine(machine),
-    _scopeStack(0)
+    _methodInfo(methodInfo),
+    _machine(machine)
 {
 }
 
@@ -38,10 +36,10 @@
 {
 
 
-       log_abc("Calling an abc_function id=%u.", mMethodInfo->methodID());
-       as_value val = mMachine->executeFunction(mMethodInfo,fn);
+       log_abc("Calling an abc_function id=%u.", _methodInfo->methodID());
+       as_value val = _machine->executeFunction(_methodInfo,fn);
        log_abc("Done calling abc_function id=%u value=%s",
-            mMethodInfo->methodID(), val);
+            _methodInfo->methodID(), val);
        return val;
 
 }

=== modified file 'libcore/abc_function.h'
--- a/libcore/abc_function.h    2009-05-14 10:26:47 +0000
+++ b/libcore/abc_function.h    2009-07-02 07:39:11 +0000
@@ -40,27 +40,27 @@
 {
 
 public:
-       abc_function(asMethod *methodInfo, Machine* mMachine);
+       abc_function(asMethod* methodInfo, Machine* machine);
 
        as_value operator()(const fn_call& fn);
 
-       CodeStream* getCodeStream(){ return mMethodInfo->getBody();}
-
-       boost::uint32_t getMaxRegisters(){ return 
mMethodInfo->getMaxRegisters(); }
-
-    as_environment::ScopeStack* scopeStack() { return _scopeStack; }
-
-    void setScopeStack(as_environment::ScopeStack* stack) {
-        _scopeStack = stack;
+       CodeStream* getCodeStream() const {
+        return _methodInfo->getBody();
+    }
+
+       boost::uint32_t getMaxRegisters() const {
+        return _methodInfo->getMaxRegisters();
+    }
+
+    bool needsActivation() const {
+        return _methodInfo->needsActivation();
     }
 
 private:
 
-    asMethod *mMethodInfo;
-
-    Machine* mMachine;
-
-       as_environment::ScopeStack* _scopeStack;
+    asMethod* _methodInfo;
+
+    Machine* _machine;
 
 };
 

=== modified file 'libcore/asMethod.cpp'
--- a/libcore/asMethod.cpp      2009-06-23 13:44:26 +0000
+++ b/libcore/asMethod.cpp      2009-07-02 07:39:11 +0000
@@ -41,7 +41,8 @@
     _maxRegisters(0),
     _scopeDepth(0),
     _maxScope(0),
-    _maxStack(0)
+    _maxStack(0),
+    _needsActivation(false)
 {
 }
 

=== modified file 'libcore/asMethod.h'
--- a/libcore/asMethod.h        2009-06-29 13:42:31 +0000
+++ b/libcore/asMethod.h        2009-07-02 07:39:11 +0000
@@ -109,16 +109,22 @@
         return NULL;
     }
 
-       bool hasActivation();
+       bool needsActivation() const {
+        return _needsActivation;
+    }
+
+    void setNeedsActivation() {
+        _needsActivation = true;
+    }
 
        CodeStream *getBody() { return _body; }
        void setBody(CodeStream *b) { _body = b; }
 
-       bool addValue(string_table::key name, asNamespace *ns, boost::uint32_t 
slotID,
-               asClass *type, as_value& val, bool isconst);
+       bool addValue(string_table::key name, asNamespace *ns,
+            boost::uint32_t slotID, asClass *type, as_value& val, bool 
isconst);
 
-       bool addSlot(string_table::key name, asNamespace *ns, boost::uint32_t 
slotID,
-               asClass *type);
+       bool addSlot(string_table::key name, asNamespace *ns,
+            boost::uint32_t slotID, asClass *type);
 
        bool addMethod(string_table::key name, asNamespace *ns, asMethod 
*method);
 
@@ -273,6 +279,8 @@
     boost::uint32_t _maxScope;
     boost::uint32_t _maxStack;
 
+    bool _needsActivation;
+
 };
 
 } // namespace gnash

=== modified file 'libcore/asobj/Global.cpp'
--- a/libcore/asobj/Global.cpp  2009-07-01 15:50:58 +0000
+++ b/libcore/asobj/Global.cpp  2009-07-02 10:09:21 +0000
@@ -29,39 +29,43 @@
 #include "Array_as.h"
 #include "AsBroadcaster.h"
 #include "Boolean_as.h"
-#include "flash/media/Camera_as.h"
 #include "Color_as.h"
-#include "flash/ui/ContextMenu_as.h"
 #include "CustomActions.h"
 #include "Date_as.h" 
 #include "Error_as.h"
 #include "String_as.h"
-#include "flash/ui/Keyboard_as.h"
 #include "Selection_as.h"
-#include "flash/media/Microphone_as.h"
-#include "flash/media/Sound_as.h"
 #include "Number_as.h"
 #include "Object.h"
 #include "Math_as.h"
-#include "flash/xml/XMLDocument_as.h"
-#include "flash/net/XMLSocket_as.h"
+#include "flash/accessibility/Accessibility_as.h"
+#include "flash/ui/ContextMenu_as.h"
+#include "flash/ui/Keyboard_as.h"
 #include "flash/ui/Mouse_as.h"
+#include "flash/media/Microphone_as.h"
+#include "flash/media/Sound_as.h"
+#include "flash/media/Camera_as.h"
 #include "flash/display/InteractiveObject_as.h"
 #include "flash/display/DisplayObjectContainer_as.h"
 #include "flash/display/DisplayObject_as.h"
+#include "flash/display/Stage_as.h"
 #include "flash/display/MovieClip_as.h"
 #include "flash/display/Sprite_as.h"
 #include "flash/events/Event_as.h"
 #include "flash/events/EventDispatcher_as.h"
+#include "flash/net/LocalConnection_as.h"
+#include "flash/net/XMLSocket_as.h"
+#include "flash/net/SharedObject_as.h"
+#include "flash/system/System_as.h"
+#include "flash/text/TextSnapshot_as.h"
+#include "flash/text/TextFieldAutoSize_as.h"
+#include "flash/xml/XMLDocument_as.h"
+#include "flash/xml/XMLNode_as.h"
 #include "MovieClipLoader.h"
 #include "movie_definition.h"
 #include "NetConnection_as.h"
 #include "NetStream_as.h"
-#include "flash/net/SharedObject_as.h"
-#include "flash/display/Stage_as.h"
-#include "flash/system/System_as.h"
 #include "TextFormat_as.h"
-#include "flash/text/TextSnapshot_as.h"
 #include "Video.h"
 #include "extension.h"
 #include "VM.h"
@@ -76,14 +80,11 @@
 #include "flash_pkg.h"
 #include "fn_call.h"
 #include "Button.h"
-#include "flash/accessibility/Accessibility_as.h"
 #include "Global.h"
 #include "int_as.h"
 #include "LoadVars_as.h"
-#include "flash/net/LocalConnection_as.h"
 #include "Namespace_as.h"
-#include "xml/XMLNode_as.h"
-#include "flash/text/TextFieldAutoSize_as.h"
+#include "QName_as.h"
 
 #include <limits> 
 #include <sstream>
@@ -381,28 +382,35 @@
            NS_GLOBAL, 5))
         (N(namespace_class_init, NSV::CLASS_NAMESPACE, NSV::CLASS_OBJECT,
            NS_GLOBAL, 5))
+        (N(qname_class_init, NSV::CLASS_QNAME, NSV::CLASS_OBJECT,
+           NS_GLOBAL, 5))
         (N(Date_as::init, NSV::CLASS_DATE, NSV::CLASS_OBJECT, NS_GLOBAL, 5))
 
         // System classes
-        (N(system_class_init, NSV::CLASS_SYSTEM, 0, NSV::NS_FLASH_SYSTEM, 1))
+        (N(system_class_init, NSV::CLASS_SYSTEM, NSV::CLASS_OBJECT,
+           NSV::NS_FLASH_SYSTEM, 1))
 
         // Display classes
-        (N(stage_class_init, NSV::CLASS_STAGE, 0, NSV::NS_FLASH_DISPLAY, 1))
-        (N(movieclip_class_init, NSV::CLASS_MOVIE_CLIP, 0,
-           NSV::NS_FLASH_DISPLAY, 3))
-        (N(sprite_class_init, NSV::CLASS_SPRITE, 0, NSV::NS_FLASH_DISPLAY, 3))
+        (N(displayobject_class_init, NSV::CLASS_DISPLAYOBJECT,
+           NSV::CLASS_EVENTDISPATCHER, NSV::NS_FLASH_DISPLAY, 3))
+        (N(interactiveobject_class_init, NSV::CLASS_INTERACTIVEOBJECT,
+           NSV::CLASS_DISPLAYOBJECT, NSV::NS_FLASH_DISPLAY, 3))
         (N(displayobjectcontainer_class_init, 
NSV::CLASS_DISPLAYOBJECTCONTAINER,
-           0, NSV::NS_FLASH_DISPLAY, 3))
-        (N(interactiveobject_class_init, NSV::CLASS_INTERACTIVEOBJECT,
-           0, NSV::NS_FLASH_DISPLAY, 3))
-        (N(displayobject_class_init, NSV::CLASS_DISPLAYOBJECT, 0,
+           NSV::CLASS_INTERACTIVEOBJECT, NSV::NS_FLASH_DISPLAY, 3))
+        (N(sprite_class_init, NSV::CLASS_SPRITE,
+           NSV::CLASS_DISPLAYOBJECTCONTAINER, NSV::NS_FLASH_DISPLAY, 3))
+        (N(movieclip_class_init, NSV::CLASS_MOVIE_CLIP, NSV::CLASS_SPRITE,
            NSV::NS_FLASH_DISPLAY, 3))
-        (N(Button::init, NSV::CLASS_BUTTON, NSV::CLASS_OBJECT,
+        (N(stage_class_init, NSV::CLASS_STAGE, NSV::CLASS_MOVIE_CLIP,
+           NSV::NS_FLASH_DISPLAY, 1))
+
+        // TODO: should be SimpleButton
+        (N(Button::init, NSV::CLASS_BUTTON, NSV::CLASS_INTERACTIVEOBJECT,
            NSV::NS_FLASH_DISPLAY, 5))
 
         // Text classes
-        (N(textfield_class_init, NSV::CLASS_TEXT_FIELD, 0,
-           NSV::NS_FLASH_TEXT, 3))
+        (N(textfield_class_init, NSV::CLASS_TEXT_FIELD,
+           NSV::CLASS_INTERACTIVEOBJECT, NSV::NS_FLASH_TEXT, 3))
         (N(TextFormat_as::init, NSV::CLASS_TEXT_FORMAT, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_TEXT, 5))
         (N(TextSnapshot_as::init, NSV::CLASS_TEXT_SNAPSHOT, NSV::CLASS_OBJECT,
@@ -411,7 +419,7 @@
         // Media classes
         (N(Sound_as::init, NSV::CLASS_SOUND, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_MEDIA, 5))
-        (N(video_class_init, NSV::CLASS_VIDEO, NSV::CLASS_OBJECT,
+        (N(video_class_init, NSV::CLASS_VIDEO, NSV::CLASS_DISPLAYOBJECT,
            NSV::NS_FLASH_MEDIA, 6))
         (N(camera_class_init, NSV::CLASS_CAMERA, NSV::CLASS_OBJECT,
            NSV::NS_FLASH_MEDIA, 6))

=== modified file 'libcore/asobj/Makefile.am'
--- a/libcore/asobj/Makefile.am 2009-06-12 03:21:00 +0000
+++ b/libcore/asobj/Makefile.am 2009-07-02 10:42:54 +0000
@@ -64,6 +64,7 @@
        int_as.cpp \
        LoadVars_as.cpp \
        Math_as.cpp \
+       QName_as.cpp \
        Microphone.cpp  \
        NetConnection_as.cpp \
        NetStream_as.cpp \
@@ -102,6 +103,7 @@
        String_as.h \
        LoadableObject.h \
        Namespace_as.h \
+       QName_as.h \
        Object.h
 
 EXTENSIONS_API = \

=== modified file 'libcore/asobj/Namespace_as.cpp'
--- a/libcore/asobj/Namespace_as.cpp    2009-05-27 13:02:02 +0000
+++ b/libcore/asobj/Namespace_as.cpp    2009-07-02 09:36:00 +0000
@@ -1,4 +1,4 @@
-// Namespace_as.cpp:  ActionScript Namespace class, for Gnash.
+// Namespace_as.cpp:  ActionScript 3 Namespace class, for Gnash.
 //
 //   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 //
@@ -45,15 +45,15 @@
 }
 
 
-class Namespace_as: public as_object
+class Namespace_as : public as_object
 {
 
 public:
 
-       Namespace_as()
-               :
-               as_object(getNamespaceInterface())
-       {}
+    Namespace_as()
+        :
+        as_object(getNamespaceInterface())
+    {}
 
 };
 
@@ -63,9 +63,9 @@
 namespace_class_init(as_object& where)
 {
     boost::intrusive_ptr<builtin_function> cl;
-       cl = new builtin_function(&namespace_ctor, getNamespaceInterface());
+    cl = new builtin_function(&namespace_ctor, getNamespaceInterface());
 
-       where.init_member("Namespace", cl.get());
+    where.init_member("Namespace", cl.get());
 }
 
 
@@ -74,15 +74,15 @@
 as_object*
 getNamespaceInterface()
 {
-       static boost::intrusive_ptr<as_object> o;
-
-       if (!o) {
-               o = new as_object(getObjectInterface());
-               VM::get().addStatic(o.get());
-               attachNamespaceInterface(*o);
-       }
-
-       return o.get();
+    static boost::intrusive_ptr<as_object> o;
+
+    if (!o) {
+        o = new as_object(getObjectInterface());
+        VM::get().addStatic(o.get());
+        attachNamespaceInterface(*o);
+    }
+
+    return o.get();
 }
 
 
@@ -112,8 +112,8 @@
 namespace_ctor(const fn_call& /*fn*/)
 {
     log_unimpl("Namespace");
-       boost::intrusive_ptr<as_object> ns = new Namespace_as;
-       return as_value(ns.get()); 
+    boost::intrusive_ptr<as_object> ns = new Namespace_as;
+    return as_value(ns.get()); 
 }
 
 } // anonymous namespace

=== modified file 'libcore/asobj/Namespace_as.h'
--- a/libcore/asobj/Namespace_as.h      2009-05-27 13:02:02 +0000
+++ b/libcore/asobj/Namespace_as.h      2009-07-02 09:36:00 +0000
@@ -1,4 +1,4 @@
-// Error_as.h:  ActionScript "Error" class, for Gnash.
+// Namespace_as.h:  ActionScript "Namespace" class, for Gnash.
 //
 //   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 //
@@ -28,7 +28,7 @@
 
 class as_object;
 
-/// Initialize the global Error class
+/// Initialize the global Namespace class
 void namespace_class_init(as_object& global);
 
 } // gnash namespace

=== added file 'libcore/asobj/QName_as.cpp'
--- a/libcore/asobj/QName_as.cpp        1970-01-01 00:00:00 +0000
+++ b/libcore/asobj/QName_as.cpp        2009-07-02 11:08:38 +0000
@@ -0,0 +1,117 @@
+// QName_as.cpp:  ActionScript 3 QName class, for Gnash.
+//
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "QName_as.h"
+#include "as_object.h" 
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" 
+#include "Object.h" 
+#include "VM.h" 
+
+#include <sstream>
+
+namespace gnash {
+
+namespace {
+    as_value qname_ctor(const fn_call& fn);
+    as_value qname_uri(const fn_call& fn);
+    as_value qname_localName(const fn_call& fn);
+    
+    as_object* getQNameInterface();
+    void attachQNameInterface(as_object& o);
+}
+
+
+class QName_as : public as_object
+{
+
+public:
+
+    QName_as()
+        :
+        as_object(getQNameInterface())
+    {}
+
+};
+
+
+// extern 
+void
+qname_class_init(as_object& where)
+{
+    boost::intrusive_ptr<builtin_function> cl;
+    cl = new builtin_function(&qname_ctor, getQNameInterface());
+
+    where.init_member("QName", cl.get());
+}
+
+
+namespace {
+
+as_object*
+getQNameInterface()
+{
+    static boost::intrusive_ptr<as_object> o;
+
+    if (!o) {
+        o = new as_object(getObjectInterface());
+        VM::get().addStatic(o.get());
+    }
+
+    return o.get();
+}
+
+
+void
+attachQNameInterface(as_object& o)
+{
+    o.init_property("localName", qname_localName, qname_localName);
+    o.init_property("uri", qname_uri, qname_uri);
+}
+
+as_value
+qname_localName(const fn_call& /*fn*/)
+{
+    log_unimpl("QName.localName");
+    return as_value();
+}
+
+as_value
+qname_uri(const fn_call& /*fn*/)
+{
+    log_unimpl("QName.uri");
+    return as_value();
+}
+
+as_value
+qname_ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> ns = new QName_as;
+    attachQNameInterface(*ns);
+    return as_value(ns.get()); 
+}
+
+} // anonymous namespace
+} // gnash namespace

=== added file 'libcore/asobj/QName_as.h'
--- a/libcore/asobj/QName_as.h  1970-01-01 00:00:00 +0000
+++ b/libcore/asobj/QName_as.h  2009-07-02 09:39:44 +0000
@@ -0,0 +1,37 @@
+// QName_as.h:  ActionScript 3 "QName" class, for Gnash.
+//
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef GNASH_ASOBJ_QNAME_H
+#define GNASH_ASOBJ_QNAME_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global QName class
+void qname_class_init(as_object& global);
+
+} // gnash namespace
+
+#endif
+

=== modified file 'libcore/asobj/flash.am'
--- a/libcore/asobj/flash.am    2009-06-17 15:33:51 +0000
+++ b/libcore/asobj/flash.am    2009-07-02 10:58:42 +0000
@@ -42,6 +42,7 @@
        asobj/Number_as.cpp \
        asobj/PlayHead.cpp \
        asobj/Selection_as.cpp \
+       asobj/QName_as.cpp \
        asobj/Namespace_as.cpp \
        asobj/TextFormat_as.cpp \
        asobj/MovieClipLoader.cpp\
@@ -69,6 +70,7 @@
        asobj/TextFormat_as.h \
        asobj/String_as.h \
        asobj/LoadableObject.h \
+       asobj/QName_as.h \
        asobj/Namespace_as.h \
        asobj/Object.h
 

=== modified file 'libcore/asobj/flash/accessibility/accessibility.am'
--- a/libcore/asobj/flash/accessibility/accessibility.am        2009-06-07 
18:12:15 +0000
+++ b/libcore/asobj/flash/accessibility/accessibility.am        2009-07-02 
09:57:12 +0000
@@ -17,8 +17,8 @@
 
 ACCESSIBILITYdir = $(includedir)/gnash
 
-ACCESSIBILITY_SOURCES = asobj/flash/accessibility/accessibility_pkg.cpp
-ACCESSIBILITY_HEADERS = asobj/flash/accessibility/accessibility_pkg.h
+ACCESSIBILITY_SOURCES = 
+ACCESSIBILITY_HEADERS =
 
 if BUILD_ACCESSIBILITY_PROPERTIES_AS3
 ACCESSIBILITY_SOURCES += 
asobj/flash/accessibility/AccessibilityProperties_as.cpp

=== removed file 'libcore/asobj/flash/accessibility/accessibility_pkg.cpp'
--- a/libcore/asobj/flash/accessibility/accessibility_pkg.cpp   2009-06-03 
16:05:40 +0000
+++ b/libcore/asobj/flash/accessibility/accessibility_pkg.cpp   1970-01-01 
00:00:00 +0000
@@ -1,63 +0,0 @@
-// desktop_pkg.cpp:  ActionScript "flash.desktop" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "AccessibilityProperties_as.h"
-#include "Accessibility_as.h"
-
-#include "accessibility_pkg.h"
-#include "accessibilityclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_accessibility_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.accessibility package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3accessibilityclasses[i]) {
-           as3accessibilityclasses[i](*pkg);
-        ++i;
-    }
-
-       return pkg;
-}
-
-void
-flash_accessibility_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("accessibility"), 
get_flash_accessibility_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/accessibility/accessibility_pkg.h'
--- a/libcore/asobj/flash/accessibility/accessibility_pkg.h     2009-05-24 
22:25:59 +0000
+++ b/libcore/asobj/flash/accessibility/accessibility_pkg.h     1970-01-01 
00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_DATA_PACKAGE_H
-#define FLASH_DATA_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_data_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_DATA_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/desktop/desktop.am'
--- a/libcore/asobj/flash/desktop/desktop.am    2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/desktop/desktop.am    2009-07-02 09:57:31 +0000
@@ -17,8 +17,8 @@
 
 DESKTOPdir = $(includedir)/gnash
 
-DESKTOP_SOURCES = asobj/flash/desktop/desktop_pkg.cpp
-DESKTOP_HEADERS = asobj/flash/desktop/desktop_pkg.h
+DESKTOP_SOURCES = 
+DESKTOP_HEADERS =
 
 if BUILD_CLIPBOARDFORMATS_AS3
 DESKTOP_SOURCES += asobj/flash/desktop/ClipboardFormats_as.cpp

=== removed file 'libcore/asobj/flash/desktop/desktop_pkg.cpp'
--- a/libcore/asobj/flash/desktop/desktop_pkg.cpp       2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/desktop/desktop_pkg.cpp       1970-01-01 00:00:00 
+0000
@@ -1,63 +0,0 @@
-// desktop_pkg.cpp:  ActionScript "flash.desktop" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "ClipboardFormats_as.h"
-#include "ClipboardTransferMode_as.h"
-#include "Clipboard_as.h"
-
-#include "desktop_pkg.h"
-#include "desktopclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_desktop_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.desktop package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-    while (as3desktopclasses[i]) {
-           as3desktopclasses[i](*pkg);
-        ++i;
-    }
-
-       return pkg;
-}
-
-void
-flash_desktop_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("desktop"), 
get_flash_desktop_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/desktop/desktop_pkg.h'
--- a/libcore/asobj/flash/desktop/desktop_pkg.h 2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/desktop/desktop_pkg.h 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_DESKTOP_PACKAGE_H
-#define FLASH_DESKTOP_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_desktop_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_DESKTOP_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/display/display_pkg.cpp'
--- a/libcore/asobj/flash/display/display_pkg.cpp       2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/display/display_pkg.cpp       2009-07-02 10:46:11 
+0000
@@ -66,25 +66,16 @@
 static as_value
 get_flash_display_package(const fn_call& fn)
 {
-    bool as3 = isAS3(fn);
-       log_debug("Loading %s flash.display package", as3 ? "AVM2" : "AVM1");
-    
+       log_debug("Loading flash.display package");
+
     as_object *pkg = new as_object(getObjectInterface());
 
        // Call the [objectname]_init() function for each class.
        int i = 0;
 
-    if (as3) {
-        while (as3displayclasses[i]) {
-            as3displayclasses[i](*pkg);
-            ++i;
-        }
-    }
-    else {
-        while (as2displayclasses[i]) {
-            as2displayclasses[i](*pkg);
-            ++i;
-        }
+    while (displayclasses[i]) {
+        displayclasses[i](*pkg);
+        ++i;
     }
 
        return pkg;

=== modified file 'libcore/asobj/flash/display/displayclasses.h'
--- a/libcore/asobj/flash/display/displayclasses.h      2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/display/displayclasses.h      2009-07-02 10:46:11 
+0000
@@ -2,40 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_DISPLAY_H
 #define GNASH_ASOBJ_FLASH_DISPLAY_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3displayclasses[] = {
-       gnash::avm1movie_class_init,
-       gnash::actionscriptversion_class_init,
-       gnash::bitmapdatachannel_class_init,
-       gnash::blendmode_class_init,
-       gnash::capsstyle_class_init,
-       gnash::displayobjectcontainer_class_init,
-       gnash::displayobject_class_init,
-       gnash::framelabel_class_init,
-       gnash::gradienttype_class_init,
-       gnash::graphics_class_init,
-       gnash::ibitmapdrawable_class_init,
-       gnash::interactiveobject_class_init,
-       gnash::interpolationmethod_class_init,
-       gnash::jointstyle_class_init,
-       gnash::linescalemode_class_init,
-       gnash::loaderinfo_class_init,
-       gnash::loader_class_init,
-       gnash::morphshape_class_init,
-       gnash::pixelsnapping_class_init,
-       gnash::swfversion_class_init,
-       gnash::scene_class_init,
-       gnash::shape_class_init,
-       gnash::simplebutton_class_init,
-       gnash::spreadmethod_class_init,
-       gnash::sprite_class_init,
-       gnash::stagealign_class_init,
-       gnash::stagedisplaystate_class_init,
-       gnash::stagequality_class_init,
-       gnash::stagescalemode_class_init,
-       gnash::bitmapdata_class_init,
-       0
-};
-static gnash::SharedLib::initentry *as2displayclasses[] = {
+static gnash::SharedLib::initentry *displayclasses[] = {
        gnash::bitmapdata_class_init,
        0
 };

=== modified file 'libcore/asobj/flash/errors/errors.am'
--- a/libcore/asobj/flash/errors/errors.am      2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/errors/errors.am      2009-07-02 09:56:00 +0000
@@ -17,8 +17,8 @@
 
 ERRORSdir = $(includedir)/gnash
 
-ERRORS_SOURCES = asobj/flash/errors/errors_pkg.cpp
-ERRORS_HEADERS = asobj/flash/errors/errors_pkg.h
+ERRORS_SOURCES = 
+ERRORS_HEADERS = 
 
 if BUILD_EOFERROR_AS3
 ERRORS_SOURCES += asobj/flash/errors/EOFError_as.cpp

=== removed file 'libcore/asobj/flash/errors/errors_pkg.cpp'
--- a/libcore/asobj/flash/errors/errors_pkg.cpp 2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/errors/errors_pkg.cpp 1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
-// desktop_pkg.cpp:  ActionScript "flash.desktop" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "EOFError_as.h"
-#include "IOError_as.h"
-#include "IllegalOperationError_as.h"
-#include "InvalidSWFError_as.h"
-#include "MemoryError_as.h"
-#include "ScriptTimeoutError_as.h"
-#include "StackOverflowError_as.h"
-
-#include "errors_pkg.h"
-#include "errorsclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_errors_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-       
-    log_debug("Loading AVM2 flash.errors package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-    while (as3errorsclasses[i]) {
-           as3errorsclasses[i](*pkg);
-        ++i;
-    }
-
-       return pkg;
-}
-
-void
-flash_errors_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("errors"), 
get_flash_errors_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/errors/errors_pkg.h'
--- a/libcore/asobj/flash/errors/errors_pkg.h   2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/errors/errors_pkg.h   1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_ERRORS_PACKAGE_H
-#define FLASH_ERRORS_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_errors_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_ERRORS_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/events/events.am'
--- a/libcore/asobj/flash/events/events.am      2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/events/events.am      2009-07-02 09:57:56 +0000
@@ -17,8 +17,8 @@
 
 EVENTSdir = $(includedir)/gnash
 
-EVENTS_SOURCES = asobj/flash/events/events_pkg.cpp
-EVENTS_HEADERS = asobj/flash/events/events_pkg.h
+EVENTS_SOURCES = 
+EVENTS_HEADERS =
 
 if BUILD_ACTIVITYEVENT_AS3
 EVENTS_SOURCES += asobj/flash/events/ActivityEvent_as.cpp

=== removed file 'libcore/asobj/flash/events/events_pkg.cpp'
--- a/libcore/asobj/flash/events/events_pkg.cpp 2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/events/events_pkg.cpp 1970-01-01 00:00:00 +0000
@@ -1,84 +0,0 @@
-// desktop_pkg.cpp:  ActionScript "flash.desktop" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "ActivityEvent_as.h"
-#include "AsyncErrorEvent_as.h"
-#include "ContextMenuEvent_as.h"
-#include "DataEvent_as.h"
-#include "ErrorEvent_as.h"
-#include "EventDispatcher_as.h"
-#include "EventPhase_as.h"
-#include "Event_as.h"
-#include "FocusEvent_as.h"
-#include "FullScreenEvent_as.h"
-#include "HTTPStatusEvent_as.h"
-#include "IEventDispatcher_as.h"
-#include "IMEEvent_as.h"
-#include "IOErrorEvent_as.h"
-#include "KeyboardEvent_as.h"
-#include "MouseEvent_as.h"
-#include "ProgressEvent_as.h"
-#include "SecurityErrorEvent_as.h"
-#include "StatusEvent_as.h"
-#include "SyncEvent_as.h"
-#include "TextEvent_as.h"
-#include "TimerEvent_as.h"
-#include "NetStatusEvent_as.h"
-
-#include "events_pkg.h"
-#include "eventsclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_events_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.events package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while(as3eventsclasses[i]) {
-           as3eventsclasses[i](*pkg);
-        ++i;
-       } 
-
-       return pkg;
-}
-
-void
-flash_events_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("events"), 
get_flash_events_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/events/events_pkg.h'
--- a/libcore/asobj/flash/events/events_pkg.h   2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/events/events_pkg.h   1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_EVENTS_PACKAGE_H
-#define FLASH_EVENTS_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_events_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_EVENTS_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/external/external_pkg.cpp'
--- a/libcore/asobj/flash/external/external_pkg.cpp     2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/external/external_pkg.cpp     2009-07-02 10:46:11 
+0000
@@ -35,16 +35,15 @@
 static as_value
 get_flash_external_package(const fn_call& fn)
 {
-    const bool as3 = isAS3(fn);
-    // This package is identical for AS2 and AS3 (as far as we know)
-    log_debug("Loading %s flash.external package", as3 ? "AVM2" : "AVM1");
-    
+
+       log_debug("Loading flash.external package");
+
     as_object *pkg = new as_object(getObjectInterface());
 
     // Call the [objectname]_init() function for each class.
     int i = 0;
-    while (as3externalclasses[i]) {
-        as3externalclasses[i](*pkg);
+    while (externalclasses[i]) {
+        externalclasses[i](*pkg);
         ++i;
     } 
 

=== modified file 'libcore/asobj/flash/external/externalclasses.h'
--- a/libcore/asobj/flash/external/externalclasses.h    2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/external/externalclasses.h    2009-07-02 10:46:11 
+0000
@@ -2,7 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_EXTERNAL_H
 #define GNASH_ASOBJ_FLASH_EXTERNAL_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3externalclasses[] = {
+static gnash::SharedLib::initentry *externalclasses[] = {
        gnash::externalinterface_class_init,
        0
 };

=== modified file 'libcore/asobj/flash/filters/filters_pkg.cpp'
--- a/libcore/asobj/flash/filters/filters_pkg.cpp       2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/filters/filters_pkg.cpp       2009-07-02 10:46:11 
+0000
@@ -47,16 +47,14 @@
 get_flash_filters_package(const fn_call& /*fn*/)
 {
 
-    // TODO: there are differences between AS2 and AS3 here.
-
        log_debug("Loading flash.filters package");
        as_object *pkg = new as_object(getObjectInterface());
 
        // Call the [objectname]_init() function for each class.
        int i = 0;
        do {
-           as3filtersclasses[i](*pkg);
-       } while (as3filtersclasses[++i] != 0);
+           filtersclasses[i](*pkg);
+       } while (filtersclasses[++i] != 0);
 
        return pkg;
 }

=== modified file 'libcore/asobj/flash/filters/filtersclasses.h'
--- a/libcore/asobj/flash/filters/filtersclasses.h      2009-06-07 00:49:02 
+0000
+++ b/libcore/asobj/flash/filters/filtersclasses.h      2009-07-02 10:46:11 
+0000
@@ -2,7 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_FILTERS_H
 #define GNASH_ASOBJ_FLASH_FILTERS_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3filtersclasses[] = {
+static gnash::SharedLib::initentry *filtersclasses[] = {
        gnash::bevelfilter_class_init,
        gnash::bitmapfilterquality_class_init,
        gnash::bitmapfiltertype_class_init,

=== modified file 'libcore/asobj/flash/flash_pkg.cpp'
--- a/libcore/asobj/flash/flash_pkg.cpp 2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/flash_pkg.cpp 2009-07-02 10:02:11 +0000
@@ -33,25 +33,12 @@
 static as_value
 get_flash_package(const fn_call& fn)
 {
-    bool as3 = isAS3(fn);
-       log_debug("Loading %s flash package", as3 ? "AVM2" : "AVM1");
-    
     as_object *pkg = new as_object(getObjectInterface());
 
-       // Call the [objectname]_init() function for each class.
        int i = 0;
-
-    if (as3) {
-        while (as3classes[i]) {
-            as3classes[i](*pkg);
-            ++i;
-        }
-    }
-    else {
-        while (as2classes[i]) {
-            as2classes[i](*pkg);
-            ++i;
-        }
+    while (as2classes[i]) {
+        as2classes[i](*pkg);
+        ++i;
     }
 
        return pkg;

=== modified file 'libcore/asobj/flash/flashclasses.h'
--- a/libcore/asobj/flash/flashclasses.h        2009-05-29 07:25:38 +0000
+++ b/libcore/asobj/flash/flashclasses.h        2009-07-02 10:02:11 +0000
@@ -20,23 +20,12 @@
 
 // These headers include the prototypes of all the *_init functions
 // for each class.
-#include "accessibility/accessibility_pkg.h"
-#include "desktop/desktop_pkg.h"
 #include "display/display_pkg.h"
-#include "errors/errors_pkg.h"
-#include "events/events_pkg.h"
 #include "external/external_pkg.h"
 #include "filters/filters_pkg.h"
 #include "geom/geom_pkg.h"
-#include "media/media_pkg.h"
 #include "net/net_pkg.h"
-#include "printing/printing_pkg.h"
-#include "sampler/sampler_pkg.h"
-#include "system/system_pkg.h"
 #include "text/text_pkg.h"
-#include "ui/ui_pkg.h"
-#include "utils/utils_pkg.h"
-#include "xml/xml_pkg.h"
 
 #include "sharedlib.h"
 
@@ -52,25 +41,6 @@
     0
 };
 
-static gnash::SharedLib::initentry* as3classes[] = {
-    flash_text_package_init,
-    flash_display_package_init,
-    flash_filters_package_init,
-    flash_geom_package_init,
-    flash_net_package_init,
-    flash_external_package_init,
-    flash_desktop_package_init,
-    flash_errors_package_init,
-    flash_events_package_init,
-    flash_media_package_init,
-    flash_printing_package_init,
-    flash_sampler_package_init,
-    flash_ui_package_init,
-    flash_utils_package_init,
-    flash_xml_package_init,
-    0
-};
-
 } // end of gnash namespace
 
 #endif // end of GNASH_ASOBJ3_FLASH_H

=== modified file 'libcore/asobj/flash/geom/geom_pkg.cpp'
--- a/libcore/asobj/flash/geom/geom_pkg.cpp     2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/geom/geom_pkg.cpp     2009-07-02 10:47:17 +0000
@@ -39,17 +39,13 @@
 static as_value
 get_flash_geom_package(const fn_call& fn)
 {
-    const bool as3 = isAS3(fn);
-
-    // The classes in this package are all both AS2 and AS3 (as far as we
-    // know).
-       log_debug("Loading %s flash.geom package", as3 ? "AVM2" : "AVM1");
+       log_debug("Loading flash.geom package");
        as_object *pkg = new as_object(getObjectInterface());
 
        // Call the [objectname]_init() function for each class.
        int i = 0;
-       while (as3geomclasses[i]) {
-           as3geomclasses[i](*pkg);
+       while (geomclasses[i]) {
+           geomclasses[i](*pkg);
         ++i;
     }
 

=== modified file 'libcore/asobj/flash/geom/geomclasses.h'
--- a/libcore/asobj/flash/geom/geomclasses.h    2009-06-07 00:49:02 +0000
+++ b/libcore/asobj/flash/geom/geomclasses.h    2009-07-02 10:47:17 +0000
@@ -2,7 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_GEOM_H
 #define GNASH_ASOBJ_FLASH_GEOM_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3geomclasses[] = {
+static gnash::SharedLib::initentry *geomclasses[] = {
        gnash::colortransform_class_init,
        gnash::matrix_class_init,
        gnash::point_class_init,

=== modified file 'libcore/asobj/flash/media/media.am'
--- a/libcore/asobj/flash/media/media.am        2009-06-09 21:58:09 +0000
+++ b/libcore/asobj/flash/media/media.am        2009-07-02 09:58:35 +0000
@@ -17,8 +17,8 @@
 
 MEDIAdir = $(includedir)/gnash
 
-MEDIA_SOURCES = asobj/flash/media/media_pkg.cpp
-MEDIA_HEADERS = asobj/flash/media/media_pkg.h
+MEDIA_SOURCES = 
+MEDIA_HEADERS = 
 
 # FIXME: already exists
 if BUILD_CAMERA_AS3

=== removed file 'libcore/asobj/flash/media/media_pkg.cpp'
--- a/libcore/asobj/flash/media/media_pkg.cpp   2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/media/media_pkg.cpp   1970-01-01 00:00:00 +0000
@@ -1,70 +0,0 @@
-// media_pkg.cpp:  ActionScript "flash.media" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "Camera_as.h"
-#include "ID3Info_as.h"
-#include "Microphone_as.h"
-#include "SoundChannel_as.h"
-#include "SoundLoaderContext_as.h"
-#include "SoundMixer_as.h"
-#include "SoundTransform_as.h"
-#include "Sound_as.h"
-#include "Video_as.h"
-
-#include "media_pkg.h"
-#include "mediaclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_media_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.media package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3mediaclasses[i]) {
-           as3mediaclasses[i](*pkg);
-        ++i;
-    }
-
-       return pkg;
-}
-
-void
-flash_media_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("media"), 
get_flash_media_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/media/media_pkg.h'
--- a/libcore/asobj/flash/media/media_pkg.h     2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/media/media_pkg.h     1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_MEDIA_PACKAGE_H
-#define FLASH_MEDIA_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_media_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_MEDIA_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/net/net_pkg.cpp'
--- a/libcore/asobj/flash/net/net_pkg.cpp       2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/net/net_pkg.cpp       2009-07-02 10:49:15 +0000
@@ -54,25 +54,16 @@
 static as_value
 get_flash_net_package(const fn_call& fn)
 {
-    bool as3 = isAS3(fn);
-       log_debug("Loading %s flash.display package", as3 ? "AVM2" : "AVM1");
+       log_debug("Loading flash.net package");
     
     as_object *pkg = new as_object(getObjectInterface());
 
        // Call the [objectname]_init() function for each class.
        int i = 0;
 
-    if (as3) {
-        while (as3netclasses[i]) {
-            as3netclasses[i](*pkg);
-            ++i;
-        }
-    }
-    else {
-        while (as2netclasses[i]) {
-            as2netclasses[i](*pkg);
-            ++i;
-        }
+    while (netclasses[i]) {
+        netclasses[i](*pkg);
+        ++i;
     }
 
        return pkg;

=== modified file 'libcore/asobj/flash/net/netclasses.h'
--- a/libcore/asobj/flash/net/netclasses.h      2009-06-10 21:35:47 +0000
+++ b/libcore/asobj/flash/net/netclasses.h      2009-07-02 10:49:15 +0000
@@ -2,25 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_NET_H
 #define GNASH_ASOBJ_FLASH_NET_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3netclasses[] = {
-    gnash::filefilter_class_init,
-    gnash::idynamicpropertyoutput_class_init,
-    gnash::idynamicpropertywriter_class_init,
-    gnash::LocalConnection_as::init,
-    gnash::objectencoding_class_init,
-    gnash::responder_class_init,
-    gnash::sharedobject_class_init,
-    gnash::sharedobjectflushstatus_class_init,
-    gnash::socket_class_init,
-    gnash::urlloader_class_init,
-    gnash::urlrequestheader_class_init,
-    gnash::urlrequestmethod_class_init,
-    gnash::urlstream_class_init,
-    gnash::filereferencelist_class_init,
-    gnash::filereference_class_init,
-    0
-};
-static gnash::SharedLib::initentry *as2netclasses[] = {
+static gnash::SharedLib::initentry *netclasses[] = {
     gnash::filereference_class_init,
     0
 };

=== modified file 'libcore/asobj/flash/printing/printing.am'
--- a/libcore/asobj/flash/printing/printing.am  2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/printing/printing.am  2009-07-02 09:59:01 +0000
@@ -17,8 +17,8 @@
 
 PRINTINGdir = $(includedir)/gnash
 
-PRINTING_SOURCES = asobj/flash/printing/printing_pkg.cpp
-PRINTING_HEADERS = asobj/flash/printing/printing_pkg.h
+PRINTING_SOURCES = 
+PRINTING_HEADERS = 
 
 if BUILD_PRINTJOBOPTIONS_AS3
 PRINTING_SOURCES += asobj/flash/printing/PrintJobOptions_as.cpp

=== removed file 'libcore/asobj/flash/printing/printing_pkg.cpp'
--- a/libcore/asobj/flash/printing/printing_pkg.cpp     2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/printing/printing_pkg.cpp     1970-01-01 00:00:00 
+0000
@@ -1,65 +0,0 @@
-// printing_pkg.cpp:  ActionScript "flash.printing" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "PrintJobOptions_as.h"
-#include "PrintJobOrientation_as.h"
-#include "PrintJob_as.h"
-
-#include "printing_pkg.h"
-#include "printingclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_printing_package(const fn_call& fn)
-{
-
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-    log_debug("Loading AVM2 flash.printing package");
-    as_object *pkg = new as_object(getObjectInterface());
-
-    // Call the [objectname]_init() function for each class.
-    int i = 0;
-    while (as3printingclasses[i]) {
-        as3printingclasses[i](*pkg);
-        ++i;
-    }
-
-    return pkg;
-}
-
-void
-flash_printing_package_init(as_object& where)
-{
-    string_table& st = where.getVM().getStringTable();
-    where.init_destructive_property(st.find("printing"),
-            get_flash_printing_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/printing/printing_pkg.h'
--- a/libcore/asobj/flash/printing/printing_pkg.h       2009-05-24 22:25:59 
+0000
+++ b/libcore/asobj/flash/printing/printing_pkg.h       1970-01-01 00:00:00 
+0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_PRINTING_PACKAGE_H
-#define FLASH_PRINTING_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_printing_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_PRINTING_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/sampler/sampler.am'
--- a/libcore/asobj/flash/sampler/sampler.am    2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/sampler/sampler.am    2009-07-02 10:00:54 +0000
@@ -17,8 +17,8 @@
 
 SAMPLERdir = $(includedir)/gnash
 
-SAMPLER_SOURCES = asobj/flash/sampler/sampler_pkg.cpp
-SAMPLER_HEADERS = asobj/flash/sampler/sampler_pkg.h
+SAMPLER_SOURCES = 
+SAMPLER_HEADERS = 
 
 if BUILD_DELETEOBJECTSAMPLE_AS3
 SAMPLER_SOURCES += asobj/flash/sampler/DeleteObjectSample_as.cpp

=== removed file 'libcore/asobj/flash/sampler/sampler_pkg.cpp'
--- a/libcore/asobj/flash/sampler/sampler_pkg.cpp       2009-06-03 16:05:40 
+0000
+++ b/libcore/asobj/flash/sampler/sampler_pkg.cpp       1970-01-01 00:00:00 
+0000
@@ -1,64 +0,0 @@
-// sampler_pkg.cpp:  ActionScript "flash.sampler" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "DeleteObjectSample_as.h"
-#include "NewObjectSample_as.h"
-#include "Sample_as.h"
-#include "StackFrame_as.h"
-
-#include "sampler_pkg.h"
-#include "samplerclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_sampler_package(const fn_call& fn)
-{
-
-    /// This package is AS2 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.sampler package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3samplerclasses[++i] != 0) {
-           as3samplerclasses[i](*pkg);
-    }
-
-       return pkg;
-}
-
-void
-flash_sampler_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("sampler"), 
get_flash_sampler_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/sampler/sampler_pkg.h'
--- a/libcore/asobj/flash/sampler/sampler_pkg.h 2009-05-26 06:45:45 +0000
+++ b/libcore/asobj/flash/sampler/sampler_pkg.h 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_SAMPLAR_PACKAGE_H
-#define FLASH_SAMPLAR_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_sampler_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_SAMPLAR_PACKAGE_H__
-#endif
-

=== renamed file 'libcore/asobj/System_as.cpp' => 
'libcore/asobj/flash/system/System_as.cpp'
--- a/libcore/asobj/System_as.cpp       2009-07-01 05:59:44 +0000
+++ b/libcore/asobj/flash/system/System_as.cpp  2009-07-02 09:04:07 +0000
@@ -17,8 +17,6 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#include <sstream>
-
 #include "movie_root.h" // interface callback
 #include "log.h"
 #include "System_as.h"
@@ -27,6 +25,8 @@
 #include "VM.h" // for getPlayerVersion() 
 #include "Object.h" // for getObjectInterface
 
+#include <sstream>
+
 namespace gnash {
 
 // Forward declarations.
@@ -42,13 +42,18 @@
     as_value system_security_allowdomain(const fn_call& fn);
     as_value system_security_allowinsecuredomain(const fn_call& fn);
     as_value system_security_loadpolicyfile(const fn_call& fn);
-    as_value system_setclipboard(const fn_call& fn);
+    as_value system_setClipboard(const fn_call& fn);
     as_value system_showsettings(const fn_call& fn);
     as_value system_exactsettings(const fn_call& fn);
     as_value system_usecodepage(const fn_call& fn);
     as_object* getSystemSecurityInterface(as_object& o);
     as_object* getSystemCapabilitiesInterface(as_object& o);
     void attachSystemInterface(as_object& proto);
+    
+    // AS3 functions.
+    as_value system_gc(const fn_call& fn);
+    as_value system_pause(const fn_call& fn);
+    as_value system_resume(const fn_call& fn);
 }
 
 
@@ -304,7 +309,7 @@
        proto.init_member("security", getSystemSecurityInterface(proto));
        proto.init_member("capabilities", 
getSystemCapabilitiesInterface(proto));
        proto.init_member("setClipboard", 
-            new builtin_function(system_setclipboard));
+            new builtin_function(system_setClipboard));
        proto.init_member("showSettings", vm.getNative(2107, 0));
 
        proto.init_property("useCodepage", &system_usecodepage,
@@ -344,15 +349,13 @@
     return as_value();
 }
 
-
 as_value
-system_setclipboard(const fn_call& /*fn*/)
+system_setClipboard(const fn_call& /*fn*/)
 {
     LOG_ONCE(log_unimpl ("System.setClipboard") );
     return as_value();
 }
 
-
 as_value
 system_showsettings(const fn_call& /*fn*/)
 {
@@ -360,6 +363,27 @@
     return as_value();
 }
 
+as_value
+system_gc(const fn_call& /*fn*/)
+{
+    log_unimpl (__FUNCTION__);
+    return as_value();
+}
+
+as_value
+system_pause(const fn_call& /*fn*/)
+{
+    log_unimpl (__FUNCTION__);
+    return as_value();
+}
+
+as_value
+system_resume(const fn_call& /*fn*/)
+{
+    log_unimpl (__FUNCTION__);
+    return as_value();
+}
+
 
 // FIXME: should return true if shared object files
 // are stored under an exact domain name (www.gnashdev.org or

=== removed file 'libcore/asobj/flash/system/System_as.cpp'
--- a/libcore/asobj/flash/system/System_as.cpp  2009-06-09 18:03:04 +0000
+++ b/libcore/asobj/flash/system/System_as.cpp  1970-01-01 00:00:00 +0000
@@ -1,558 +0,0 @@
-// System_as.cpp:  ActionScript "System" class, for Gnash.
-//
-//   Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-#include "System_as.h"
-#include "log.h"
-#include "fn_call.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-
-////Si added
-#include <sstream>
-#include "movie_root.h" // interface callback
-#include "builtin_function.h"
-#include "VM.h" // for getPlayerVersion() 
-#include "Object.h" // for getObjectInterface
-///end of Si added
-
-namespace gnash {
-
-// Forward declarations
-//namespace {
-    as_value system_gc(const fn_call& fn);
-    as_value system_pause(const fn_call& fn);
-    as_value system_resume(const fn_call& fn);
-    as_value system_setClipboard(const fn_call& fn);
-    as_value system_ctor(const fn_call& fn);
-    void attachSystemInterface(as_object& o);
-    void attachSystemStaticInterface(as_object& o);
-    as_object* getSystemInterface();
-
-/// Si added
-
-inline std::string trueFalse(bool x) { return x ? "t" : "f"; }
-
-template<typename T> inline void convertValue(const std::string& in,T& val);
-
-    const std::string& systemLanguage(as_object& proto);
-    as_value system_security_allowdomain(const fn_call& fn);
-    as_value system_security_allowinsecuredomain(const fn_call& fn);
-    as_value system_security_loadpolicyfile(const fn_call& fn);
-    as_value system_showsettings(const fn_call& fn);
-    as_value system_exactsettings(const fn_call& fn);
-    as_value system_usecodepage(const fn_call& fn);
-    as_object* getSystemSecurityInterface(as_object& o);
-    as_object* getSystemCapabilitiesInterface(as_object& o);
-    void attachSystemInterface(as_object& proto);
-
-//extern   void registerSystemNative(as_object& global);
-//}
-/// End of Si added
-
-void
-system_class_init(as_object& global)
-{
-       // _global.System is NOT a class, but a simple object, see System.as
-
-       boost::intrusive_ptr<as_object> obj = new 
as_object(getObjectInterface());
-       attachSystemInterface(*obj);
-       global.init_member("System", obj.get());
-}
-
-void
-registerSystemNative(as_object& global)
-{
-    VM& vm = global.getVM();
-    
-    vm.registerNative(system_security_allowdomain, 12, 0);
-    vm.registerNative(system_showsettings, 2107, 0);
-    
-    // From http://osflash.org/flashcoders/undocumented/asnative
-    
-    // Run once in startup script then deleted...
-    // System.Capabilities.Query 11, 0    
-    
-    // System.Product.isRunning 2201, 0
-    // System.Product.isInstalled 2201, 1
-    // System.Product.launch 2201, 2
-    // System.Product.download 2201, 3    
-}
-
-
-class System_as : public as_object
-{
-
-public:
-
-    System_as()
-        :
-        as_object(getSystemInterface())
-    {}
-};
-
-//Si
-//This function is not defined!
-
-void
-attachSystemStaticInterface(as_object& )
-{
-
-}
-
-as_object*
-getSystemInterface()
-{
-    static boost::intrusive_ptr<as_object> o;
-    if ( ! o ) {
-        o = new as_object();
-        attachSystemInterface(*o);
-    }
-    return o.get();
-}
-
-as_value
-system_gc(const fn_call& fn)
-{
-    boost::intrusive_ptr<System_as> ptr =
-        ensureType<System_as>(fn.this_ptr);
-    UNUSED(ptr);
-    log_unimpl (__FUNCTION__);
-    return as_value();
-}
-
-as_value
-system_pause(const fn_call& fn)
-{
-    boost::intrusive_ptr<System_as> ptr =
-        ensureType<System_as>(fn.this_ptr);
-    UNUSED(ptr);
-    log_unimpl (__FUNCTION__);
-    return as_value();
-}
-
-as_value
-system_resume(const fn_call& fn)
-{
-    boost::intrusive_ptr<System_as> ptr =
-        ensureType<System_as>(fn.this_ptr);
-    UNUSED(ptr);
-    log_unimpl (__FUNCTION__);
-    return as_value();
-}
-
-as_value
-system_setClipboard(const fn_call& fn)
-{
-    boost::intrusive_ptr<System_as> ptr =
-        ensureType<System_as>(fn.this_ptr);
-    UNUSED(ptr);
-    log_unimpl (__FUNCTION__);
-    return as_value();
-}
-
-as_value
-system_ctor(const fn_call& )
-{
-    boost::intrusive_ptr<as_object> obj = new System_as;
-
-    return as_value(obj.get()); // will keep alive
-}
-
-as_object*
-getSystemSecurityInterface(as_object& o)
-{
-    VM& vm = o.getVM();
-
-       static boost::intrusive_ptr<as_object> proto;
-       if ( proto == NULL )
-       {
-               proto = new as_object(getObjectInterface());
-               proto->init_member("allowDomain", vm.getNative(12, 0));
-
-               // TODO: only available when SWF >= 7 
-               proto->init_member("allowInsecureDomain",
-                new builtin_function(system_security_allowinsecuredomain));
-
-               proto->init_member("loadPolicyFile",
-                new builtin_function(system_security_loadpolicyfile));
-       }
-       return proto.get();
-}
-
-as_object*
-getSystemCapabilitiesInterface(as_object& o)
-{
-       RcInitFile& rcfile = RcInitFile::getDefaultInstance();
-
-    //
-    // Filesystem, access, miscellaneous hardware information
-    //
-
-    // "Windows XP", "Windows 2000", "Windows NT", "Windows 98/ME",
-    // "Windows 95", "Windows CE", "Linux", "MacOS"
-    // Override in gnashrc
-    VM& vm = o.getVM();
-    
-    const std::string os = vm.getOSName();
-
-    const std::string language = systemLanguage(o);
-
-    // FIXME: these need to be implemented properly 
-    // Does the NetStream object natively support SSL?
-       const bool hasTLS = false;
-
-    // Microphone and camera access disabled
-       const bool avHardwareDisable = false;
-       
-       // Not sure: seems to be whether the movie can 'float' above web pages,
-       // and is useful for disabling certain annoying adverts.
-       const bool windowlessDisable = false;
-
-       const bool hasPrinting = true;
-       const bool hasAccessibility = true;
-       const bool isDebugger = false;
-       const bool localFileReadDisable = false;
-
-    //
-    // Display information (needs active GUI)
-    //
-
-    const movie_root& m = vm.getRoot();
-
-    int screenResolutionX;
-    convertValue(m.callInterface("System.capabilities.screenResolutionX"),
-            screenResolutionX);
-    int screenResolutionY;
-    convertValue(m.callInterface("System.capabilities.screenResolutionY"),
-            screenResolutionY);
-    int screenDPI;
-    convertValue(m.callInterface("System.capabilities.screenDPI"), screenDPI);
-        
-    // Documented to be a number, but is in fact a string.
-    const std::string pixelAspectRatio = 
-        m.callInterface("System.capabilities.pixelAspectRatio");
-
-    // "StandAlone", "External", "PlugIn", "ActiveX" (get from GUI)
-    const std::string playerType =
-        m.callInterface("System.capabilities.playerType");
-
-    const std::string screenColor =
-        m.callInterface("System.capabilities.screenColor");
-
-    //
-    // Media
-    //
-        
-    // Is audio available?
-    const bool hasAudio = (vm.getRoot().runInfo().soundHandler());
-
-    // FIXME: these need to be implemented properly. They are mostly
-    // self-explanatory.
-    const bool hasAudioEncoder = true;
-    const bool hasEmbeddedVideo = true;
-    const bool hasIME = true;
-    const bool hasMP3 = true;
-    const bool hasScreenBroadcast = true;
-    const bool hasScreenPlayback = true;
-    const bool hasStreamingAudio = true;
-    const bool hasStreamingVideo = true;
-    const bool hasVideoEncoder = true;
-
-    //
-    // Player version
-    //
-
-    // "LNX 9,0,22,0", "MAC 8,0,99,0"
-    // Override in gnashrc
-    const std::string version = vm.getPlayerVersion();
-
-    // "Macromedia Windows", "Macromedia Linux", "Macromedia MacOS"
-    // Override in gnashrc
-    const std::string manufacturer = rcfile.getFlashSystemManufacturer();
-    
-    // serverString
-       // A URL-encoded string to send system info to a server.
-       // Boolean values are represented as t or f.            
-       // Privacy concerns should probably be addressed by     
-       // allowing this string to be sent or not; individual   
-       // values that might affect privacy can be overridden   
-       // in gnashrc.
-       
-       // hasIME seems not to be included in the server string, though
-       // it is documented to have a server string of IME.
-       // Linux player version 9 has no hasIME property (but no need
-       // to emulate that.)
-       
-       // TLS and hasTLS are documented for AS3, player version 9.
-       //
-       // WD is included in the server string for player version 9,
-       // but not documented. It corresponds to the equally undocumented
-       // windowlessDisable.
-       
-       // This should be the standard order of parameters in the server
-       // string.
-       std::ostringstream serverString;
-       serverString << "A="    << trueFalse(hasAudio)
-                       << "&SA="       << trueFalse(hasStreamingAudio)
-                       << "&SV="       << trueFalse(hasStreamingVideo)
-                       << "&EV="       << trueFalse(hasEmbeddedVideo)
-                       << "&MP3="      << trueFalse(hasMP3)                    
                        
-                       << "&AE="       << trueFalse(hasAudioEncoder)
-                       << "&VE="       << trueFalse(hasVideoEncoder)
-                       << "&ACC="      << trueFalse(hasAccessibility)
-                       << "&PR="       << trueFalse(hasPrinting)
-                       << "&SP="       << trueFalse(hasScreenPlayback) 
-                       << "&SB="       << trueFalse(hasScreenBroadcast) 
-                       << "&DEB="      << trueFalse(isDebugger)
-                       << "&V="    << URL::encode(version)
-                       << "&M="    << URL::encode(manufacturer)
-                       << "&R="    << screenResolutionX << "x" << 
screenResolutionY
-                       << "&DP="       << screenDPI
-                       << "&COL="      << screenColor                          
        
-                       << "&AR="   << pixelAspectRatio
-                       << "&OS="   << URL::encode(os)
-                       << "&L="    << language                 
-                       << "&PT="   << playerType
-                       << "&AVD="      << trueFalse(avHardwareDisable) 
-                       << "&LFD="      << trueFalse(localFileReadDisable)
-                       << "&WD="   << trueFalse(windowlessDisable)
-                       << "&TLS="      << trueFalse(hasTLS);
-       
-       static boost::intrusive_ptr<as_object> proto;
-       if ( proto == NULL )
-       {
-               const int flags = as_prop_flags::dontDelete
-                               | as_prop_flags::dontEnum
-                               | as_prop_flags::readOnly;
-
-               proto = new as_object(getObjectInterface());
-
-               proto->init_member("version", version, flags);
-               proto->init_member("playerType", playerType, flags);
-               proto->init_member("os", os, flags);
-               proto->init_member("manufacturer", manufacturer, flags);
-               proto->init_member("language", language, flags);
-               proto->init_member("hasAudio", hasAudio, flags);
-               proto->init_member("screenResolutionX", screenResolutionX, 
flags);
-               proto->init_member("screenResolutionY", screenResolutionY, 
flags);
-               proto->init_member("screenColor", screenColor, flags);
-               proto->init_member("screenDPI", screenDPI, flags);
-               proto->init_member("pixelAspectRatio", pixelAspectRatio, flags);
-               proto->init_member("serverString", serverString.str(), flags);
-               proto->init_member("avHardwareDisable", avHardwareDisable, 
flags);
-               proto->init_member("hasAudioEncoder", hasAudioEncoder, flags);
-               proto->init_member("hasEmbeddedVideo", hasEmbeddedVideo, flags);
-               proto->init_member("hasIME", hasIME, flags);
-               proto->init_member("hasMP3", hasMP3, flags);
-               proto->init_member("hasPrinting", hasPrinting, flags);
-               proto->init_member("hasScreenBroadcast", hasScreenBroadcast, 
flags);
-               proto->init_member("hasScreenPlayback", hasScreenPlayback, 
flags);
-               proto->init_member("hasStreamingAudio", hasStreamingAudio, 
flags);
-               proto->init_member("hasStreamingVideo", hasStreamingVideo, 
flags);
-               proto->init_member("hasVideoEncoder", hasVideoEncoder, flags);
-               proto->init_member("hasAccessibility", hasAccessibility, flags);
-               proto->init_member("isDebugger", isDebugger, flags);
-               proto->init_member("localFileReadDisable", 
localFileReadDisable, flags);
-               proto->init_member("hasTLS", hasTLS, flags);
-               proto->init_member("windowlessDisable", windowlessDisable, 
flags);
-       }
-       return proto.get();
-}
-
-/// Convert a string to the type passed in, making sure the target variable
-/// is initialized.
-template<typename T>
-inline void
-convertValue(const std::string& in, T& val)
-{
-    val = T();
-    std::istringstream is(in);
-    is >> val;
-} 
-
-void
-attachSystemInterface(as_object& proto)
-{
-       VM& vm = proto.getVM();
-
-       proto.init_member("security", getSystemSecurityInterface(proto));
-       proto.init_member("capabilities", 
getSystemCapabilitiesInterface(proto));
-       proto.init_member("setClipboard", 
-            new builtin_function(system_setClipboard));
-       proto.init_member("showSettings", vm.getNative(2107, 0));
-
-       proto.init_property("useCodepage", &system_usecodepage,
-            &system_usecodepage);
-
-    const int flags = as_prop_flags::dontDelete
-                    | as_prop_flags::dontEnum
-                    | as_prop_flags::readOnly
-                    | as_prop_flags::onlySWF6Up;
-
-    proto.init_property("exactSettings", &system_exactsettings,
-            &system_exactsettings, flags);
-
-}
-
-
-as_value
-system_security_allowdomain(const fn_call& /*fn*/)
-{
-    LOG_ONCE(log_unimpl ("System.security.allowDomain") );
-    return as_value();
-}
-
-
-as_value
-system_security_allowinsecuredomain(const fn_call& /*fn*/)
-{
-    LOG_ONCE(log_unimpl ("System.security.allowInsecureDomain") );
-    return as_value();
-}
-
-
-as_value
-system_security_loadpolicyfile(const fn_call& /*fn*/)
-{
-    LOG_ONCE(log_unimpl ("System.security.loadPolicyFile") );
-    return as_value();
-}
-
-as_value
-system_showsettings(const fn_call& /*fn*/)
-{
-    LOG_ONCE(log_unimpl ("System.showSettings") );
-    return as_value();
-}
-
-
-// FIXME: should return true if shared object files
-// are stored under an exact domain name (www.gnashdev.org or
-// gnashdev.org); false if both are stored under gnashdev.org.
-// Can be set.
-as_value
-system_exactsettings(const fn_call& fn)
-{
-       static boost::intrusive_ptr<as_object> obj =
-        ensureType<as_object>(fn.this_ptr);
-
-    // Getter
-    if (fn.nargs == 0)
-    {
-        // Is always true until we implement it.
-        return as_value(true);   
-    }
-    
-    // Setter
-    else 
-    {
-        LOG_ONCE(log_unimpl ("System.exactSettings") );
-        return as_value();
-    }
-}
-
-
-// FIXME: if true, SWF6+ should treat DisplayObjects as Latin
-// charset variants. If false (default), as UtrueFalse-8.
-// Can be set.
-as_value
-system_usecodepage(const fn_call& fn)
-{
-       boost::intrusive_ptr<as_object> obj = 
-        ensureType<as_object>(fn.this_ptr);
-
-    // Getter
-    if (fn.nargs == 0)
-    {
-        // Is always false until we implement it.
-        return as_value(false);   
-    }
-    
-    // Setter
-    else 
-    {
-        LOG_ONCE(log_unimpl ("System.useCodepage") );
-        return as_value();
-    }
-}
-
-
-
-const std::string&
-systemLanguage(as_object& proto)
-{
-       // Two-letter language code ('en', 'de') corresponding to ISO 639-1
-       // Chinese can be either zh-CN or zh-TW. English used to have a 
-       // country (GB, US) qualifier, but that was dropped in version 7 of
-    // the player.
-       // This method relies on getting a POSIX-style language code of the form
-       // "zh_TW.utf8", "zh_CN" or "it" from the VM.
-       // It is obviously very easy to extend support to all language codes, 
but
-       // some scripts rely on there being only 20 possible languages. It could
-       // be a run time option if it's important enough to care.
-
-       static std::string lang = proto.getVM().getSystemLanguage();
-       
-       const char* languages[] = {"en", "fr", "ko", "ja", "sv",
-                               "de", "es", "it", "zh", "pt",
-                               "pl", "hu", "cs", "tr", "fi",
-                               "da", "nl", "no", "ru"};
-       
-       const unsigned int size = sizeof (languages) / sizeof (*languages);
-       
-       if (std::find(languages, languages + size, lang.substr(0,2)) != 
languages + size)
-       {
-               if (lang.substr(0,2) == "zh")
-               {
-                       // Chinese is the only language since the pp version 7
-                       // to need an additional qualifier.
-                       if (lang.substr(2, 3) == "_TW") lang = "zh-TW";
-                       else if (lang.substr(2, 3) == "_CN") lang = "zh-CN";
-                       else lang = "xu";
-               }
-               else
-               {
-                       // All other matching cases: retain just the first
-                       // two DisplayObjects.
-                       lang.erase(2);
-               }
-       }
-       else
-       {
-               // Unknown language. We also return this if
-               // getSystemLanguage() returns something unexpected. 
-               lang = "xu";
-       }
-
-       return lang;
-
-}
-
-} // gnash namespace
-
-// local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
-

=== modified file 'libcore/asobj/flash/system/system.am'
--- a/libcore/asobj/flash/system/system.am      2009-06-09 18:13:05 +0000
+++ b/libcore/asobj/flash/system/system.am      2009-07-02 10:00:54 +0000
@@ -17,8 +17,8 @@
 
 SYSTEMdir = $(includedir)/gnash
 
-SYSTEM_SOURCES = asobj/flash/system/system_pkg.cpp
-SYSTEM_HEADERS = asobj/flash/system/system_pkg.h
+SYSTEM_SOURCES = 
+SYSTEM_HEADERS = 
 
 if BUILD_APPLICATIONDOMAIN_AS3
 SYSTEM_SOURCES += asobj/flash/system/ApplicationDomain_as.cpp

=== removed file 'libcore/asobj/flash/system/system_pkg.cpp'
--- a/libcore/asobj/flash/system/system_pkg.cpp 2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/system/system_pkg.cpp 1970-01-01 00:00:00 +0000
@@ -1,70 +0,0 @@
-// system_pkg.cpp:  ActionScript "flash.system" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "ApplicationDomain_as.h"
-#include "Capabilities_as.h"
-#include "IMEConversionMode_as.h"
-#include "IME_as.h"
-#include "LoaderContext_as.h"
-#include "SecurityDomain_as.h"
-#include "SecurityPanel_as.h"
-#include "Security_as.h"
-#include "System_as.h"
-
-#include "system_pkg.h"
-#include "systemclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_system_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.system package");
-       as_object *pkg = new as_object(getObjectInterface());
-        
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3systemclasses[i]) {
-           as3systemclasses[i](*pkg);
-        ++i;
-    }
-        
-       return pkg;
-}
-
-void
-flash_system_package_init(as_object& where)
-{
-       log_debug("Initializaing flash.system package");
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("system"), 
get_flash_system_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/system/system_pkg.h'
--- a/libcore/asobj/flash/system/system_pkg.h   2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/system/system_pkg.h   1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_SYSTEM_PACKAGE_H
-#define FLASH_SYSTEM_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_system_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// FLASH_SYSTEM_PACKAGE_H
-#endif
-

=== modified file 'libcore/asobj/flash/text/text_pkg.cpp'
--- a/libcore/asobj/flash/text/text_pkg.cpp     2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/text/text_pkg.cpp     2009-07-02 10:49:15 +0000
@@ -51,25 +51,16 @@
 static as_value
 get_flash_text_package(const fn_call& fn)
 {
-    bool as3 = isAS3(fn);
-       log_debug("Loading %s flash.text package", as3 ? "AVM2" : "AVM1");
+       log_debug("Loading flash.text package");
     
     as_object *pkg = new as_object(getObjectInterface());
 
        // Call the [objectname]_init() function for each class.
        int i = 0;
 
-    if (as3) {
-        while (as3textclasses[i]) {
-            as3textclasses[i](*pkg);
-            ++i;
-        }
-    }
-    else {
-        while (as2textclasses[i]) {
-            as2textclasses[i](*pkg);
-            ++i;
-        }
+    while (textclasses[i]) {
+        textclasses[i](*pkg);
+        ++i;
     }
 
        return pkg;

=== modified file 'libcore/asobj/flash/text/textclasses.h'
--- a/libcore/asobj/flash/text/textclasses.h    2009-06-07 00:49:02 +0000
+++ b/libcore/asobj/flash/text/textclasses.h    2009-07-02 10:49:15 +0000
@@ -2,25 +2,7 @@
 #ifndef GNASH_ASOBJ_FLASH_TEXT_H
 #define GNASH_ASOBJ_FLASH_TEXT_H 1
 #include "sharedlib.h"
-static gnash::SharedLib::initentry *as3textclasses[] = {
-       gnash::antialiastype_class_init,
-       gnash::csmsettings_class_init,
-       gnash::fontstyle_class_init,
-       gnash::fonttype_class_init,
-       gnash::font_class_init,
-       gnash::gridfittype_class_init,
-       gnash::statictext_class_init,
-       gnash::stylesheet_class_init,
-       gnash::textcolortype_class_init,
-       gnash::textdisplaymode_class_init,
-       gnash::textfieldautosize_class_init,
-       gnash::textfieldtype_class_init,
-       gnash::textformatalign_class_init,
-       gnash::textlinemetrics_class_init,
-       gnash::textrenderer_class_init,
-       0
-};
-static gnash::SharedLib::initentry *as2textclasses[] = {
+static gnash::SharedLib::initentry *textclasses[] = {
        gnash::textrenderer_class_init,
        0
 };

=== modified file 'libcore/asobj/flash/ui/ui.am'
--- a/libcore/asobj/flash/ui/ui.am      2009-06-09 19:24:40 +0000
+++ b/libcore/asobj/flash/ui/ui.am      2009-07-02 10:00:54 +0000
@@ -17,8 +17,8 @@
 
 UIdir = $(includedir)/gnash
 
-UI_SOURCES = asobj/flash/ui/ui_pkg.cpp
-UI_HEADERS = asobj/flash/ui/ui_pkg.h
+UI_SOURCES = 
+UI_HEADERS = 
 
 if BUILD_CONTEXTMENUBUILTINITEMS_AS3
 UI_SOURCES += asobj/flash/ui/ContextMenuBuiltInItems_as.cpp

=== removed file 'libcore/asobj/flash/ui/ui_pkg.cpp'
--- a/libcore/asobj/flash/ui/ui_pkg.cpp 2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/ui/ui_pkg.cpp 1970-01-01 00:00:00 +0000
@@ -1,66 +0,0 @@
-// ui_pkg.cpp:  ActionScript "flash.ui" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "ContextMenuBuiltInItems_as.h"
-#include "ContextMenuItem_as.h"
-#include "ContextMenu_as.h"
-#include "KeyLocation_as.h"
-#include "Keyboard_as.h"
-#include "Mouse_as.h"
-
-#include "ui_pkg.h"
-#include "uiclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_ui_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.ui package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3uiclasses[i]) {
-           as3uiclasses[i](*pkg);
-        ++i;
-       } 
-
-       return pkg;
-}
-
-void
-flash_ui_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("ui"), get_flash_ui_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/ui/ui_pkg.h'
--- a/libcore/asobj/flash/ui/ui_pkg.h   2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/ui/ui_pkg.h   1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_UI_PACKAGE_H
-#define FLASH_UI_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_ui_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_UI_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/utils/utils.am'
--- a/libcore/asobj/flash/utils/utils.am        2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/utils/utils.am        2009-07-02 10:00:54 +0000
@@ -17,8 +17,8 @@
 
 UTILSdir = $(includedir)/gnash
 
-UTILS_SOURCES = asobj/flash/utils/utils_pkg.cpp
-UTILS_HEADERS = asobj/flash/utils/utils_pkg.h
+UTILS_SOURCES = 
+UTILS_HEADERS = 
 
 if BUILD_BYTEARRAY_AS3
 UTILS_SOURCES += asobj/flash/utils/ByteArray_as.cpp

=== removed file 'libcore/asobj/flash/utils/utils_pkg.cpp'
--- a/libcore/asobj/flash/utils/utils_pkg.cpp   2009-06-03 16:05:40 +0000
+++ b/libcore/asobj/flash/utils/utils_pkg.cpp   1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-// utils_pkg.cpp:  ActionScript "flash.utils" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "ByteArray_as.h"
-#include "Dictionary_as.h"
-#include "Endian_as.h"
-#include "IDataInput_as.h"
-#include "IDataOutput_as.h"
-#include "IExternalizable_as.h"
-#include "Proxy_as.h"
-#include "Timer_as.h"
-
-#include "utils_pkg.h"
-#include "utilsclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_utils_package(const fn_call& fn)
-{
-    // This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.utils package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3utilsclasses[i]) {
-           as3utilsclasses[i](*pkg);
-        ++i;
-    }
-
-       return pkg;
-}
-
-void
-flash_utils_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("utils"), 
get_flash_utils_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/utils/utils_pkg.h'
--- a/libcore/asobj/flash/utils/utils_pkg.h     2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/utils/utils_pkg.h     1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_UTILS_PACKAGE_H
-#define FLASH_UTILS_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_utils_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_UTILS_PACKAGE_H__
-#endif
-

=== modified file 'libcore/asobj/flash/xml/xml.am'
--- a/libcore/asobj/flash/xml/xml.am    2009-06-07 18:12:15 +0000
+++ b/libcore/asobj/flash/xml/xml.am    2009-07-02 10:00:54 +0000
@@ -18,8 +18,8 @@
 XMLdir = $(includedir)/gnash
 
 # This variable contains all classes in AS2 and AS3
-XML_SOURCES = asobj/flash/xml/xml_pkg.cpp
-XML_HEADERS = asobj/flash/xml/xml_pkg.h
+XML_SOURCES =
+XML_HEADERS =
 
 # This variable contains the classes only in AS3
 XML_SOURCES_AS3 = 

=== removed file 'libcore/asobj/flash/xml/xml_pkg.cpp'
--- a/libcore/asobj/flash/xml/xml_pkg.cpp       2009-06-06 07:05:47 +0000
+++ b/libcore/asobj/flash/xml/xml_pkg.cpp       1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-// xml_pkg.cpp:  ActionScript "flash.xml" package, for Gnash.
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Object.h" // for getObjectInterface
-#include "as_object.h"
-
-#include "string_table.h"
-#include "VM.h"
-#include "fn_call.h"
-#include "MovieClip.h"
-
-#include "XMLDocument_as.h"
-#include "XMLNodeType_as.h"
-#include "XMLNode_as.h"
-
-#include "xml_pkg.h"
-#include "xmlclasses.h"
-
-namespace gnash {
-
-static as_value
-get_flash_xml_package(const fn_call& fn)
-{
-
-    /// This package is AS3 only!
-    assert(isAS3(fn));
-
-       log_debug("Loading AVM2 flash.xml package");
-       as_object *pkg = new as_object(getObjectInterface());
-
-       // Call the [objectname]_init() function for each class.
-       int i = 0;
-       while (as3xmlclasses[i]) {
-           as3xmlclasses[i](*pkg);
-        ++i;
-       } 
-
-       return pkg;
-}
-
-void
-flash_xml_package_init(as_object& where)
-{
-       string_table& st = where.getVM().getStringTable();
-       where.init_destructive_property(st.find("xml"), get_flash_xml_package);
-}
-
-
-} // end of gnash namespace

=== removed file 'libcore/asobj/flash/xml/xml_pkg.h'
--- a/libcore/asobj/flash/xml/xml_pkg.h 2009-05-24 22:25:59 +0000
+++ b/libcore/asobj/flash/xml/xml_pkg.h 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-#ifndef FLASH_XML_PACKAGE_H
-#define FLASH_XML_PACKAGE_H
-
-namespace gnash {
-
-class as_object;
-
-void flash_xml_package_init(as_object& pkg);
-
-} // end of gnash namespace
-
-// __FLASH_XML_PACKAGE_H__
-#endif
-

=== modified file 'libcore/namedStrings.cpp'
--- a/libcore/namedStrings.cpp  2009-07-01 15:50:44 +0000
+++ b/libcore/namedStrings.cpp  2009-07-02 09:40:13 +0000
@@ -190,6 +190,7 @@
        string_table::svt( "LoadVars", NSV::CLASS_LOAD_VARS ),
        string_table::svt( "LocalConnection", NSV::CLASS_LOCALCONNECTION ),
        string_table::svt( "CustomActions", NSV::CLASS_CUSTOM_ACTIONS ),
+       string_table::svt( "QName", NSV::CLASS_QNAME ),
        string_table::svt( "Namespace", NSV::CLASS_NAMESPACE ),
        string_table::svt( "NetConnection", NSV::CLASS_NET_CONNECTION ),
        string_table::svt( "NetStream", NSV::CLASS_NET_STREAM ),

=== modified file 'libcore/namedStrings.h'
--- a/libcore/namedStrings.h    2009-07-01 15:50:44 +0000
+++ b/libcore/namedStrings.h    2009-07-02 09:40:13 +0000
@@ -80,6 +80,7 @@
         CLASS_NET_STREAM,
         CLASS_NUMBER,
         CLASS_OBJECT,
+        CLASS_QNAME,
         CLASS_SELECTION,
         CLASS_SHARED_OBJECT,
         CLASS_SOUND,

=== modified file 'libcore/parser/abc_block.cpp'
--- a/libcore/parser/abc_block.cpp      2009-07-01 15:23:58 +0000
+++ b/libcore/parser/abc_block.cpp      2009-07-02 08:46:07 +0000
@@ -117,7 +117,7 @@
 bool
 Trait::finalize_mbody(abc_block *pBlock, asMethod *pMethod)
 {
-       log_abc("Finalizing method");
+       log_abc("Finalizing method trait: kind %s", _kind);
        switch (_kind)
        {
        case KIND_SLOT:
@@ -125,66 +125,59 @@
        {
                // Validate the type.
                asClass *pType;
-               if (_typeIndex)
+               if (_typeIndex) {
                        pType = 
pBlock->locateClass(pBlock->_multinamePool[_typeIndex]);
-               else
+        }
+               else {
                        pType = pBlock->mTheObject;
-               if (!pType)
-               {
+        }
+
+               if (!pType) {
                        log_error(_("ABC: Finalizing trait yielded bad type for 
slot."));
                        return false;
                }
+
                // The name has been validated in read.
                // TODO: Find a better way to initialize trait values.
                if (!_hasValue) {
                        _value = as_value((as_object*)0); // NULL value, right ?
                }
-               log_abc("Adding property=%s with value=%s slot=%u", 
pBlock->_stringPool[_name], _value.toDebugString(), _slotID);
+               log_abc("Adding property=%s with value=%s slot=%u",
+                pBlock->_stringPool[_name], _value.toDebugString(), _slotID);
                pMethod->addValue(_globalName, _namespace, _slotID, pType, 
                        _value, _kind == KIND_CONST);
                break;
        }
        case KIND_METHOD:
        {
-               log_abc("Finalize method trait not implemented.  Returning");
-               break;
                pMethod->addMethod(_name, _namespace, _method);
                break;
        }
        case KIND_GETTER:
        {
-               log_abc("Finalize getter trait not implemented.  Returning");
-               break;
                pMethod->addGetter(_name, _namespace, _method);
                break;
        }
        case KIND_SETTER:
        {
-               log_abc("Finalize setter trait not implemented.  Returning");
-               break;
                pMethod->addSetter(_name, _namespace, _method);
                break;
        }
        case KIND_CLASS:
        {
-               log_abc("Finalize class trait not implemented.  Returning");
-               break;
                pMethod->addMemberClass(_name, _namespace, _slotID, 
                        pBlock->_classes[_classInfoIndex]);
                break;
        }
        case KIND_FUNCTION:
        {
-               log_abc("Finalize function trait not implemented.  Returning");
-               break;
                pMethod->addSlotFunction(_name, _namespace, _slotID, _method);
                break;
        }
        default:
                // Not here -- validated already in read.
                return false;
-               break;
-       } // end of switch
+       } 
        return true;
 }
 
@@ -860,31 +853,34 @@
                // If there are default parameters, read them now.
                // Runtime will do validation of whether or not these can 
actually
                // be assigned to the corresponding parameters.
-               if (flags & METHOD_OPTIONAL_ARGS)
-               {
-//                     log_abc("We have flags and optional args.");
-                       boost::uint32_t ocount = _stream->read_V32();
+               if (flags & METHOD_OPTIONAL_ARGS) {
+                       
+            boost::uint32_t ocount = _stream->read_V32();
                        log_abc("  Optional args: %u", ocount);
                        
pMethod->setMinArgumentCount(pMethod->maxArgumentCount() - ocount);
-                       for (unsigned int j = 0; j < ocount; ++j)
-                       {
+                       
+            for (unsigned int j = 0; j < ocount; ++j) {
                                log_abc("  Reading optional arg: %u", j);
                                boost::uint32_t index = _stream->read_V32();
                                boost::uint8_t kindof = _stream->read_u8();
                                log_abc("   Index: %u Kindof: %u", index, 
kindof);
                                as_value v;
-                               if (!pool_value(index, kindof, v))
-                                       return false; // message done by 
pool_value
+                               if (!pool_value(index, kindof, v)) {
+                                       return false; 
+                }
                                pMethod->pushOptional(v);
                        }
                        log_abc("Done handling optional args.");
                }
 
+        if (flags & METHOD_ACTIVATION) {
+            log_abc("Method needs activation");
+            pMethod->setNeedsActivation();
+        }
+
                // If there are names present for the parameters, skip them.
-               if (flags & METHOD_ARG_NAMES)
-               {
-                       for (unsigned int j = 0; j < param_count; ++j)
-                       {
+               if (flags & METHOD_ARG_NAMES) {
+                       for (size_t j = 0; j < param_count; ++j) {
                                _stream->skip_V32();
                        }
                }
@@ -1206,9 +1202,9 @@
 
                method.setBody(new CodeStream(body));
                
-               boost::uint32_t ecount = _stream->read_V32();
-               for (unsigned int j = 0; j < ecount; ++j)
-               {
+        // Exception count and exceptions
+               const boost::uint32_t ecount = _stream->read_V32();
+               for (unsigned int j = 0; j < ecount; ++j) {
                        asException *pExcept = mCH->newException();
 
                        // Where the try block begins and ends.
@@ -1222,16 +1218,15 @@
                        boost::uint32_t catch_type = _stream->read_V32();
                        if (catch_type >= _multinamePool.size()) {
                                log_error(_("ABC: Out of bound type for 
exception."));
-//                             return false;
+                               return false;
                        }
                        if (!catch_type) {
                                pExcept->catchAny();
                        }
-                       else
-                       {
+                       else {
                                asClass *pType = 
locateClass(_multinamePool[catch_type]);
-                               if (!pType)
-                               {
+                               if (!pType) {
+
                                        log_error(_("ABC: Unknown type of 
object to catch. (%s)"), 
                                                _stringTable->value(
                             _multinamePool[catch_type].getABCName()));
@@ -1247,33 +1242,34 @@
 
                        // A variable name for the catch type.
                        // In version 46.15, no names.
-                       if (mVersion != ((46 << 16) | 15))
-                       {
+                       if (mVersion != ((46 << 16) | 15)) {
                                boost::uint32_t cvn = _stream->read_V32();
-                               if (cvn >= _multinamePool.size())
-                               {
-                                       log_error(_("ABC: Out of bound name for 
caught exception."));
-//                                     return false;
+                               if (cvn >= _multinamePool.size()) {
+                                       log_error(_("ABC: Out of bound name for 
caught "
+                                "exception."));
+                                       return false;
                                }
                                
pExcept->setName(_multinamePool[cvn].getABCName());
                                
pExcept->setNamespace(_multinamePool[cvn].getNamespace());
                        }
-               } // end of exceptions
+               } 
 
+        // Traits
                boost::uint32_t tcount = _stream->read_V32();
                for (unsigned int j = 0; j < tcount; ++j)
                {
-                       Trait &aTrait = newTrait();
+                       Trait& aTrait = newTrait();
                        aTrait.set_target(_methods[offset]);
-                       if (!aTrait.read(_stream, this)) {
-                // TODO: 'method body activation traits'
+                       
+            if (!aTrait.read(_stream, this)) {
                                return false;
             }
-                       log_abc("Trait: %u name: %s kind: %s value: %s ", j, 
+
+                       log_abc("Activation trait: %u name: %s, kind: %s, 
value: %s ", j, 
                     _stringPool[aTrait._name], aTrait._kind, 
                     aTrait._value.to_string());
                }
-       } // end of bodies loop
+       } 
        return true;
 }
 
@@ -1362,7 +1358,6 @@
         if (it == _stringPool.end()) return 0;
         for (std::vector<asNamespace*>::iterator i = _namespacePool.begin();
                 i != _namespacePool.end(); ++i) {
-            log_abc("Looking in ns: %s", _stringPool[(*i)->getAbcURI()]);
             if (_stringPool[(*i)->getAbcURI()] == nsstr) {
                 a.setNamespace(*i);
                 break;

=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2009-07-01 16:15:52 +0000
+++ b/libcore/vm/Machine.cpp    2009-07-02 07:39:11 +0000
@@ -1634,14 +1634,23 @@
                     push_stack(as_value(arr));
                     break;
                 }
-            /// 0x57 ABC_ACTION_NEWACTIVATION
-            /// Stack Out:
-            ///  vtable -- A new virtual table, which has the previous one as 
a parent.
+
+                /// 0x57 ABC_ACTION_NEWACTIVATION
+                /// Stack Out:
+                ///  vtable -- A new virtual table, which has the
+                ///  previous one as a parent.
                 case SWF::ABC_ACTION_NEWACTIVATION:
                 {
-                    // TODO:  The function contains traits that need to be 
included in the activation object.
-                    //For now we are using the function object as the 
activation object.  There is probably
-                    //a better way.
+                    // TODO:  The function contains traits that need to be
+                    // included in the activation object.
+                    // For now we are using the function object as the
+                    // activation object.  There is probably
+                    // a better way.
+                    //
+                    if (!mCurrentFunction->needsActivation()) {
+                        log_abc("NEWACTIVATION: called for a function without"
+                                "the NEED_ACTIVATION flag");
+                    }
                     push_stack(as_value(mCurrentFunction));
                     break;
                 }
@@ -3201,7 +3210,9 @@
 
     // The value at _registers[0] is generally pushed to the stack for
     // CONSTRUCTSUPER, which apparently expects the object whose super
-    // is to be constructed. Setting it to global as before seems to be wrong.
+    // is to be constructed. The pp's stack names the class for instantiation
+    // at register 0 when the constructor body is executed, which must
+    // correspond to the class prototype.
        setRegister(0, cl->getPrototype());
        executeCodeblock(ctor->getBody());
     log_debug("Finished instantiating class %s", className);
@@ -3227,6 +3238,9 @@
     // 'invisible' to this scope, is available
        as_value val;
     print_scope_stack();
+    const string_table::key var = multiname.getGlobalName();
+    const string_table::key ns = multiname.getNamespace()->getURI();
+
        for (size_t i = 0; i < mScopeStack.totalSize(); ++i)
     {
                as_object* scope_object = mScopeStack.at(i).get();
@@ -3234,17 +3248,18 @@
                        log_abc("Scope object is NULL.");
                        continue;
                }
-               val = scope_object->getMember(multiname.getGlobalName(),
-                multiname.getNamespace()->getURI());
-
-               if (!val.is_undefined()) {
-                       push_stack(mScopeStack.at(i));
+        
+        if (scope_object->get_member(var, &val, ns)) {
+            push_stack(mScopeStack.at(i));
                        return val;
                }
        }
 
+    // TODO: find out what to do here.
     log_abc("Failed to find property in scope stack.");
-       return val;
+       as_object* null = 0;
+    push_stack(null);
+    return val;
 }
 
 as_value

=== modified file 'testsuite/as3compile.all/Makefile.am'
--- a/testsuite/as3compile.all/Makefile.am      2009-06-18 11:14:59 +0000
+++ b/testsuite/as3compile.all/Makefile.am      2009-07-02 09:23:08 +0000
@@ -26,6 +26,8 @@
        function.as \
        MovieClip.as \
        Sprite.as \
+       QName.as \
+       System.as \
        $(NULL)
 
 BOGUS_AS3TESTS = \

=== added file 'testsuite/as3compile.all/QName.as'
--- a/testsuite/as3compile.all/QName.as 1970-01-01 00:00:00 +0000
+++ b/testsuite/as3compile.all/QName.as 2009-07-02 11:43:06 +0000
@@ -0,0 +1,160 @@
+//
+//   Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#include "check.as"
+
+package hello {
+
+    import flash.display.MovieClip;
+
+    public class Main extends MovieClip {
+
+        DEJAGNU_OBJ;
+
+        public function Main() {
+
+            check(!QName.prototype.hasOwnProperty("uri"));    
+            check(!QName.prototype.hasOwnProperty("localName"));    
+            
+            xcheck_equals(QName.prototype, "");    
+            xcheck_equals(QName.constructor, "[class Class]");    
+            xcheck_equals(QName.constructor.prototype, "[object Object]");    
+
+            var q = new QName();
+            xcheck_equals(q.constructor, "[class QName]");    
+            xcheck_equals(q.constructor.constructor, "[class Class]");    
+            xcheck_equals(q.constructor.constructor.prototype,
+                                "[object Object]");    
+            
+            check(q.hasOwnProperty("uri"));
+            check(q.hasOwnProperty("localName"));
+            xcheck_equals(typeof(q.localName), "string");
+            xcheck_equals(typeof(q.uri), "string");
+            xcheck_equals(q.localName, "");
+            xcheck_equals(q.uri, "");
+            xcheck_equals(q.toString(), "");
+
+            // One argument: first arg is localName
+            q = new QName("a");
+            xcheck_equals(typeof(q.localName), "string");
+            xcheck_equals(typeof(q.uri), "string");
+            xcheck_equals(q.localName, "a");
+            xcheck_equals(q.uri, "");
+            xcheck_equals(q.toString(), "a");
+            
+            // Two arguments: first arg is uri, second is localName
+            q = new QName("a", "b");
+            xcheck_equals(typeof(q.localName), "string");
+            xcheck_equals(typeof(q.uri), "string");
+            xcheck_equals(q.localName, "b");
+            xcheck_equals(q.uri, "a");
+            xcheck_equals(q.toString(), "a::b");
+            
+            q = new QName("d", "e", "f");
+            xcheck_equals(typeof(q.localName), "string");
+            xcheck_equals(typeof(q.uri), "string");
+            xcheck_equals(q.localName, "e");
+            xcheck_equals(q.uri, "d");
+            xcheck_equals(q.toString(), "d::e");
+
+            // Copy constructor (not sure what bytecode is produced).
+            var q2 = new QName(q);
+            xcheck_equals(typeof(q2.localName), "string");
+            xcheck_equals(typeof(q2.uri), "string");
+            xcheck_equals(q2.localName, "e");
+            xcheck_equals(q2.uri, "d");
+            xcheck_equals(q.toString(), "d::e");
+
+            q2 = new QName("g", q);
+            xcheck_equals(q2.localName, "e");
+            xcheck_equals(q2.uri, "g");
+            xcheck_equals(q2.toString(), "g::e");
+
+            // A constructor QName(Namespace, string) is documented, but this
+            // seems like a bit of a fraud as the Namespace is simply
+            // converted to a string so can be used as either argument.
+            var ns = new Namespace("nsA");
+            q2 = new QName(ns);
+            xcheck_equals(q2.localName, "nsA");
+            xcheck_equals(q2.uri, "");
+            xcheck_equals(q2.toString(), "nsA");
+
+            q2 = new QName(ns, "h");
+            xcheck_equals(q2.localName, "h");
+            xcheck_equals(q2.uri, "nsA");
+            xcheck_equals(q2.toString(), "nsA::h");
+            
+            q2 = new QName(ns, ns);
+            xcheck_equals(q2.localName, "nsA");
+            xcheck_equals(q2.uri, "nsA");
+            xcheck_equals(q2.toString(), "nsA::nsA");
+
+            ns = new Namespace("prefix", "uri");
+            q2 = new QName(ns, ns);
+            xcheck_equals(q2.localName, "uri");
+            xcheck_equals(q2.uri, "uri");
+            xcheck_equals(q2.toString(), "uri::uri");
+
+            // null can be passed as a uri, meaning 'all namespaces'; if it's
+            // passed as a localName, it's converted to a string.
+            var q3 = new QName(null, null);            
+            xcheck_equals(q3.localName, "null");
+            check_equals(q3.uri, null);
+            xcheck_equals(q3.toString(), "*::null");
+
+            q3 = new QName(null);            
+            xcheck_equals(q3.localName, "null");
+            xcheck_equals(q3.uri, "");
+            xcheck_equals(q3.toString(), "null");
+
+            // Numbers can be used in either position; they are converted to
+            // a string.
+            q3 = new QName(null, 20);
+            xcheck_equals(q3.localName, "20");
+            check_equals(q3.uri, null);
+            xcheck_equals(q3.toString(), "*::20");
+
+            q3 = new QName(400, 20);
+            xcheck_equals(q3.localName, "20");
+            xcheck_equals(q3.uri, "400");
+            xcheck_equals(q3.toString(), "400::20");
+            
+            // Check that QName has Object as its prototype.
+            var b = Object.prototype;
+            b.a = 7;
+            var q4 = new QName();
+            check_equals(q4.a, 7);
+
+            QName.constructor.prototype.a = "stringy";
+            QName.constructor.a = "stringy";
+            check_equals(b.a, 7);
+            q4 = new QName();
+            check_equals(q4.a, 7);    
+            
+            QName.prototype.a = "string";            
+            check_equals(b.a, 7);
+            check_equals(Object.prototype.a, 7);
+            check_equals(q4.a, "string");   
+
+
+            totals(68);
+
+            done();
+        }
+    }
+}
+         

=== added file 'testsuite/as3compile.all/System.as'
--- a/testsuite/as3compile.all/System.as        1970-01-01 00:00:00 +0000
+++ b/testsuite/as3compile.all/System.as        2009-07-02 09:23:08 +0000
@@ -0,0 +1,56 @@
+//
+//   Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#include "check.as"
+
+package main {
+
+    import flash.display.MovieClip;
+    import flash.system.System;
+    import flash.system.Capabilities;
+
+    public class Main extends MovieClip {
+
+        DEJAGNU_OBJ;
+
+        public function Main() {
+
+            // System cannot be instantiated; it throws ArgumentError #2102
+            xcheck_equals(System.prototype, "[object Object]");
+            xcheck_equals(System.constructor, "[class Class]");
+            check(System.hasOwnProperty("setClipboard"));
+            xcheck(System.hasOwnProperty("gc"));
+            xcheck(System.hasOwnProperty("pause"));
+            xcheck(System.hasOwnProperty("resume"));
+            
+            // Not a very useful test.
+            var s = System;
+            xcheck_equals(s, "[class System]");
+            check(s.hasOwnProperty("setClipboard"));
+            
+            // TODO: check the rest of the properties and their types.
+            xcheck(!System.hasOwnProperty("capabilities"));
+
+            var c = Capabilities;
+            xcheck(c.hasOwnProperty("hasAudio"));
+
+            totals(10);
+            done();
+        }
+    }
+}
+         


reply via email to

[Prev in Thread] Current Thread [Next in Thread]