Bonjour,

Je fais actuellement un stage à l'INRIA et mon travail est de développer une nouvelle présentation flash de l'application existante. Pour des réseaux de développement, j'utilise la librairie The D.eval API et je rencontre un problème lors de l'évaluation de mon code actionscript. Voyez plutôt :

Voici l'extrait simplifier du code mxml qui sera ensuite compilé :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="utf-8"?>
 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" layout="vertical" >
     <mx:Script>
     <![CDATA[ 
 
     import r1.deval.D;
 
     public function init():void {
     D.importClass(Label);
     D.eval("new Label();");
     }
 
     ]]>
     </mx:Script>
</mx:Application>
L'appel de "D.importClass(Label);" ne fonctionne pas. Le message d'erreur suivant survient quand j'exécute mon programme (.SWF) :

Runtime Error: msg.rt.no.class [line:1]
at r1.deval.rt::CallExpr/getAny()
at r1.deval.rt::ExprStmt/exec()
at r1.deval.rt::Block/exec()
at r1.deval.rt::Block/run()
at r1.deval.rt::Env$/run()
at r1.deval::D$/eval()
at test/init()
at test/___test_Application1_creationComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()
A noter que si j'écris "D.eval("new String();");" cela fonctionne (surement que la classe String est déjà connu de D).

Auriez-vous un idée pour résoudre ce problème ? Merci d'avance