A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Quick: Can a jpeg be moved out of one MC to another one?

  1. #1
    Dogs Die In Hot Cars
    Join Date
    Jun 2003
    Location
    Sheboygan, WI
    Posts
    109

    Quick: Can a jpeg be moved out of one MC to another one?

    I load a .jpeg into a movieClip and the mask runs. I need to beable to move the .jpeg to a seperate movieClip so I can load a new .jpeg into the original movieClip and run the mask again.

    Can this be done?
    The Dude Abides

  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    I'm sure there is a better way to do what you're asking than trying to move a bitmap around from one mc to the other. Explain what exactly you're wanting to accomplish and maybe we can find a better way.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  3. #3
    Dogs Die In Hot Cars
    Join Date
    Jun 2003
    Location
    Sheboygan, WI
    Posts
    109
    I have a multiple .jpegs loading into a MC one after another with a time delay and an entry masking transition. I need to move the .jpeg to a lower MC so it doesnt disaper when the next image transitions in.
    The Dude Abides

  4. #4
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Instead of loading the all jpg into the same mc and fading you need to load each jpg into a separate mc and apply the transition. Just load one below the other and fade(or whatever the transition) out on top. When you get to the end use swapDepths or some other means of getting them on top of each other again and do your process again.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  5. #5
    Dogs Die In Hot Cars
    Join Date
    Jun 2003
    Location
    Sheboygan, WI
    Posts
    109
    Then I guess my question would have to be: how do I actionscript a mask to work on a specific movieClip.

    ie. mask_MC.mask("container"+k);
    The Dude Abides

  6. #6
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    look into setMask. Make a movie clip to be used as the mask and then use

    isMaskMc.setMask("maskedMc");
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  7. #7
    Dogs Die In Hot Cars
    Join Date
    Jun 2003
    Location
    Sheboygan, WI
    Posts
    109
    I will monkey around with it in the morning. Thank you for your help
    The Dude Abides

  8. #8
    Dogs Die In Hot Cars
    Join Date
    Jun 2003
    Location
    Sheboygan, WI
    Posts
    109
    I got it to work.

    just the opposite of what you thought but close:

    maskedMc.setMask("MaskMc");

    Here is my working code as of now:

    _global.k = 1;
    function nextPic() {
    clearInterval(setTime1);
    trace(">> k = " + k);
    var loadListener:Object = new Object();

    loadListener.onLoadComplete = function(target_mc:MovieClip):Void {
    trace(">> loadListener.onLoadComplete()");
    target_mc.setMask(_root.picMask);
    _root.picMask.gotoAndPlay(2);
    if (_root.picMask._currentframe = _root.picMask._totalframes) {
    setTime1 = setInterval(nextPic,5000);
    }else if (k > 11) {
    clearInterval(setTime);
    }
    }
    loadListener.onLoadInit = function(target_mc:MovieClip):Void {
    trace(">> loadListener.onLoadInit()");
    }
    if (k < 12) {
    var container:MovieClip = empty.createEmptyMovieClip("container" + k, k);
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(loadListener);
    mcLoader.loadClip("http://www.address/madeup/" + k + ".jpg", "empty.container" + k);
    k++
    clearInterval(setTime);
    }

    }
    The Dude Abides

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