Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Donald Hutchison
committed
Mar 14, 2011
1 parent
6a2c503
commit 243453c
Showing
5 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,27 @@ | ||
package | ||
{ | ||
import flash.events.MouseEvent; | ||
import com.bit101.components.PushButton; | ||
|
||
import flash.display.DisplayObjectContainer; | ||
import flash.display.Sprite; | ||
|
||
/** | ||
* (c) HuzuTech 2011 | ||
*/ | ||
public class ExternalSwf extends Sprite | ||
public class ExternalSwf extends Sprite implements ITestInterface | ||
{ | ||
public var testButton:PushButton; | ||
public var testButton:TestButton; | ||
|
||
public function ExternalSwf() | ||
{ | ||
testButton = new PushButton(); | ||
testButton = new TestButton(); | ||
testButton.label = "Click Me!!"; | ||
addChild(testButton); | ||
|
||
testButton.addEventListener(MouseEvent.CLICK, onClick); | ||
|
||
} | ||
|
||
private function onClick(event : MouseEvent) : void | ||
public function getDisplayObjectContainer():DisplayObjectContainer | ||
{ | ||
/* | ||
* Put a break point on the trace call | ||
*/ | ||
trace("test function called"); | ||
return this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package | ||
{ | ||
import flash.display.DisplayObjectContainer; | ||
/** | ||
* (c) HuzuTech 2011 | ||
*/ | ||
public interface ITestInterface | ||
{ | ||
function getDisplayObjectContainer():DisplayObjectContainer; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package | ||
{ | ||
import flash.events.MouseEvent; | ||
import com.bit101.components.PushButton; | ||
|
||
/** | ||
* (c) HuzuTech 2011 | ||
*/ | ||
public class TestButton extends PushButton | ||
{ | ||
public function TestButton() | ||
{ | ||
addEventListener(MouseEvent.CLICK, onClicked); | ||
} | ||
|
||
private function onClicked(event : MouseEvent) : void | ||
{ | ||
trace("test function called"); | ||
} | ||
} | ||
} |