MovieClip resizeing

I have a movieClip attached to an external class file, the
class file takes data and uses it to draw an bar chart ino the
movieClip.
If you re-size the movieClip and then compile everything
displays correctly but obviously all elements in the movieClip are
enlarged/shrunk depending on how you re-sized.
I want to make my movieClip so that when it is resized
certain elements stay their original size (text size, line
thickness) and others are enlarged/shrunk to match the movieClip
size (fill areas).
How would i go about doing this, can it be done.
The same as how when you re-size a component the text etc.
stays the same size (and the position updates) but fill areas are
enlarged/shrunk.

Tolk,
> I want to make my movieClip so that when it is
> resized certain elements stay their original size
> (text size, line thickness) and others are enlarged/
> shrunk to match the movieClip size (fill areas).
> How would i go about doing this, can it be done.
You can check into 9-slice scaling, a feature new as of
Flash 8. Search
the phrase "About 9-slice scaling and movie clip symbols" in
the
documentation. Other than that, it's a matter of noting the
clip's
MovieClip._xscale and _yscale properties and cycling through
to manually
adjust nested _xscale and _yscales accordingly to compensate.
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • MovieClip Resizing Weirdness

    I have a movieclip in an external swf, called menubg. In the library properties tab, it reports the size as 1024x768.
    I use an embed statement to pull the movieclip from the swf at compile time. It comes in just fine (as a Sprite since that seems to be the only way to instantiate an object from an external swf), you can see it without a hitch, but tracing out the size info does not return the same WxH as the original.
    Here's some code, and the trace outs
    var mbg:Sprite=new wpa_menuBG;
    trace(mbg.width,mbg.height); // 1028.95 777.95 --  that's not right
    // the screen container
    theScreen=new MovieClip();
    theScreen.name="menu";
    // add the background
    theScreen.addChild(mbg);
    trace(theScreen.width,theScreen.height); // 1028.95 777.95 -- at least it's the same size as the sprite above
    // hey, let's force it to be the original size!
    theScreen.width=1024;
    theScreen.height=768;
    trace(theScreen.width,theScreen.height); // 1024.05 767.95 -- hmm
    Later, I add a second movieclip to theScreen, actionContainer, which is 340x220
    // add the action container
    actionContainer.x=0;
    actionContainer.y=0;
    trace(theScreen.width,theScreen.height); // 1024.05 767.95
    theScreen.addChild(actionContainer);
    trace(actionContainer.x,actionContainer.y,actionContainer.width,actionContainer.height); // 0 0 340 220
    trace(theScreen.width,theScreen.height); // 1034 777.8 -- huh?
    The only thing I can figure is that the actionContainer has a shape, a roundRect with a border of 20 and a dropshadow filter. BUT the shape is the first object, and the largest object, added to the actionContainer so it should max out the width.
    Now if I preset the the x and the y of the actionContainer, I get some pretty different results:
    // add the action container
    actionContainer.x=50;
    actionContainer.y=50;
    trace(theScreen.width,theScreen.height); //1024.05 767.95 -- same as last time
    theScreen.addChild(actionContainer);
    trace(actionContainer.x,actionContainer.y,actionContainer.width,actionContainer.height);// 50 50 340 220 -- okay
    trace(theScreen.width,theScreen.height); // 1024.05 767.95 -- really?
    I'm not sure what I'm missing here. I just know that it's frustrating.

    Ensure that your mbg sprite is located at coords 0,0 for it to return the information that you're expecting. As for the width and height of the mbg being different than expected, you might want to check if there's been any scaling applied to it by tracing out ".scaleX" and ".scaleY"
    Normally, when I know something should be a very specific size, and it's not, I'll force .scaleX and .scaleY to a value of 1, which will return them to normal scaling. (Scales are changed when width/height are changed, so checking these values will also check for changes in width and height)
    Hope that helps to narrow down the problem.
    ~Plystire

  • I want to build android application using existing desktop dimension fla files. so for this I am resizing existing desktop dimension fla files to mobile dimension files but during resizing some files are resizing properly but most of the files the content

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

    problem definition:
    To build android application using existing desktop dimension fla fies , I am resizing that files to mobile dimension and publishing with air fo android 16  . In this process some fla's are not resizing properly I mean the content is not matching with stage
                      In one post I saw that by copying frames in movie clip we can adjust with stage . I did this and made an application but the swf's which are following the movieclip resized swf are going out of stage
    development tool : adobe flash professsional cc
    extension : air for android 16
    original file dimension: 800 * 600 px
    new dimension required is : 2650 * 1600 px ( to get full screen view)
                                           anyone please suggest me to solve this problem
    when I resized using copy frames in movie clip the output swf is coming with white screen . If I played with package it coming properly but the files which are following this are going out of stage
    Thanks&regards
    K.Niranjan

  • Static sized movieclips

    Let me try to explain this the best I can.
    I have a MovieClip, resizes horizontally, not vertically.
    Dyanically, using attachMovie, MovieClips are added.
    Thing is, I want these attached movie clips' background to
    resize like it's parent, as well as the content (Textboxes, but
    they don't stretch because the text isn't embedded). I'd also like
    the start of the background to ALWAYS be at 100px, and an image
    before that. Unfortunately, this isn 't working. I tried a funky
    offset with 9-slice scaling, but it always resizes as if it's one
    big image.
    Is there a way to have only part of those child images
    resize? I also noticed that using _width on the movie clip in the
    child makes it dissapear.

    Let me try to explain this the best I can.
    I have a MovieClip, resizes horizontally, not vertically.
    Dyanically, using attachMovie, MovieClips are added.
    Thing is, I want these attached movie clips' background to
    resize like it's parent, as well as the content (Textboxes, but
    they don't stretch because the text isn't embedded). I'd also like
    the start of the background to ALWAYS be at 100px, and an image
    before that. Unfortunately, this isn 't working. I tried a funky
    offset with 9-slice scaling, but it always resizes as if it's one
    big image.
    Is there a way to have only part of those child images
    resize? I also noticed that using _width on the movie clip in the
    child makes it dissapear.

  • _xmouse on resized movieclip

    I am creating a video player and have a scrub bar which you
    can click on the timeline to get a point in the video.
    The player is dynamic in size and can be opened at any size
    you require, set by the movie dimensions in the HTML.
    I have the controls for the player resizing and positioning
    dynamically with the width of the movie, so the scrub bar is
    dynamically changed in length.
    Everything works except when I click on the bar and retrieve
    the _xmouse position is is still returning the original coordinates
    of the movieclip, its size when created.
    The width of the bar in pixels is being returned correctly
    when I check, it is just the _xmouse coordinates which are
    returning original values.
    e.g. (for ease I have rounded things up)
    If I increase the width of the movieclip from its original
    400px to 800px wide, when I click 3/4 of the way along the resized
    movieclip I get a result of 300px instead of 600px.
    Do I have to reset something?
    Thanks

    use:
    content_mc.work_btn.mouseChildren=false
    content_mc.work_btn.buttonMode=true;

  • Resizing/moving MovieClips to fit screen problem

    I'd like to make an Android and iOS app with Adobe AIR, but I found a problem I can't solve.
    The Flash document size of the app is 800px x 600px, and I'd like to resize MovieClips to fit Android's and iOS' screens, suporting the Retina display on iOS devices.
    I tried using StageDisplayState.FULL_SCREEN and StageScaleMode.SHOW_ALL, and this does seem to work with static MovieClips, so the snippet would look something like this:
    import flash.system.Capabilities;
    import flash.events.Event;
    import flash.display.StageScaleMode;
    import flash.display.StageDisplayState;
    stage.addEventListener(Event.ENTER_FRAME,process);
    var difN:Number = (((stage.stageHeight*stage.fullScreenWidth/stage.fullScreenHeight)-stage.stageWidth)/2);
    function process(e:Event):void {
              difN = (((stage.stageHeight*stage.fullScreenWidth/stage.fullScreenHeight)-stage.stageWidth)/2);
              stage.scaleMode = StageScaleMode.SHOW_ALL;
    stage.addEventListener(KeyboardEvent.KEY_UP,useFullScreen);
    function useFullScreen(e:KeyboardEvent):void {
              if (e.ctrlKey) {
                        switch (e.keyCode) {
                                  case Keyboard.M:
                                            stage.displayState = StageDisplayState.FULL_SCREEN;
                                  break;
    obj.x -= difN
    However, I'd like to use classic tweens in my application, and this won't work since most of the elements are moving.
    I'd like to rescale/move MovieClips so they don't look distorted and every moving item moves correctly, showing all the content and trying to not make any borders. I read this article but it seems like it doesn't support classic tweens: http://www.adobe.com/devnet/air/articles/multiple-screen-sizes.html.
    Thanks for the help.

    1. scaleMode only has an effect when you embed your swf in an html AND you publish for a percentage.
    2. you need to resize your displayobjects using code and/or in the ide.  if you open your document settings panel (modify>document) and change your stage size you are offered some scaling options.  see if any work for you.

  • Presumably simple - adjusting MovieClip on stage resize..

    Hi there!
    I've been looking at a number sites lately and I've noticed that when you scale the browser window, what I presume must be a MovieClip, containing thumbnails, is adjusted, according to the size.
    Two examples are these:
    http://www.daniagraibe.com/
    http://www.aorta.se/
    When you go on these sites, thumbnails will eventually load - when you resize your browser window, more of less thumbnails will be on each line - according to how wide the browser (or stage, is).
    I presume this must require a stagelistener of some kind?
    If anybody has any clue how, using ActionScript 3, and instance names, this could be achieved, I'd really appreciate your help/advice!
    Thanks in advance for anything you can provide!

    Thank you for your reply - really appreciate it!
    Would it really be this complicated though?
    In the case of daniagraibe.com, it seems a little complicated for all those MovieClips to be repositioned, individually?
    Or would it perhaps have internal thumbnails and work by:
    calculating stage.stageWidth
    seeing if it's > a number
    If it is > a number, reposition thumbs
    If < number, don't?
    Thanks again for your help, if you're not sure on this, however.

  • Resize a movieclip at runtime

    I'd like users to be able to drag out a shape from the side
    of the stage (say a square) and then resize it on the stage. I
    think I've seen this Flash functionality somewhere on the web, but
    I can't figure out what the code would be for this. Can anyone
    help?
    Thanks,
    Michael;

    I think I've got the problem solved, but can I follow up on
    one thing you mention below? It has to do with the parent/child
    relationship and the startDrag action. I was under the impression
    that if I put a movieclip inside of another movieclip and then
    apply a drag action to the parent movieclip, then there was no way
    to access the child movieclip. For example, I put a small textInput
    component inside of a larger movieclip and then I put a drag action
    on the movieclip. I wanted users to be able to type in some text
    into the middle of the movieclip and then move the moviecip around
    if they wanted to. However, as soon as I put the drag action on my
    parent movieclip, the inputText component could no longer be used -
    the "hand" appeared over whole movieclip so users could no longer
    type anything into the inputText area. Is there any way to do what
    I want to do here?
    Appreciate your help!
    Michael

  • Loader content got vanish on resize root movieclip

    Hello,
    I have made 30 dynamic movieclip and I put all these Movieclips in MainMovieclip, each movieclip loads one jpg image dynamically, when i resize root movieclip then
    all graphics got invisible. How can i resize parent movieclip, I can't resize individual loader content because there is complex thing will happen where i need to calculate x y position and height widh for individual,so that i put all movieclip in root moviclip and I resizing root movieclip.

    You likely already solved this issue...
    As I understand it, X, Y, width, and height are only read from the first frame of a loader object. Check to make sure that the content on the first frame of your object that your loading is the same size as the content of the entire object. In other words, if you have content on frame 50 that's 200 px wide in total from the registration point of x=0 y=0, and your content on frame 1 is only 100px wide, you'll need to add a transparent object on frame one (starting at x=0 y=0) that is also 200 px wide. If I understood your issue correctly, this should solve the problem. You can easily do a trace on the size of the object your loading to be sure that it's sizing correctly.

  • Best AS2 resizing scrollbar code (movieClip)

    I need some good functioning dynamically resizing scrollbar
    code for actionscript2 for a movieclip. I need it to dynamically
    adjust itself based on the content of the movieclip. I have some
    scrollbars, but if you need to adjust the height of the scrollbar
    for a particular interface, it requires that you edit some numbers
    manually - and at this point its behaving quite buggy for me. I
    would prefer if there was some code that managed that itself (or
    was very clear how to edit). I would also prefer if I could
    customize the graphics. Could some please link me to either a great
    tutorial (or preferably an FLA) so I can get past this frustration.
    i would really appreciate it

    Thanks for your response. I should be more accurate here...
    I am using two movie clips here. The first one is the "frames" in container and the  second one is "re-sizer". "_root.cont.frames" gets the _x and_y positions  according the to x, y positions of the "_root.cont.frames.re-sizer.re-sizer_btn".
    The UI scrollbar I am using here is a flash component, and is a child of "_root.cont.frames"
    This is my first thread ever! So I am learning the things here. Thanks  for your guidance. I will be more accurate moving further..
    Thank You,
    Srinivas

  • Resizing movieclips at set intervals

    Hi,
    So here's my problem - i hope you have solution:
    I have a dynmically populated list of buttons (an archive
    list for blog) which is masked by a movieclip. The mask resizes to
    the height of the stage so that the archive list is always the
    correct height.
    What I want to do though is have the mask resize at intervals
    of 20 (the height of each button in the list) so as the stage
    resizes the mask will either completely reveal or completely hide
    the bottom button, not cut it of at all.
    For example, if the stage was 412 pixels high the mask would
    only be 400. If the stage got dragged larger the mask would not
    resize until the stage reached 420px. Does this make sense?
    If anyone can suggest something that would be great! Thank
    you!!!!!!!

    Thanks kglad! That's exactly what i needed!

  • Resizing a photo movieclip

    I have a file with one frame:
    I have a set of simple, identical buttons. Each button tells
    an empty movieclip to load a picture. The movieclip will scale the
    picture appropriately and stay under a specified width and height,
    and it will reposition appropriately.
    I would like to put all the script on one frame.
    I have bits of jumbled script that is supposed to do all
    these individual things, but it won't work all together. I know how
    to load a picture using loadMovie, but the movieclip isn't
    retaining the size or position i told it to.
    I don't know too much about actionscript, so any help would
    be apprecitated. Thanks.

    The problem with setting the size is that you have to do it
    *after* the loading. Before, there's just an empty MC, and it's
    size will always be 0, because it's empty. Plus, the loaded content
    will set it to a new size. So the best way is to use the
    MovieClipLoader class, which provides events that fire when the
    loading finished. Create an instance of MovieClipLoader, and let
    your buttons call the loadClip() method (not exactly sure if that's
    the right name, see the Help).
    Then define the onLoadInit event and place the resize code in
    that. onLoadInit happens when the content is completely loaded and
    initialized (if it is an MC with code in frame 1), and the right
    place to change the properties. See the Help files for onLoadInit,
    there should be an example. If you load the pictures this way, you
    can easily resize when the loading finishs.
    hth,
    blemmo

  • Resizing a movieclip correctly?

    I can't figure out how to resize a movieclip correctly. I'm
    trying to make a photo gallery and keep everything a certain size
    but when I try and change the scaling, the movieclip just
    disappears.

    use:
    var pic:Loader;
    var totalImages:int = 10;
    var border:uint = 10;
    var prevX:Number = 0;
    var prevW:Number = 0;
    var i:uint=0;
    var container:Container;  // create a class for your container moviecip
    loadF();
    function loadF(){
        container = new Container();
        addChild(container);
        pic = new Loader()
        pic.load(new URLRequest(myImages))
        pic.addEventListener(Event.COMPLETE, resizeContainer)
    function resizeContainer(e:Event):void{
        container.x = prevX+prevW;
        container.width = pic.width+border;
        container.height = pic.height+border;
        container.addChild(pic);
        pic.x=pic.y=border/2;
        prevW=container.width;
        prevX=container.x;
        i++;
        if(i<totalImages){
            loadF();

  • Resizing parent movieclip without affecting the children

    Hi all,
    What's the best way of  resizing parent movieclip without affecting the children?
    I have a container movieclip that resizes depending on the stage, and when I add another movieclips to it they also resize, but I want them to keep the original size,
    is it possible?
    Many thanks

    Hi, thanks for the reply,
    I already tried this way, I put a bitmap as a background of the movieclip and made only it dependent on the stage size,
    something like that:
    mc.bg.width = stage.stageWidth; (and not mc.width, as its width will change along with the bg width)
    so when I add children to the mc, they don't change any more.
    I'm a .NET developer and new to Flash platform, and I think it would be nice from the community to make a built in property for MovieClip class -
    resizeChildren: Boolean
    I lost a whole day on this problem, because when I drew a movieclip in a designer side I saw that its background size changed along with the size change, and when I added children to it from the code the movieclip's size changed and the background stayed still, quite strange behavior for an HTML guy
    I think that it would be better to consider already drawn movieclip not to have any children yet and have its background as its part (not at(0)) and let the programmer choose later added children's resize behavior.
    thanks again

  • My movieclip symbol vanishes when i resize it. why?

    Ive imported a hammer graphic into flash, converted it to a movieclip and when i place it on stage and resize it with the free transform tool , the hammer graphic dsissappears, the movieclip element stays on stage, but i cant see the graphic. If i zoom in  on stage, the graphic reappears again. How can i work around this problem please?

    This forum is actually about the Cloud, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll
    https://forums.adobe.com/community/flash

Maybe you are looking for