Results 1 to 3 of 3

Thread: Load External Images Into A Mask

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Load External Images Into A Mask

    I have 6 frame labels on my stage and on each one I have a mask animation, it's the same animation but on each frame label loads a different image, basicaly the image just fade's into the mask. I was hoping to try and do this with actionscript, just not sure how. Would also like to load the images externally too if possible... Anyone have any ideas?

  2. #2
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so i am able to lad an image from a folder no problem and have it fade in, but can i make it fade into an mc which contains a mask? this is what i've got so far

    Code:
    var myNewClip = this.createEmptyMovieClip("mclsub", this.getNextHighestDepth());
    var myNewLoader = new MovieClipLoader();
    var myNewListener = new Object();
    var myNewTest = "images" + 2 + ".jpg";
    
    myNewListener.onLoadInit = function (mclsub) { // Create fade in function
    trace("load init");
    mclsub._alpha=0; // Make mc 'mcl' _alpha 0
    mclsub.onEnterFrame=function(){ // Create new function
    mclsub._alpha +=15; // Speed 15
     
    if(mclsub._alpha >=100){
    delete mclsub.onEnterFrame;
    }
    }
    };
    
    Stage.addListener(myNewListener);
    myNewLoader.addListener(myNewListener);
    myNewLoader.loadClip(myNewTest,myNewClip);

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Load the images into a blank MC BEHIND the mask (lower layer etc) You can do this externally (XML for example)

    Use the AS to load the image, use the AS to tween your mask, start over at each frame label.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

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