damarez
%Europe/Berlin %037 %2005, 00:53
Hey beste flashers,
was weer aan het rondneuzen en dit keer in help van flash 8.
Ik heb een hele leuke functie ontdekt waarmee jezelf custom actions kan toevoegen aan je actions panel.
zet in je eerste frame
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
trace(success);
CustomActions.install("dogclass", this.firstChild);
trace(CustomActions.list());
};
my_xml.load("dogclass.xml");
open nu notepad en plak vervolgens deze tekst erin
<?xml version="1.0"?>
<customactions>
<actionspanel>
<folder version="7" id="DogClass" index="true" name="Dog" tiptext="Dog Class">
<string version="7" id="getFleas" name="getFleas" tiptext="gets number of fleas" text=".getFleas(% fleas %)" />
</folder>
</actionspanel>
<colorsyntax>
<identifier text=".getFleas" />
</colorsyntax>
<codehints>
<typeinfo pattern=" _dog" object="Dog"/>
</codehints>
</customactions>
sla het op als DogClass.xml
in dezelfde directory als je fla
test je fla nu en als het goed is lees je in je output
true
ga nu terug naar flash en je hebt een custom action bij genaamd
Dog met als sub
getFleas
was weer aan het rondneuzen en dit keer in help van flash 8.
Ik heb een hele leuke functie ontdekt waarmee jezelf custom actions kan toevoegen aan je actions panel.
zet in je eerste frame
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
trace(success);
CustomActions.install("dogclass", this.firstChild);
trace(CustomActions.list());
};
my_xml.load("dogclass.xml");
open nu notepad en plak vervolgens deze tekst erin
<?xml version="1.0"?>
<customactions>
<actionspanel>
<folder version="7" id="DogClass" index="true" name="Dog" tiptext="Dog Class">
<string version="7" id="getFleas" name="getFleas" tiptext="gets number of fleas" text=".getFleas(% fleas %)" />
</folder>
</actionspanel>
<colorsyntax>
<identifier text=".getFleas" />
</colorsyntax>
<codehints>
<typeinfo pattern=" _dog" object="Dog"/>
</codehints>
</customactions>
sla het op als DogClass.xml
in dezelfde directory als je fla
test je fla nu en als het goed is lees je in je output
true
ga nu terug naar flash en je hebt een custom action bij genaamd
Dog met als sub
getFleas