Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,008
    Thanks
    59
    Thanked 10 Times in 10 Posts

    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

    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 10:44 AM.


  • #2
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,008
    Thanks
    59
    Thanked 10 Times in 10 Posts
    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);



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •