Is there a way to transform a JavaScript class into Flash and implement it the same way as the original one?
For example:
var MyClass = function() {
var exports = {};
var message = exports.message = function showMessage(msg)
alert(msg);
};
return exports;
};
var theClass = new MyClass();
theClass.message("Show this alert");
This class can be converted into Flash (ActionScript) and loaded as a .swf movie:
<object id="myClass" .......
<script type="text/javascript">
theFlashObject.message("Show this alert");
// This will trigger the message function in the class and display the alert
</script>
I hope this explanation is clear.
Thank you.