A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Action script question Prototype and movieLoader

Threaded View

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Action script question Prototype and movieLoader

    What am I doing wrong here. This is pulled from a test for a larger project, here I have a movieclip mc1 with child movieclip called canvas to load an image into. So far so good. Now using the movieLoader I want when loadComplete to scale the clip mc1 down sort of a thumbnail representation of the image. Plan to add loading prograss bar next but When I call a prototype function from a movie that has been loaded this way it doesn't seem to work.
    code:

    movieClip.prototype.scale=function(amt){
    this._xscale=amt;
    this._yscale=amt;
    }
    movieClip.prototype.fadeDown=function(){
    this.onEnterFrame=function(){
    while (this._alpha>0){
    this._alpha-=1;
    }//end while
    }//end enter frame
    }//end

    mcLoader = new MovieClipLoader();
    listener = new Object();

    listener.onLoadComplete=function(target){
    target.scale(50)
    target._parent._rotation=5
    target._parent.fadeDown()


    }
    mc2.fadeDown;
    mcLoader.addListener(listener);
    mcLoader.loadClip("galleries/gallery1/balloons.jpg", mc1.canvas);

    Last edited by blanius; 08-18-2006 at 09:14 PM. Reason: forgot to include code

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