Ok now i`ve changed the way Image Injector works. Now it works as a command line tool. You use it just like mtasc with the same options. In your class files you can use Embed Metadata just like in Flex. For now there is one difference to Flex in Flex you would write
[Embed(source=’images/matthews1.jpg’)]
var image1:String;
With Image Injector you have to use
[Embed(source=’images/matthews1.jpg’)]
var image1:String;=”matthews1″
You can than use attach Movie like this:
_root.attachMovie(image1,”img1″,3);
I`ve included a small example. It`s the modified sample from the mtasc site.
Just run example but and see what happends.
!!! In order to use ImageInjector you will have to copy mtasc into the same directory were
you have the Image Injector.
This is still in early stages. My class parser is not perfect yet. At the moment only the class that
you entered in the command line will be searched for embeds. I will add recursive searching later.
Ahh and your class has to be in the same directory as mtasc as i`m not checking for the classpath
right now. I will add that soon.
Please check it out (at own risk) and report problems.
Thanx
Benz
Leave a Reply