A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: how to RotationY a loaded jpeg

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    16

    how to RotationY a loaded jpeg

    I am trying to apply rotationY/X/Z to an externally loaded image. The problem is that when I rotate the image in '3D', it does not appear. When I apply normal rotation, the image does appear. I have verified that the jpg is loaded, just does not display after rotationY/X/Z.

    The code below are snippets of my attempts.

    PHP Code:
    //LOAD IMAGE
    public function load_img():void
    {
        
    img_loader.contentLoaderInfo.addEventListener(Event.COMPLETEimg_loaded);
        
    img_loader.load(new URLRequest('http://farm6.static.flickr.com/5011/5475723440_a2e3e5373e.jpg'));

    PHP Code:
    public function img_loaded(e:Event):void 
    {
        var 
    pic:MovieClip = new MovieClip();
        
    pic.addChild(img_loader);
        
    addChild(pic);
        
    pic.rotationY 30;    //FAIL!

    This results in with no image displayed. I've also tried constructing a bitmap...

    PHP Code:
    public function img_loaded(e:Event):void 
    {    
        var 
    bit:Bitmap Bitmap(e.target.content);
        var 
    dat:Bitmap = new Bitmap(bit.bitmapData);
        
    addChild(dat);
        
    pic.rotationY 30;    //FAIL!

    Again if i use...
    PHP Code:
    pic.rotation 30
    ...it's all good.

    What's the deal!? Thanks,

  2. #2
    Junior Member
    Join Date
    Dec 2009
    Posts
    16

    resolved

    OK, the 3D rotation (rotationX/Y/Z) works on the server, but not locally via Test Movie. Any ideas?

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center