Bonjour,
je suis actuellement en train de suivre un tutorial expliquant comment développer une application AS2 en utilisant Eclipse, Ant et X-Ray pour debugger.
Voici le code utiliser:
et le fichier build.xml:Code:import com.mosesSupposes.fuse.ZigoEngine; import com.mosesSupposes.fuse.FuseItem; import com.mosesSupposes.fuse.PennerEasing; import com.mosesSupposes.fuse.Fuse; import com.blitzagency.xray.util.XrayLoader; import com.dynamicflash.utils.Delegate; import com.mosesSupposes.fuse.Shortcuts; import com.blitzagency.xray.util.MtascUtility; import com.blitzagency.xray.logger.*; class com.friendsofed.recipeviewer.RecipeViewer { private var baseClip:MovieClip; private var log:XrayLogger = new XrayLogger(); public static function main(base:MovieClip) : Void { var app:RecipeViewer = new RecipeViewer(base); } public function RecipeViewer(base:MovieClip) { baseClip = base; XrayLoader.addEventListener( XrayLoader.LOADCOMPLETE, this,"startApp"); XrayLoader.addEventListener( XrayLoader.LOADERROR, this,"startApp"); XrayLoader.loadConnector("xrayConnector_1.6.3.swf",base,true); } public function startApp() : Void { log.debug("this is a log message using log.debug()"); trace("this is a log message using trace()"); ZigoEngine.simpleSetup(Shortcuts,FuseItem,PennerEasing); var tf:TextField = baseClip.createTextField("testField",1,50,10,200,200); tf.text = "Hello World."; var f:Fuse = new Fuse(); f.push({target:tf, start_y:1000, y:0, duration:6,ease:"easeOutBounce"}); f.start(); } }
Lorsque je lance le programme, voici ce qu'il me ressort:Code HTML:<project name="RecipeViewer"> <taskdef name="mtasc" classname="org.as2lib.ant.Mtasc" /> <property name="mtasc" location="C:/FlashTools/mtasc-1.14/mtasc" /> <property name="deploy.dir" location="C:" /> <property name="lib.dir" location="../lib" /> <property name="src.dir" location="src" /> <target name="build"> <mkdir dir="builds" /> <mtasc mtasc="${mtasc}" version="8" main="true" header="800:600:30" src="com/friendsofed/recipeviewer/RecipeViewer.as" classpath="${src.dir} ; ${lib.dir}" swf="builds/RecipeViewer.swf" /> </target> <target name="buildAndCopy" depends="build"> <mkdir dir="${deploy.dir}/recipe_viewer" /> <copy todir="${deploy.dir}/recipe_viewer" > <fileset dir="builds" /> </copy> </target> </project>
Ce que je crois comprendre, c'est que je n'ai pas réussi à suivre complètement les indications. Notemment, celle-ci:Code:Buildfile: C:\Eclipse\Recette\recipe-viewer\build.xml build: [mtasc] Compiling 1 source file. [mtasc] C:\FlashTools\mtasc-1.14\mtasc -swf C:\Eclipse\Recette\recipe-viewer\builds\RecipeViewer.swf -header 800:600:30 -version 8 -cp C:\Eclipse\Recette\recipe-viewer\src -cp C:\Eclipse\Recette\lib -main com\friendsofed\recipeviewer\RecipeViewer.as [mtasc] C:\Eclipse\Recette\recipe-viewer\src/com/friendsofed/recipeviewer/RecipeViewer.as:14: characters 8-15 : type error class not found : XrayLogger BUILD FAILED C:\Eclipse\Recette\recipe-viewer\build.xml:15: Compile error! Total time: 656 milliseconds
Je ne parviens pas à trouver l'onglet: "Trace Function field" dont ils parlent dans ce tutorial.If you’ve configured the execute connection, you already have some of the logger connection functionality
enabled. You can create a log variable of type XrayLogger in your class:
private var log:XrayLogger = new XrayLogger();
Then you can use the debug(), warn(), and so on, methods to display debug information. The other
mechanism of logging requires you to change an MTASC compile option. To set that up, follow these
steps:
1. In Eclipse, right-click your project, and select Properties.
2. Select the AS2 Builder option on the left.
3. Select the RecipeViewer builder from the grid, and click the Edit button.
4. In the Trace Function field, enter com.blitzagency.xray.util.Mtas cUtility.trace.
5. Click the OK button to accept your change.
Est-ce que quelqu'un aurait une idée à ce propos, s'il vous plait?
Merci d'avance et à bientôt,
Etienne.
-----