<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How to use images in ActionScript 3 with FlashDevelop (and some other AS3 tips)</title>
	<atom:link href="http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/</link>
	<description>multimedia webapplication thoughts and experiments</description>
	<lastBuildDate>Fri, 17 Jun 2011 12:17:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Peter Backx</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-2663</link>
		<dc:creator>Peter Backx</dc:creator>
		<pubDate>Fri, 10 Dec 2010 08:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-2663</guid>
		<description>I don&#039;t know too much about Flex, but it looks like you&#039;re missing a &quot;source&quot; parameter. The Adobe docs have a lot more information that should get you going: http://livedocs.adobe.com/flex/3/html/help.html?content=embed_3.html
Hope this helps, Peter</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know too much about Flex, but it looks like you&#8217;re missing a &#8220;source&#8221; parameter. The Adobe docs have a lot more information that should get you going: <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=embed_3.html" rel="nofollow">http://livedocs.adobe.com/flex/3/html/help.html?content=embed_3.html</a><br />
Hope this helps, Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wit3k</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-2662</link>
		<dc:creator>wit3k</dc:creator>
		<pubDate>Thu, 09 Dec 2010 09:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-2662</guid>
		<description>Hi.
Im using such construction in MXML



Thats copypasted from flexbuilder - now Im switching to FlashDevelop and I have a problem because using @Embed doesnt let build finish succesfully (and it even doesnt return any bug arrors - just informs me that &quot;Build failed&quot;).

Do you have some idea on it?</description>
		<content:encoded><![CDATA[<p>Hi.<br />
Im using such construction in MXML</p>
<p>Thats copypasted from flexbuilder &#8211; now Im switching to FlashDevelop and I have a problem because using @Embed doesnt let build finish succesfully (and it even doesnt return any bug arrors &#8211; just informs me that &#8220;Build failed&#8221;).</p>
<p>Do you have some idea on it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mefoz</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-1240</link>
		<dc:creator>Mefoz</dc:creator>
		<pubDate>Tue, 06 Oct 2009 04:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-1240</guid>
		<description>[Embed(source=&#039;library/crosshair.png&#039;)]&lt;br&gt;&lt;br&gt;See that? It&#039;s  &#039;library/crosshair.png&#039;&lt;br&gt;It&#039;s a single.. Flying thingy.  It has to be double.&lt;br&gt;&lt;br&gt;	[Embed(source=&quot;library/crosshair.png&quot;)]</description>
		<content:encoded><![CDATA[<p>[Embed(source=&#39;library/crosshair.png&#39;)]</p>
<p>See that? It&#39;s  &#39;library/crosshair.png&#39;<br />It&#39;s a single.. Flying thingy.  It has to be double.</p>
<p>	[Embed(source="library/crosshair.png")]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Secret of Reading Mouse Input in Flash Sandy3D - part 1 - Streamhead</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-912</link>
		<dc:creator>The Secret of Reading Mouse Input in Flash Sandy3D - part 1 - Streamhead</dc:creator>
		<pubDate>Sun, 23 Nov 2008 18:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-912</guid>
		<description>[...] I&#8217;ve shown you a few random Flash tidbits. The ultimate goal is to create a small arcade action game in a 3 dimensions. I&#8217;m taking this [...]</description>
		<content:encoded><![CDATA[<p>[...] I&#8217;ve shown you a few random Flash tidbits. The ultimate goal is to create a small arcade action game in a 3 dimensions. I&#8217;m taking this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Kir</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-658</link>
		<dc:creator>Benjamin Kir</dc:creator>
		<pubDate>Sat, 26 Jul 2008 01:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-658</guid>
		<description>Do you know why it doesnt work with an embedded image and and ambedded ASE model together.
I got it working with an image only. great. And i got it working with an ASE model only. great. But when I try to coat an embedded model with a jpg it doesnt work. Can you please help? Code is hereunder:

package
{
   import flash.display.Bitmap;
   import flash.display.Sprite;
   import flash.display.BitmapData;
   import flash.display.Bitmap;
 
   import flash.events.*;
   import flash.ui.*;
   import sandy.core.Scene3D;
   import sandy.core.data.*;
   import sandy.core.scenegraph.*;
   import sandy.materials.*;
   import sandy.materials.attributes.*;
   import sandy.primitive.*;
   import sandy.parser.*;
   import sandy.util.*;
   import sandy.events.*;

   public class Example009 extends Sprite 
   {
      private var scene:Scene3D;
	  private var camera:Camera3D;
	  private var box:Box;
	  private var sphere:Sphere;
	  private var app01:Appearance;
	  private var app02:Appearance;
	  //private var img:MyPalm = new MyPalm();
	  //USE ANY IMAGE:
	  [Embed(source=&#039;/PHOTOMODELLER/photomo1.jpg&#039;)] ///assets/palm.jpg&#039;)]
	  private var imgClass:Class;
	  private var img:Bitmap = new imgClass ();
	  private var bitmap:Bitmap = new Bitmap(img.bitmapData);
	  
	  [Embed( source=&quot;assets/teieraASE.ASE&quot;, mimeType=&quot;application/octet-stream&quot; )]
	  private var aseClass:Class;
	  
      public function Example009()
      { 
		 var parser1:IParser = Parser.create( new imgClass(), Parser.ASE, 1 ); //eksempel fRa 0.1 til 1 - størrelsen!
	  	 //parser1.standardAppearance = createAppearance( NONE );
		 //parser.addEventListener( ParserEvent.FAIL, onError );
	  	 parser1.addEventListener( ParserEvent.INIT, init );
	  	 parser1.parse();
	  }
		 
	  
	  // Create the scene graph based on the root Group of the scene
      private function init(p_eEvent:ParserEvent ):void
      {
	  
		 // We create the camera
		 camera = new Camera3D( 300, 300 );
		 camera.z = -400;
		 
		 // We create the &quot;group&quot; that is the tree of all the visible objects
         var root:Group = createScene(p_eEvent);
		 
		 // We create a Scene and we add the camera and the objects tree 
	     scene = new Scene3D( &quot;scene&quot;, this, camera, root );
		 
		 // Listen to the heart beat and render the scene
         addEventListener( Event.ENTER_FRAME, enterFrameHandler );
		 stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);      
      }

      // Create the scene graph based on the root Group of the scene
      private function createScene(p_eEvent):Group
      {
         // Create the root Group
         var g:Group = new Group(p_eEvent.group);
		 
         // Create a cube so we have something to show
         box = new Box( &quot;box&quot;,80,80,80,&quot;tri&quot;);
		 
		 box.rotateX = 30;
		 box.rotateY = 30;
		 box.x = -80;
		 
		 
		 ////////////////////////////////////////////
		 //sphere = new Sphere(&quot;sphere&quot;, 50,10,10);
		 //sphere.x = 80;
		 
		 //THE PROBLEM IS HERE:
		 sphere  = g.children[0];
		 sphere.x = 0;
		 /////////////////////////////////////////////
		 
		 // we define the bitmap Material
		  var materialAttr01:MaterialAttributes = new MaterialAttributes( new LightAttributes( true, 0.1) );
	     var material01:Material = new ColorMaterial( 0xFFCC33, 1, materialAttr01 );
	     material01.lightingEnable = true;
	     app01 = new Appearance( material01 );
		 
	     var material02:BitmapMaterial = new BitmapMaterial( bitmap.bitmapData );
		 material02.lightingEnable = true;
	     app02 = new Appearance( material02 );

	     box.appearance = app02;
		 sphere.appearance = app02;
	
		  // We need to add the cube to the group
		  g.addChild( box );
		  g.addChild( sphere );
          
		  return g;
      }

      // The Event.ENTER_FRAME event handler tells the Scene3D to render
      private function enterFrameHandler( event : Event ) : void
      {
         box.tilt += 1;
		 box.pan += 1;
		 sphere.pan += 1
		 scene.render();
      }
	  // The KeyboardEvent.KEY_DOWN event handler manage key pressed by user
      private function keyPressed(event:KeyboardEvent):void
      {
         switch(event.keyCode) {
				case Keyboard.UP:
					box.aPolygons[0].appearance = app02;
					box.aPolygons[1].appearance = app02;
					box.aPolygons[2].appearance = app02;
					box.aPolygons[3].appearance = app02;
					break;
				case Keyboard.DOWN:
					box.appearance = app01;
					break;
				case Keyboard.RIGHT:
					box.aPolygons[4].appearance = app02;
					box.aPolygons[5].appearance = app02;
					box.aPolygons[6].appearance = app02;
					box.aPolygons[7].appearance = app02;
					break;
				case Keyboard.LEFT:
					box.aPolygons[8].appearance = app02;
					box.aPolygons[9].appearance = app02;
					box.aPolygons[10].appearance = app02;
					box.aPolygons[11].appearance = app02;
					break;
			}
      }
   }
}</description>
		<content:encoded><![CDATA[<p>Do you know why it doesnt work with an embedded image and and ambedded ASE model together.<br />
I got it working with an image only. great. And i got it working with an ASE model only. great. But when I try to coat an embedded model with a jpg it doesnt work. Can you please help? Code is hereunder:</p>
<p>package<br />
{<br />
   import flash.display.Bitmap;<br />
   import flash.display.Sprite;<br />
   import flash.display.BitmapData;<br />
   import flash.display.Bitmap;</p>
<p>   import flash.events.*;<br />
   import flash.ui.*;<br />
   import sandy.core.Scene3D;<br />
   import sandy.core.data.*;<br />
   import sandy.core.scenegraph.*;<br />
   import sandy.materials.*;<br />
   import sandy.materials.attributes.*;<br />
   import sandy.primitive.*;<br />
   import sandy.parser.*;<br />
   import sandy.util.*;<br />
   import sandy.events.*;</p>
<p>   public class Example009 extends Sprite<br />
   {<br />
      private var scene:Scene3D;<br />
	  private var camera:Camera3D;<br />
	  private var box:Box;<br />
	  private var sphere:Sphere;<br />
	  private var app01:Appearance;<br />
	  private var app02:Appearance;<br />
	  //private var img:MyPalm = new MyPalm();<br />
	  //USE ANY IMAGE:<br />
	  [Embed(source='/PHOTOMODELLER/photomo1.jpg')] ///assets/palm.jpg&#8217;)]<br />
	  private var imgClass:Class;<br />
	  private var img:Bitmap = new imgClass ();<br />
	  private var bitmap:Bitmap = new Bitmap(img.bitmapData);</p>
<p>	  [Embed( source="assets/teieraASE.ASE", mimeType="application/octet-stream" )]<br />
	  private var aseClass:Class;</p>
<p>      public function Example009()<br />
      {<br />
		 var parser1:IParser = Parser.create( new imgClass(), Parser.ASE, 1 ); //eksempel fRa 0.1 til 1 &#8211; størrelsen!<br />
	  	 //parser1.standardAppearance = createAppearance( NONE );<br />
		 //parser.addEventListener( ParserEvent.FAIL, onError );<br />
	  	 parser1.addEventListener( ParserEvent.INIT, init );<br />
	  	 parser1.parse();<br />
	  }</p>
<p>	  // Create the scene graph based on the root Group of the scene<br />
      private function init(p_eEvent:ParserEvent ):void<br />
      {</p>
<p>		 // We create the camera<br />
		 camera = new Camera3D( 300, 300 );<br />
		 camera.z = -400;</p>
<p>		 // We create the &#8220;group&#8221; that is the tree of all the visible objects<br />
         var root:Group = createScene(p_eEvent);</p>
<p>		 // We create a Scene and we add the camera and the objects tree<br />
	     scene = new Scene3D( &#8220;scene&#8221;, this, camera, root );</p>
<p>		 // Listen to the heart beat and render the scene<br />
         addEventListener( Event.ENTER_FRAME, enterFrameHandler );<br />
		 stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);<br />
      }</p>
<p>      // Create the scene graph based on the root Group of the scene<br />
      private function createScene(p_eEvent):Group<br />
      {<br />
         // Create the root Group<br />
         var g:Group = new Group(p_eEvent.group);</p>
<p>         // Create a cube so we have something to show<br />
         box = new Box( &#8220;box&#8221;,80,80,80,&#8221;tri&#8221;);</p>
<p>		 box.rotateX = 30;<br />
		 box.rotateY = 30;<br />
		 box.x = -80;</p>
<p>		 ////////////////////////////////////////////<br />
		 //sphere = new Sphere(&#8220;sphere&#8221;, 50,10,10);<br />
		 //sphere.x = 80;</p>
<p>		 //THE PROBLEM IS HERE:<br />
		 sphere  = g.children[0];<br />
		 sphere.x = 0;<br />
		 /////////////////////////////////////////////</p>
<p>		 // we define the bitmap Material<br />
		  var materialAttr01:MaterialAttributes = new MaterialAttributes( new LightAttributes( true, 0.1) );<br />
	     var material01:Material = new ColorMaterial( 0xFFCC33, 1, materialAttr01 );<br />
	     material01.lightingEnable = true;<br />
	     app01 = new Appearance( material01 );</p>
<p>	     var material02:BitmapMaterial = new BitmapMaterial( bitmap.bitmapData );<br />
		 material02.lightingEnable = true;<br />
	     app02 = new Appearance( material02 );</p>
<p>	     box.appearance = app02;<br />
		 sphere.appearance = app02;</p>
<p>		  // We need to add the cube to the group<br />
		  g.addChild( box );<br />
		  g.addChild( sphere );</p>
<p>		  return g;<br />
      }</p>
<p>      // The Event.ENTER_FRAME event handler tells the Scene3D to render<br />
      private function enterFrameHandler( event : Event ) : void<br />
      {<br />
         box.tilt += 1;<br />
		 box.pan += 1;<br />
		 sphere.pan += 1<br />
		 scene.render();<br />
      }<br />
	  // The KeyboardEvent.KEY_DOWN event handler manage key pressed by user<br />
      private function keyPressed(event:KeyboardEvent):void<br />
      {<br />
         switch(event.keyCode) {<br />
				case Keyboard.UP:<br />
					box.aPolygons[0].appearance = app02;<br />
					box.aPolygons[1].appearance = app02;<br />
					box.aPolygons[2].appearance = app02;<br />
					box.aPolygons[3].appearance = app02;<br />
					break;<br />
				case Keyboard.DOWN:<br />
					box.appearance = app01;<br />
					break;<br />
				case Keyboard.RIGHT:<br />
					box.aPolygons[4].appearance = app02;<br />
					box.aPolygons[5].appearance = app02;<br />
					box.aPolygons[6].appearance = app02;<br />
					box.aPolygons[7].appearance = app02;<br />
					break;<br />
				case Keyboard.LEFT:<br />
					box.aPolygons[8].appearance = app02;<br />
					box.aPolygons[9].appearance = app02;<br />
					box.aPolygons[10].appearance = app02;<br />
					box.aPolygons[11].appearance = app02;<br />
					break;<br />
			}<br />
      }<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Kir</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-1528</link>
		<dc:creator>Benjamin Kir</dc:creator>
		<pubDate>Sat, 26 Jul 2008 01:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-1528</guid>
		<description>Do you know why it doesnt work with an embedded image and and ambedded ASE model together.
I got it working with an image only. great. And i got it working with an ASE model only. great. But when I try to coat an embedded model with a jpg it doesnt work. Can you please help? Code is hereunder:

package
{
   import flash.display.Bitmap;
   import flash.display.Sprite;
   import flash.display.BitmapData;
   import flash.display.Bitmap;
 
   import flash.events.*;
   import flash.ui.*;
   import sandy.core.Scene3D;
   import sandy.core.data.*;
   import sandy.core.scenegraph.*;
   import sandy.materials.*;
   import sandy.materials.attributes.*;
   import sandy.primitive.*;
   import sandy.parser.*;
   import sandy.util.*;
   import sandy.events.*;

   public class Example009 extends Sprite 
   {
      private var scene:Scene3D;
	  private var camera:Camera3D;
	  private var box:Box;
	  private var sphere:Sphere;
	  private var app01:Appearance;
	  private var app02:Appearance;
	  //private var img:MyPalm = new MyPalm();
	  //USE ANY IMAGE:
	  [Embed(source=&#039;/PHOTOMODELLER/photomo1.jpg&#039;)] ///assets/palm.jpg&#039;)]
	  private var imgClass:Class;
	  private var img:Bitmap = new imgClass ();
	  private var bitmap:Bitmap = new Bitmap(img.bitmapData);
	  
	  [Embed( source=&quot;assets/teieraASE.ASE&quot;, mimeType=&quot;application/octet-stream&quot; )]
	  private var aseClass:Class;
	  
      public function Example009()
      { 
		 var parser1:IParser = Parser.create( new imgClass(), Parser.ASE, 1 ); //eksempel fRa 0.1 til 1 - størrelsen!
	  	 //parser1.standardAppearance = createAppearance( NONE );
		 //parser.addEventListener( ParserEvent.FAIL, onError );
	  	 parser1.addEventListener( ParserEvent.INIT, init );
	  	 parser1.parse();
	  }
		 
	  
	  // Create the scene graph based on the root Group of the scene
      private function init(p_eEvent:ParserEvent ):void
      {
	  
		 // We create the camera
		 camera = new Camera3D( 300, 300 );
		 camera.z = -400;
		 
		 // We create the &quot;group&quot; that is the tree of all the visible objects
         var root:Group = createScene(p_eEvent);
		 
		 // We create a Scene and we add the camera and the objects tree 
	     scene = new Scene3D( &quot;scene&quot;, this, camera, root );
		 
		 // Listen to the heart beat and render the scene
         addEventListener( Event.ENTER_FRAME, enterFrameHandler );
		 stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);      
      }

      // Create the scene graph based on the root Group of the scene
      private function createScene(p_eEvent):Group
      {
         // Create the root Group
         var g:Group = new Group(p_eEvent.group);
		 
         // Create a cube so we have something to show
         box = new Box( &quot;box&quot;,80,80,80,&quot;tri&quot;);
		 
		 box.rotateX = 30;
		 box.rotateY = 30;
		 box.x = -80;
		 
		 
		 ////////////////////////////////////////////
		 //sphere = new Sphere(&quot;sphere&quot;, 50,10,10);
		 //sphere.x = 80;
		 
		 //THE PROBLEM IS HERE:
		 sphere  = g.children[0];
		 sphere.x = 0;
		 /////////////////////////////////////////////
		 
		 // we define the bitmap Material
		  var materialAttr01:MaterialAttributes = new MaterialAttributes( new LightAttributes( true, 0.1) );
	     var material01:Material = new ColorMaterial( 0xFFCC33, 1, materialAttr01 );
	     material01.lightingEnable = true;
	     app01 = new Appearance( material01 );
		 
	     var material02:BitmapMaterial = new BitmapMaterial( bitmap.bitmapData );
		 material02.lightingEnable = true;
	     app02 = new Appearance( material02 );

	     box.appearance = app02;
		 sphere.appearance = app02;
	
		  // We need to add the cube to the group
		  g.addChild( box );
		  g.addChild( sphere );
          
		  return g;
      }

      // The Event.ENTER_FRAME event handler tells the Scene3D to render
      private function enterFrameHandler( event : Event ) : void
      {
         box.tilt += 1;
		 box.pan += 1;
		 sphere.pan += 1
		 scene.render();
      }
	  // The KeyboardEvent.KEY_DOWN event handler manage key pressed by user
      private function keyPressed(event:KeyboardEvent):void
      {
         switch(event.keyCode) {
				case Keyboard.UP:
					box.aPolygons[0].appearance = app02;
					box.aPolygons[1].appearance = app02;
					box.aPolygons[2].appearance = app02;
					box.aPolygons[3].appearance = app02;
					break;
				case Keyboard.DOWN:
					box.appearance = app01;
					break;
				case Keyboard.RIGHT:
					box.aPolygons[4].appearance = app02;
					box.aPolygons[5].appearance = app02;
					box.aPolygons[6].appearance = app02;
					box.aPolygons[7].appearance = app02;
					break;
				case Keyboard.LEFT:
					box.aPolygons[8].appearance = app02;
					box.aPolygons[9].appearance = app02;
					box.aPolygons[10].appearance = app02;
					box.aPolygons[11].appearance = app02;
					break;
			}
      }
   }
}</description>
		<content:encoded><![CDATA[<p>Do you know why it doesnt work with an embedded image and and ambedded ASE model together.<br />
I got it working with an image only. great. And i got it working with an ASE model only. great. But when I try to coat an embedded model with a jpg it doesnt work. Can you please help? Code is hereunder:</p>
<p>package<br />
{<br />
   import flash.display.Bitmap;<br />
   import flash.display.Sprite;<br />
   import flash.display.BitmapData;<br />
   import flash.display.Bitmap;</p>
<p>   import flash.events.*;<br />
   import flash.ui.*;<br />
   import sandy.core.Scene3D;<br />
   import sandy.core.data.*;<br />
   import sandy.core.scenegraph.*;<br />
   import sandy.materials.*;<br />
   import sandy.materials.attributes.*;<br />
   import sandy.primitive.*;<br />
   import sandy.parser.*;<br />
   import sandy.util.*;<br />
   import sandy.events.*;</p>
<p>   public class Example009 extends Sprite<br />
   {<br />
      private var scene:Scene3D;<br />
	  private var camera:Camera3D;<br />
	  private var box:Box;<br />
	  private var sphere:Sphere;<br />
	  private var app01:Appearance;<br />
	  private var app02:Appearance;<br />
	  //private var img:MyPalm = new MyPalm();<br />
	  //USE ANY IMAGE:<br />
	  [Embed(source='/PHOTOMODELLER/photomo1.jpg')] ///assets/palm.jpg&#8217;)]<br />
	  private var imgClass:Class;<br />
	  private var img:Bitmap = new imgClass ();<br />
	  private var bitmap:Bitmap = new Bitmap(img.bitmapData);</p>
<p>	  [Embed( source="assets/teieraASE.ASE", mimeType="application/octet-stream" )]<br />
	  private var aseClass:Class;</p>
<p>      public function Example009()<br />
      {<br />
		 var parser1:IParser = Parser.create( new imgClass(), Parser.ASE, 1 ); //eksempel fRa 0.1 til 1 &#8211; størrelsen!<br />
	  	 //parser1.standardAppearance = createAppearance( NONE );<br />
		 //parser.addEventListener( ParserEvent.FAIL, onError );<br />
	  	 parser1.addEventListener( ParserEvent.INIT, init );<br />
	  	 parser1.parse();<br />
	  }</p>
<p>	  // Create the scene graph based on the root Group of the scene<br />
      private function init(p_eEvent:ParserEvent ):void<br />
      {</p>
<p>		 // We create the camera<br />
		 camera = new Camera3D( 300, 300 );<br />
		 camera.z = -400;</p>
<p>		 // We create the &#8220;group&#8221; that is the tree of all the visible objects<br />
         var root:Group = createScene(p_eEvent);</p>
<p>		 // We create a Scene and we add the camera and the objects tree<br />
	     scene = new Scene3D( &#8220;scene&#8221;, this, camera, root );</p>
<p>		 // Listen to the heart beat and render the scene<br />
         addEventListener( Event.ENTER_FRAME, enterFrameHandler );<br />
		 stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);<br />
      }</p>
<p>      // Create the scene graph based on the root Group of the scene<br />
      private function createScene(p_eEvent):Group<br />
      {<br />
         // Create the root Group<br />
         var g:Group = new Group(p_eEvent.group);</p>
<p>         // Create a cube so we have something to show<br />
         box = new Box( &#8220;box&#8221;,80,80,80,&#8221;tri&#8221;);</p>
<p>		 box.rotateX = 30;<br />
		 box.rotateY = 30;<br />
		 box.x = -80;</p>
<p>		 ////////////////////////////////////////////<br />
		 //sphere = new Sphere(&#8220;sphere&#8221;, 50,10,10);<br />
		 //sphere.x = 80;</p>
<p>		 //THE PROBLEM IS HERE:<br />
		 sphere  = g.children[0];<br />
		 sphere.x = 0;<br />
		 /////////////////////////////////////////////</p>
<p>		 // we define the bitmap Material<br />
		  var materialAttr01:MaterialAttributes = new MaterialAttributes( new LightAttributes( true, 0.1) );<br />
	     var material01:Material = new ColorMaterial( 0xFFCC33, 1, materialAttr01 );<br />
	     material01.lightingEnable = true;<br />
	     app01 = new Appearance( material01 );</p>
<p>	     var material02:BitmapMaterial = new BitmapMaterial( bitmap.bitmapData );<br />
		 material02.lightingEnable = true;<br />
	     app02 = new Appearance( material02 );</p>
<p>	     box.appearance = app02;<br />
		 sphere.appearance = app02;</p>
<p>		  // We need to add the cube to the group<br />
		  g.addChild( box );<br />
		  g.addChild( sphere );</p>
<p>		  return g;<br />
      }</p>
<p>      // The Event.ENTER_FRAME event handler tells the Scene3D to render<br />
      private function enterFrameHandler( event : Event ) : void<br />
      {<br />
         box.tilt += 1;<br />
		 box.pan += 1;<br />
		 sphere.pan += 1<br />
		 scene.render();<br />
      }<br />
	  // The KeyboardEvent.KEY_DOWN event handler manage key pressed by user<br />
      private function keyPressed(event:KeyboardEvent):void<br />
      {<br />
         switch(event.keyCode) {<br />
				case Keyboard.UP:<br />
					box.aPolygons[0].appearance = app02;<br />
					box.aPolygons[1].appearance = app02;<br />
					box.aPolygons[2].appearance = app02;<br />
					box.aPolygons[3].appearance = app02;<br />
					break;<br />
				case Keyboard.DOWN:<br />
					box.appearance = app01;<br />
					break;<br />
				case Keyboard.RIGHT:<br />
					box.aPolygons[4].appearance = app02;<br />
					box.aPolygons[5].appearance = app02;<br />
					box.aPolygons[6].appearance = app02;<br />
					box.aPolygons[7].appearance = app02;<br />
					break;<br />
				case Keyboard.LEFT:<br />
					box.aPolygons[8].appearance = app02;<br />
					box.aPolygons[9].appearance = app02;<br />
					box.aPolygons[10].appearance = app02;<br />
					box.aPolygons[11].appearance = app02;<br />
					break;<br />
			}<br />
      }<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Streamhead &#187; Blog Archive &#187; Vector vs Bitmap side-by-side - SVG &#38; PNG in Flash</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-447</link>
		<dc:creator>Streamhead &#187; Blog Archive &#187; Vector vs Bitmap side-by-side - SVG &#38; PNG in Flash</dc:creator>
		<pubDate>Fri, 04 Jul 2008 08:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-447</guid>
		<description>[...] You will also need those two images in your library directory (see previous posts): [...]</description>
		<content:encoded><![CDATA[<p>[...] You will also need those two images in your library directory (see previous posts): [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Streamhead &#187; Blog Archive &#187; How to use vector graphics in FlashDevelop - SVG in Flash</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-439</link>
		<dc:creator>Streamhead &#187; Blog Archive &#187; How to use vector graphics in FlashDevelop - SVG in Flash</dc:creator>
		<pubDate>Fri, 27 Jun 2008 08:11:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-439</guid>
		<description>[...] my previous Flash post, I already touched on the subject of a major reason why you might still prefer the expensive Adobe [...]</description>
		<content:encoded><![CDATA[<p>[...] my previous Flash post, I already touched on the subject of a major reason why you might still prefer the expensive Adobe [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanneke</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-433</link>
		<dc:creator>Hanneke</dc:creator>
		<pubDate>Tue, 17 Jun 2008 10:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-433</guid>
		<description>Ah, finally a tutorial with source code that works &#039;out-of-the-box&#039; for me. Thanks for teaching me how to display images using only actionscript!!</description>
		<content:encoded><![CDATA[<p>Ah, finally a tutorial with source code that works &#8216;out-of-the-box&#8217; for me. Thanks for teaching me how to display images using only actionscript!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanneke</title>
		<link>http://www.streamhead.com/how-to-use-images-in-actionscript-3-with-flashdevelop-and-some-other-as3-tips/#comment-1527</link>
		<dc:creator>Hanneke</dc:creator>
		<pubDate>Tue, 17 Jun 2008 10:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.streamhead.com/?p=98#comment-1527</guid>
		<description>Ah, finally a tutorial with source code that works &#039;out-of-the-box&#039; for me. Thanks for teaching me how to display images using only actionscript!!</description>
		<content:encoded><![CDATA[<p>Ah, finally a tutorial with source code that works &#8216;out-of-the-box&#8217; for me. Thanks for teaching me how to display images using only actionscript!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 2.393 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-09 12:46:15 -->
<!-- Compression = gzip -->
