Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2008, 09:40 AM   PM User | #1
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
AS3 Multiple markers at this line: -1120: Access of undefined property logoBitmap

The following code
logoMaterial = new BitmapMaterial(logoBitmap.bitmapData, true); from the code

Code:
package  {
    import flash.display.Bitmap;
    
    import org.papervision3d.events.InteractiveScene3DEvent;
    import org.papervision3d.materials.BitmapFileMaterial;
    import org.papervision3d.materials.BitmapMaterial;
    import org.papervision3d.materials.utils.MaterialsList;
    import org.papervision3d.objects.primitives.Cube;
    public class mission3dcube extends PaperBase {
        
        
        
        [Embed(source="assets/logoNotrans.png")]
        public var logo:Class;
        
         var logoMaterial:BitmapMaterial;
            //standard way to grab bitmap from embedded image
            var logoBitmap:Bitmap = new logo() as Bitmap;
            logoMaterial = new BitmapMaterial(logoBitmap.bitmapData, true);
gives me an error in Flex IDE

Quote:
Multiple markers at this line: -1120: Access of undefined property logoBitmap. -1120: Access of
undefined property logoMaterial.
Any ideas how to fix?
__________________


Last edited by nikos101; 05-07-2008 at 09:44 AM..
nikos101 is offline   Reply With Quote
Old 05-07-2008, 10:51 AM   PM User | #2
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
I got round it by doing it this way

[Embed(source="assets/logoNotrans.png")]
public var logo:Class;
var logoBitmap:Bitmap = new logo();
var logoMaterial:BitmapMaterial = new BitmapMaterial( logoBitmap.bitmapData, true);
__________________

nikos101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:20 AM.


Advertisement
Log in to turn off these ads.