get BitmapData's height & width


/ Published in: ActionScript 3
Save to your folder(s)

如果在库里做了图片的链接,那么实例化后,可以给任意的宽和高参数,都会得到图片原始的宽和高


Copy this code and paste it in your HTML
  1. var img = new Logo(0,0);
  2. trace(img.height);//40;
  3. trace(img.width);//100

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.