[Papervision3D] What am I doing wrong?

Pete Hobson pete at 99lives.co.uk
Wed Jan 10 11:37:13 EST 2007


Id better get it correct then.

	  [Embed(source="/assets/world.png")]	  	
		var WorldTexture:Class;	
		var bm:BitMap = new WorldTexture();
		var material :BitmapAssetMaterial = new BitmapAssetMaterial 
(bm.bitmapData);



On 10 Jan 2007, at 17:11, John Grden wrote:

> I've also started a PV3D page on my blog where I'll throw out  
> samples and code etc:
>
> http://www.rockonflash.com/blog/?page_id=32
>
> I'm adding Pete's reply at as well ;)
>
> On 1/10/07, Pete Hobson <pete at 99lives.co.uk> wrote:
> The demo references a bitmap texture in the FLA library, if your  
> using FD you dont have the lib, so i just use the embed sytax of AS3
>
> 	   [Embed(source= "/assets/world.png")]
> 	   public var WorldTexture:Class;	
>
> 		var material :BitmapAssetMaterial = new BitmapAssetMaterial(new  
> WorldTexture());
>
>
> On 10 Jan 2007, at 16:32, Pelle Christensen wrote:
>
>> The Main.as from HelloAse has been changed in one place  Line 61
>>
>>   //var material :BitmapAssetMaterial = new BitmapAssetMaterial 
>> ( "Bitmap" );
>>
>>         //var material :BitmapAssetMaterial = new  
>> BitmapAssetMaterial("c:/world.png");
>>
>> I've tried both relative and absolute paths, but still get the  
>> same error.
>>
>> I suscpect that, my understanding of how to handle the example  
>> files is somewhat faulty, and building projects in FlashDevelop is  
>> also new to me.
>>
>> /Pelle
>>
>> 'scene' will be scoped to the default namespace; Main internal. It  
>> will not be visible outside of this package.
>>
>> On 1/10/07, John Grden <neoriley at gmail.com> wrote:
>> can you post the code for us to see?
>>
>> On 1/10/07, Pelle Christensen < pelle.christensen at gmail.com> wrote:
>> Hi
>>
>> My name is Pelle, and I've been on the mailinglist for about a week.
>>
>> I have picked up the files from the repository and have tried to  
>> build the examples, but i get the following error (HelloAse example)
>>
>> ReferenceError: Error #1065: Variable png is not defined.
>>     at global/flash.utils::getDefinitionByName()
>>     at org.papervision3d.materials::BitmapAssetMaterial/ 
>> org.papervision3d.materials:BitmapAssetMaterial::createBitmap ()
>>     at org.papervision3d.materials::BitmapMaterial/set texture()
>>     at org.papervision3d.materials::BitmapMaterial$iinit ()
>>     at org.papervision3d.materials::BitmapAssetMaterial$iinit()
>>     at Main/::init3D()
>>     at Main$iinit()
>>
>> I've tried to put the image in the same folder, and even supplied  
>> an absolute path, but it dosen't help.
>>
>> Ps: Using flashdevelop with a setup for AS3
>>
>> Can anybody help?
>>
>> -- 
>> Med venlig hilsen / Best regards
>> Pelle Klit Christensen
>>
>> Phone (+045) 26 88 11 89
>> www.gamecraft.dk
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>>
>>
>>
>> -- 
>> [  JPG  ]
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>>
>>
>>
>> -- 
>> Med venlig hilsen / Best regards
>> Pelle Klit Christensen
>>
>> Phone (+045) 26 88 11 89
>> www.gamecraft.dk
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
>
>
> -- 
> [  JPG  ]
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Pete Hobson
pete at 99lives.co.uk
+44 208 123 6974



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070110/7393f775/attachment-0001.htm


More information about the Papervision3D mailing list