Gradually resize movie clip

Hello,
I am trying to make a site for myself and I would like to
make a movie clip which will be changed in size (scaled) when
specific buttons are pressed. I would like to make a gradual
transition from one size to the other using actionscript . I tried
to find a tutorial on this but nothing came up, can anyone give me
any advice on how to do this? Any information wil be very helpfull.
Thanks.

Use the tween class for example.
button_mc.onRelease = function(){
new mx.transitions.Tween(clip_mc, '_xscale',
mx.transitions.easing.Elastic.easeOut, 0, 100, 5, true);
lots more info in flash help. look up transition
manager

Similar Messages

  • How to resize movie clip dynamically

    how to resize movie clip sccording the stage size and width

    how to resize movie clip sccording the stage size and width

  • How can I get my movie clip to resize according to screen size?

    I have a movie clip (startMenu); inside it there are buttons, text, and graphics. This is a game I am making, and it will be played on different screen sizes of Android. This is the code I have so far:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT
    startMenu.addEventListener(Event.RESIZE, resizeLayout);
    function resizeLayout(e:Event):void
        setPosition();
    function setPosition():void
         startMenu.x = (stage.stageWidth - startMenu.width) / 2;
            startMenu.y = (stage.stageHeight - startMenu.height) /2;
    When I run it on different phones using debugging, it locks on the left hand corner, but does stretch out to fit the whole screen. What should I do?

    try changing
    stage.scaleMode = StageScaleMode.NO_SCALE;
    to
    stage.scaleMode = StageScaleMode.EXACT_FIT;
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScal eMode.html

  • Movie clip resize not working when image is loaded

    Hello,
    I'm having some strange luck in building an image slide
    show. I load the image paths into an array from an XML
    page and then step through the array elements w/ forward and
    back buttons.
    I have an empty image clip on the stage where I create an
    empty movie clip inside each time a new image is loaded. I load the
    image into the second movie clip like this:
    [code]
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader.unloadMovie();
    _root.picsPage_mc.mc_pic_loader.createEmptyMovieClip(
    'mc_individual_pic_loader', 1 );
    _root.load_movie_and_stop(
    _root.picsPage_mc.mc_pic_loader.mc_individual_pic_loader,
    _root.photo_array[_root.photo_index].image,
    _root.picsPage_mc.mc_pbar, 'regular_load');
    [/code]
    The load_movie_and_stop function is as follows:
    [code]
    function load_movie_and_stop( target_mc:MovieClip,
    movie_clip_to_load:String, p_bar:MovieClip, action:String )
    mc_loader._width = 0;
    mc_slider_bar.mc_drag_pan._x = 0;
    if( action != 'simple_load' )
    p_bar._visible = true;
    p_bar.bar._width = 0;
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function( target_mc )
    if( action != 'simple_load' && action !=
    'regular_load' ){ target_mc.stop(); }
    if( action == 'load_and_play' ){ target_mc.play(); }
    mclListener.onLoadInit = function( target_mc )
    _root.resize_movie_clip(target_mc, 160, 120, 250, 190);
    if( action == 'load_and_stop' ){ target_mc.stop(); }
    mclListener.onLoadProgress = function( target_mc )
    if( action != 'simple_load' )
    percentLoaded = Math.floor( (
    target_mc.getBytesLoaded()/target_mc.getBytesTotal() )*100);
    p_bar.bar._xscale = percentLoaded;
    p_bar.txt_percent = percentLoaded + "% loaded.";
    mclListener.onLoadComplete = function( target_mc ){
    p_bar._visible = false; }
    var my_mcl:MovieClipLoader = new MovieClipLoader();
    my_mcl.addListener(mclListener);
    my_mcl.loadClip( movie_clip_to_load, target_mc );
    }//___endFunc___
    [/code]
    After the image is loaded into the movie clip, I then resize
    the image to be a specific width.
    The image resizing is done w/ this function:
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number )
    orig_width = clip_loader_name._width;
    orig_height = clip_loader_name._height;
    aspect_ratio = orig_width / orig_height;
    if( (orig_width > max_width) || ( orig_height >
    max_height ) ) // If either dimension is too big...
    if( orig_width > orig_height ) // For wide images...
    new_width = max_height;
    new_height = new_width / aspect_ratio;
    else if( orig_width < orig_height )
    new_height = max_height;
    new_width = new_height * aspect_ratio;
    else if( orig_width == test_height )
    new_width = max_width;
    new_height = max_width;
    else { trace( "Error reading image size."); return false; }
    else { new_width = orig_width; new_height = orig_height; }
    clip_loader_name._width = Math.round(new_width);
    clip_loader_name._height = Math.round(new_height);
    [/code]
    Now, 98% of the time this works perfectly, but there is some
    certain times where the image resizing is completely ignored and
    the image gets loaded as it's normal size.
    Can anyone see why the image sizing get's ignored in some
    instance?
    Thanks for any help,
    Clem

    Found the solution that worked (used ._xscale and ._yscale
    instead of ._width and ._height
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number, center_offset:Number )
    if( (clip_loader_name._width > max_width) || (
    clip_loader_name._height > max_height ) ) // If either dimension
    is too big...
    if( clip_loader_name._width > max_width )
    _root.picsPage_mc.txt_test = "func if 1";
    clip_loader_name._width = max_width;
    clip_loader_name._yscale = clip_loader_name._xscale;
    if( clip_loader_name._height > max_height )
    _root.picsPage_mc.txt_test = "func if 2";
    clip_loader_name._height = max_height;
    clip_loader_name._xscale = clip_loader_name._yscale;
    else { new_width = orig_width; new_height = orig_height; }
    [/code]

  • Is this possible in flash CS3 or later to resize a movie clip but not its childern

    Hi
    I want to make a movie clip inside another on, and when I
    resize the outer one by code or manually, the inner on should keep
    it size as I created it first?
    If this possible please give me the code for that (AS2.0 and
    AS3.0)
    thanks a lot.

    Hi,
    I am not sure so I will just give some some "ideas" you can
    try:
    1) can you assign a "variable" to the size attribute? like
    mclip.size=myvariable;
    and then changing it?
    2) can you use something to "record" the current size of the
    "inside movie clip" like StoringVariable=this.size;
    and then call it again later?
    3)can you siply not "reassign" the size two times?
    like for one "button click:
    on (release)
    movieclipparent.size=something;
    movieclipinside.size=something else;
    I think its definitely possible...
    Have a look at the Keyword "_parent" or "this" for example...
    or "_root.moviclip.movieclip"

  • Resize a movie clip

    Hi,
    Here is the scenario:
    I have a document with the following dimentions:  1000x700 px. In Scene 1 I have a movie clip called mc_master. Inside mc_master I have all the other elements (buttons, movie clips, graphics, etc.)
    I need to resize the whole document vertically, so in Scene 1 I resized the document to 1000px x 850px. This created a 150px empty space in the bottom of the document. I wanted to resize mc_master to include this space (basically mc_master should cover the whole document). However, when I selected mc_master and modified its height property all elements inside stretched instead of just including the blank space at the bottom.
    To simplify the question: is there a way to enlarge a movie clip without distorting the element inside it? I am assuming that I can create a new movie clip with the new dimentions in Scene 1 and then copy all the elements from mc_master inside the new clip, but I wondered if there is a better method of handling this situation?
    Thank you,
    Daniel D.

    Thank you meqlomor,
    This is what I was looking for.
    Daniel D.

  • Preventing a movie clip from resizing

    Hello:
    How can I prevent a movie clip from resizing while continuing
    to allow the main movie to resize.
    If this is impossible to do, knowing that would also be
    helpful information.
    Thank you in advance for any assistance offered,
    MyMorgaine

    Make an Album of the Photos and Videos and put them in the order you want. Then make a slideshow of that album.
    Regards
    TD

  • Resize window/Movie Clip

    Hi All,
    I have a movie clip that contains a swf file in my .FLA file . How can i enable the movie clip so that when the screen is resized either bigger or smaller, the movie clip enlarges/shrinks accordingly.
    Any help would be greatly appreciated
    Cheers
    Sean

    Think i have cracked it. If I change the settings in "Publish settings" to percent and specify 100% this works a treat!
    Cheers

  • Movie clip will not "resize"

    Hello Forum,
    I am baffled by something i "created". I have a swf file,
    that has 3 containers (aka movieclips).
    my first container (cleverly named "container") gets an
    attached movie clip beginning in frame 1 of the root timeline.
    I also have a clip on my stage (called "NavigationPane").
    This is a movie clip as well. This is dragged to the stage at the
    design mode.
    My clip NavigationPane has an instance name
    ("navigaionpane"). This also has a border that gets sized
    dynamically at run time.
    My stage size is 640x525, and my resize for the
    navigationpane is 640x480. so far so good. If I run the swf file
    from flash player all works fine (or so it seems).
    My challenge is when I embed the swf file in an html page,
    and set the swf file to a smaller size (512x420 for the "stage"),
    the clip plays ok and at my desired size. I am using code
    like this to "resize" the swf object:
    <script type="text/javascript">
    <!--
    writeDocument('<object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    scale="exactfit" width="512" height="420" ID="Captivate1">'+
    '<param name="movie" value="Module1-4Buttons.swf">'+
    '<param name="quality" value="high">'+
    '<param name="loop" value="0">'+
    '<embed src="Module1-4Buttons.swf" width="512"
    height="420" loop="0" quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash"
    menu="false"></embed>'+
    '</object>');
    //-->
    </script>
    <noscript>
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="512" height="420" ID="Captivate1">
    <param name="movie" value="Module1-4Buttons.swf">
    <param name="quality" value="high">
    <param name="loop" value="0">
    <embed src="Module1-4Buttons.swf" width="512"
    height="420" loop="0" quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" menu="false"></embed>
    </object>
    when the clip starts to play the size show as 512x420 (swf
    stage size is 640x525).
    I have code (actionscript) set at about 1/2 way thru clip to
    resize the nav pane to 640x480. when the code runs to resize the
    nav pane - the html sizing seems to be bypassed, and I get a piece
    of the stage in my 512x420 "window" in my html file.
    It seems that the resize overrides the html code. should I
    bite the bullet and just resize everything for my 512x420 size?
    thanks,
    eholz1

    ok I seem to have made some progress, but also stepped back
    at the same time. I exported it as flv in premiere 2.0, and
    imported to flash 8 as embedded video. bottom line quickly, it now
    plays two times and stops, so thats better. :) however all of my
    control buttons stopped working. I did instantiate the flv as
    -video-, but the scripts shown above no longer work. It also
    autoplays at load, so in publish settings I told it not to, but
    without the buttons working I cannot get it to play at all. Chuckle
    chuckle. So if autoplya, it plays twice, but my buttons do not work
    at all, if no autoplay, it can do nothing as the buttons do not
    work.
    I am surprised the buttons do not work as the instance is
    still video and I did not change anything. Ah so much I do not
    know. Can you nudge me along a little further. I sure appreciate
    yours and anybodys help as I try to get out of kindergarten.

  • Resize attached movie clip

    Hi,
    I have a movie clip to which I attach several others always
    at the same depth so one replaces the other. I was trying to change
    the size of the attached movies by setting the ._width and ._height
    properties and also by using the xscale without any luck. I finally
    experimented with a tutorial example and got it to work and saw
    that the only difference between the code in the example and my own
    was the depth which I had set to 1 and the tutorial had set to 0. I
    changed my depth to 0 and it worked.
    I didn't see anything specifying that the depth had to be 0
    and believe I am still missing something. If anyone cna help me
    figure out what's going on I would appreciate it.
    Thanks
    Chris

    From the location of the code, the relative path to newSlide
    is
    full_mc.newSlide as newSlide is in full_mc.
    Thus you want:
    function updateStage() {
    full_mc.attachMovie(mySlide, "newSlide", 0);
    full_mc.newSlide._width = 561;
    full_mc.newSlide._height = 421;
    full_mc.newSlide._x = 0;
    full_mc.newSlide._y = 0;
    Also note that you can do:
    full_mc.attachMovie(mySlide, "newSlide",
    0,{_x:0,_y:0,_width:561,_height:421});
    Look up attachMovie for the optional initObect
    parameter.

  • Movie Clip / Browser Window Resize?

    Hello Everyone,
    I was wondering if anyone knew of a way that you could make a
    single movie clip in your .swf react to the current width of the
    browser window, when its loaded.
    I would like to use this specific piece of code to
    dynamically center an "enter" button on a website.
    Thank you in advance

    If you set the properties of your .swf to 100% width and
    height your movie will automatically fill the browser regardless of
    resolution. Note if your using a colored background for your web
    page you will see white striping down each side of your movie. just
    set the param for bgcolor to what ever you need it to be
    Kevin

  • Can't get Simple button to Load Movie Clip

    Hi I've looked around for the answer to my question on this
    forum
    but havent found it so here it goes. I am working on this
    company's
    Flash site that was built by an outside studio. I am using
    CS3.
    The url to the site is
    http://www.bubbakeg.com.
    (this link will take you to the main page click the shadow
    graphic
    on the left under Bubba and this will take you to the site I
    am speaking
    of. The site is basically 5 different pages or movie clip.
    What I am
    trying to do is basically change the "Spring Break" middle
    graphic
    (which is a Movie Clip) on the HOME page and add a simple
    button
    that will direct the user to a new page. When I replaced the
    graphic
    with a new Movie clip there was no problem but I have added
    a
    button to load a new page (movie clip) and nothing happens.
    This
    button is in the movie clip of the new graphic which is
    called up
    when the page loads. If i take this button and just put it
    on the
    Main Stage in Scene 1 by itself it works and loads the page
    (movie clip). It does not however when it is embeded in the
    Movie
    Clip. The Flash site is basically 5 different Movie Clips
    loaded into
    an "Empty Clip". This empty clip has a timeline with each of
    the
    clips labeled and with their respective sized placeholders.
    And
    when you click on either the links on the Nav bar or the
    graphic
    for each page it loads that movie clip on the main page. It
    seems
    like the button only wants to work on the main timeline. I
    have
    even replaced the code for the "Contact" button with the code
    for the new button and it worked (opening new page). Here is
    the
    code for the new button that does not work:
    on (release) {
    _root.contentHolder.myHeight = 307;
    _root.contentHolder.newLoc = 9;
    heightAnimation();
    I know the location and height from the above code are
    referring to the placement and sizing of each movie clip
    in the "Empty Clip". As i said before this heightAnimation
    and the resizing of the new clip works fine when the
    button resides in Scene 1 on the Main Timeline but not
    within the new movie clip (graphic Ive created.)
    I will upload the main chunk of the code that resides
    in Scene 1 on the first frame of the "Actions" layer.
    If anyone has any ideas I would appreciate it very much!
    Please let me know if I can provide anymore info.
    Thanks!
    Greg

    change:
    function newLayerBT_CLICK(MouseEvent):void{
    to:
    function newLayerBT_CLICK(e:MouseEvent):void{

  • How do I View Guides for Movie Clips in Relation to Entire Scene?

    My boss purchased a flash animation from a company a few months ago that she now needs me to fix. The goal is to resize the animation to different dimensions for a new banner. I took the original file, brought up the document settings, and changed the size to the new one we need, and hit the "scale content" checkbox. The file I have after doing this is shown below; I have highlighted the shape I will be talking about in pink. Nothing is the correct size now so I am trying to resize them to fit the stage area. I am having trouble with the green shape that is highlighted Pink.
    The person who originally made this file made that highlighted shape into a movie clip and then dropped it in to the main timeline. I was wondering if there was a way that I could see where that shape is in relation to the area of the entire stage and the other objects in the main timeline? Meaning if I am inside of the greenblock movie clip all I see is what is below:
    With this view I cannot tell where that shape is in relation to everything else. I am hoping someone can tell me how to view the guides from my main file inside of this movie clip( I already have guides turned on), or any other way of seeing what size and where my shape is in relation to rest of the objects on the stage of my main file. I would take any option that would let me tweak the green shape inside of the movie clip and see in real time how it looks in relation to the rest of the items on the stage as I make changes.
    Any suggestions on how to get perspective on where my movie clip is in relation to the stage and other objects on it would be greatly appreciated.
    Sincerely,
    Tissal

    Somehow double clicking on your system seems to be connected to the command
    fl.getDocumentDOM().enterEditMode('');//the view where you don`t see the rest of your stage
    whereas normally it defaults to
    fl.getDocumentDOM().enterEditMode('inPlace'); //the view where you can see everything els on stge alphablended
    you can either create a shortcut to
    edit>edit in place or alter the standard behaviour of your double click
    or right click(Windows) or ctrl-click(MAc) the mc and choose Edit in Place

  • Advanced Button with Movie Clip and Fading

    Problem: I'm trying to create a bottun that when you roll
    over it it plays a movie clip and also fades in and out on roll
    out. It is similiar to the three main navigating buttons on the
    following site.
    http://www.fjcruiser.ca/
    the buttons with the compasses that appear are the ones I am
    talking about.
    I already know how to make buttons, I just can't figure out
    the actionscripting to load the movie and also fade in and fade out
    according to roll over and roll out.
    Please help. Thank everyone.

    Amazingly, I actually know exactly how to do this. And it
    only requires about 4 lines of code in the _root layer and on the
    button.
    Instead of having the rollover load an external movie, you
    want the have the rollover execute an on(enterFrame) function that
    tells each newly entered frame of your movie to check to make sure
    the mouse is still on the button, and if not, send the movie
    playhead backwards.
    So, put that sampleMovie right on the stage with the button.
    Then write the code in the _root so that says: as long as the mouse
    is over the button, the movie will advance to nextFrame(). When it
    gets to the next frame, again the code checks to see if the mouse
    is on the button, if so, the movie is instruct to go one more next
    frame (which is tweening the fade, right?) again, over and over
    until the stop() at the last frame. But, if while while entering a
    frame, the code finds that the mouse is no longer over the button,
    it does the same thing but this time instructs prevFrame(), and so
    on, going prevFrame (backwards, in other words) as long as the
    mouse is not on the button.
    The result of the above is a gradual fade in and out,
    depending on whether the mouse is hovering. This, as opposed to an
    abrupt disappearing graphic on(rollOut).
    Click the below link for the .fla that demonstrates this
    technique (which, by the way, I learned from Joshua Davis'
    excellent book, "flash to the core". Check it out at Amazon, or
    wherever. Lots of cool tricks).
    click here for
    fade_Movie example

  • Attaching an embedded movie clip to an empty one

    HI,
    I am new to Flash and would like some help about the
    following. A have an embeded movie clip in my library that i want
    to attach to an empty movie clip I am creating with ActionScript. I
    want to fix the size of the empty movie clip, that I will use as a
    container to for my embedded movie clip. It turns out that when I
    fix the size of the empty movie clip container and I use
    attachMovie to load the embedded movie clip to it, the image
    doesn't show, I can hear the sound but not the image.
    So the question is , if I have a movie clip container of a
    different size than the movie clipse I want to load into it, what
    do I need to do to make sure the movie clip will fit into the empty
    container.
    thanks
    -malena

    Thanks for the answer, but what I would like to do is to have
    a FIXED size empty clip on the stage and be able to load new clips
    into that empty clip and have the loaded clips resize to fit into
    the empty clip.
    For example the FLVPlayback component does that
    automatically. I can't use the FLVPlayback component because I want
    to be able to control which frame number I want to displaly on the
    screen, and it looks like I can only have that type of frame level
    control wiht a Movie clip component but not with the FLVPlayback
    component.
    -malena

Maybe you are looking for

  • Cannot update or reinstall iTunes - receiving access error message

    Hello I tried to install the most recent iTunes update the other night and received the below errow.  I uninstalled and tried to reinstall and am still receiving the same error - Error writing to C:\Program Files(x86)\iTunes\iTunes.Resources\fr.prj\p

  • My skype to go number nightmare

    So I am annoyed. I set up a skype to go number so I wouldn't have large phone bills with my cell phone. I set up a skype to go number a month ago for a small fee so I could call for a list of people I like to call regularly in the States. I just rece

  • Can't get videos on N96

    Okay I have a feeling this is just me being really stupid, but I've wasted a ridiculous amount of time encoding videos over and over again that I hope someone can just give me a simple answer. I have movies that I ripped off the DVDs (legit) using VL

  • I phone is not appearing in i tunes

    i m going to update my i phone 3g with i tunes but it is not appearing in i tunes. what should i do?plz help me.

  • Cannot install Quicktime

    I've had an enforced upgrade (due to iPhone) go bad on me! I've upgraded to iTunes 8.1.1 - as suggested to match my new iPhone. However, I can't install Quicktime in order to run it! It gets to the point where it's installing files (around 12%) and t