Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add "swfClass" getter in SWFLoader ; this allows multiple instanciation of a loaded SWF content #14

Merged
merged 1 commit into from

2 participants

@DrBenton

Hi!

With this simple Pull Request we can create multiple instances of a loaded SWF. Of course, this works only if the SWF has been loaded in the same ApplicationDomain than the one of the class which tries to use this swfClass getter.

@DrBenton DrBenton Add "swfClass" getter in SWFLoader
This allows multiple instanciation of a loaded SWF content
404bf3d
@Matan Matan merged commit 16ec695 into Matan:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 6, 2012
  1. @DrBenton

    Add "swfClass" getter in SWFLoader

    DrBenton authored
    This allows multiple instanciation of a loaded SWF content
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/org/assetloader/loaders/SWFLoader.as
View
13 src/org/assetloader/loaders/SWFLoader.as
@@ -106,6 +106,19 @@ package org.assetloader.loaders
}
/**
+ * Gets the resulting Sprite class after loading is complete.
+ * Allows multiple instanciation of this SWF content.
+ *
+ * @return Class
+ */
+ public function get swfClass() : Class
+ {
+ var swfClassName:String = getQualifiedClassName(_swf);
+ var swfClass:Class = getDefinitionByName(swfClassName) as Class;
+ return swfClass;
+ }
+
+ /**
* Dispatched when the properties and methods of a loaded SWF file are accessible and ready for use.
*
* <p>HANDLER ARGUMENTS: (signal:<strong>LoaderSignal</strong>)</p>
Something went wrong with that request. Please try again.