[haXe] Graphics and flash9

Gilles Maire Gilles.Maire at ungi.net
Thu Apr 5 18:01:53 CEST 2007


Hi I solved my problem about params with the piece of code
   
var params :  Dynamic<String> =flash.Lib.current.loaderInfo.parameters ;	
	if (  params.URL == null ) {Error ("Not any file do load") ;} else { url = 
params.URL ;} 

I can play sound  with 

 var context =  new flash.media.SoundLoaderContext(5, true);
	 var urlreq= new flash.net.URLRequest (url);
	 var sound = new flash.media.Sound(urlreq,context); 
	 trace (url);
         sound.play(1,1);

But I can't make graphics by 

var clip = new flash.display.Graphics();
	
	clip.beginFill(0xFF0000);
        clip.moveTo(50,50);
        clip.lineTo(100,50);
        clip.lineTo(100,100);
        clip.lineTo(50,100);
        clip.endFill();

Any idea ? 

I am always newby in haxe and flash... but I progress 
-- 
Gilles Maire
/// UNGI \\\
http://www.ungi.net



More information about the Haxe mailing list