_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;

Similar Messages

  • 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 Movieclip in a restricted area.

    Dear friends,
    I have 2 moveclip called view_mc and restricted    and button called btn_scale.
    When the user click and drag btn_scale, it resizes the view_mc where the width and height of view_mc dosen't exceed the width and height/2 of restricted area.
    I made that.  But when view_mc reaches the width and height/2 of restricted area, I can't resize view_mc to be samller.
    (The btn_scale looks like it's disables and can't use it)
    I think some logic is missing. I highlighted the code that is missing some logic.
    var clickedX:Number;
    var clickedY:Number;
    var newScale:Number;
    stage.addEventListener(MouseEvent.MOUSE_DOWN, on_stage_down);
    stage.addEventListener(MouseEvent.MOUSE_UP, on_stage_up);
    function on_stage_down(e:MouseEvent):void
    if(btn_scale.hitTestPoint(stage.mouseX, stage.mouseY))
      clickedX = stage.mouseX - view_mc.x;
      clickedY = stage.mouseY - view_mc.y;
      newScale = view_mc.x;
      view_mc.addEventListener(Event.ENTER_FRAME, on_enter_scale);
    function on_enter_scale(e:Event):void
    stage.addEventListener(MouseEvent.MOUSE_MOVE, on_move_scale);
    //////// Some Logic is missing here ////////
    function on_move_scale(e:MouseEvent):void
    if(view_mc.width < restricted.width && view_mc.height < restricted.height/2)
      view_mc.width = view_mc.height =  newScale * (stage.mouseY / clickedY);
    function on_stage_up(e:MouseEvent):void
    view_mc.removeEventListener(Event.ENTER_FRAME, on_enter_scale);
    stage.removeEventListener(MouseEvent.MOUSE_MOVE, on_move_scale);
    please help me solve this problem.
    Thanks alot in advance.

    Update the following code in your application...
    function on_move_scale(e:MouseEvent):void
    if(view_mc.width <= restricted.width && view_mc.height <= restricted.height/2)
      //Find new scale
      var temp = newScale * (stage.mouseY / clickedY);
      //Check if the new scale is within the limit or not?
      if(temp > restricted.height/2 || temp > restricted.width)
       //If its out of the limit update the scale to max value for scale.
       temp = (restricted.width)<=(restricted.height/2)?(restricted.width):(restricted.height/2);
      //Apply scale to MC.
      view_mc.width = view_mc.height =  temp;
    //You should have a simillar check for the lower bound also ideally it will take only 0 as minimum scale value

  • Resizing movieclip with scrollbar text

    Hi Experts,
    Here I am trying to resize a movie clip which contains some dynamic text with scrollbar in a swf using mouse. I am able to resize the movie clip using "setProperty". But unable to control the behaviour of the scrollbar. when I am increasing the size of the movie clip the scrollbar should automatically disappear. But I am unable to do so. Can anyone help me??
    Here is the link of the swf I am working on:
    http://qs1252.pair.com/monarchm/test1/
    Here is the code I have used for the resizer:
    if (this._x <= 20) {
        setProperty(_root.cont.frames, _width, 20);
        setProperty(this, _x, 20);
    } else {
        setProperty(_root.cont.frames, _width, this._x);
    if (this._y <=20) {
        setProperty(_root.cont.frames, _height, 20);
        setProperty(this, _y, 20);
    } else {
        setProperty(_root.cont.frames, _height, this._y);
    Help me
    srinivas

    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/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.

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • Maximum text size for textFormat

    Afternoon everyone,
    I am working on an application in which text is created
    dynamically. I seem to be experiencing a maximum size of 130 when
    using textFormat. I cannot seem to find any references to this
    limit. Is there a way to get around it?
    So far my only resolution is to create a smaller text field
    within a movieClip and then scale the movieClip. This moves the
    text of the pixel location that I need it however.
    Any help with this would be very much appreciated.
    Cheers,
    Michael

    you can making the text html and setting the text like this:
    <font size="X">text</font>
    Otherwise, if you can't set a font bigger tahn 130, you'll
    have to resize movieclips.
    You can create a custom class that embeds aTextField within a
    movieclip so that you get transparent coding, just replace
    TextField with CustomTextField.

  • Load external files

    I created fifteen 300 X 250 sized movieclips. I've adjusted each movieclip into different sizes. Now I need to load 15 external files in to these movieclips. (all external files are 300 X 250).
    1. When I load the external files, all the loaded files does not adjust to the resized movieclips (all external files are maintaining it original size). I need the loaded files to be resized as per the movieclips on stage.
    2. Is there a short way of writing the code to load these 15 external files?
    //movieclips on stage: gHolderF0, gHolderF1, gHolderF2
    //external files : sample0.swf, sample1.swf, sample2.swf
    I'm using this to load each external file:
    var loaderPrototype:Loader = new Loader();
    var selectedPrototype:URLRequest=new URLRequest("sample/sample0.swf");
    loaderPrototype.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
    loaderPrototype.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
    loaderPrototype.load(selectedPrototype);
    function finishLoading(loadEvent:Event) {
    gHolderF0.addChild(loadEvent.currentTarget.content);
    addChild(gHolderF0);
    function errorHandler(errorEvent:Event):void {
    trace("file missing");
    function errorHandler(errorEvent:Event):void {
    trace("file missing");

    adding a child (loader or otherwise) is going to affect the scale of the child and the position of the child.  but you can't assign the exact size unless you do some intelligent scaling of the parent.  for example:
    after loading is complete:
    gHolderF0.scaleX=300*loaderPrototype.width;  // resize to 300x250
    gHolderF0.scaleY=250*loaderPrototype.height;
    but that really makes no sense.  you may as well resize the loader directly:
    loaderPrototype.width=300
    loaderPrototype.height=250;

  • 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

  • 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."

  • 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 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();

Maybe you are looking for

  • ICloud Control Panel doesn't stay installed.

    I'm installing on a Win 8.1 64bit machine with Outlook 365 Home Premium.  The install seems to go well, but after I finish and the Control Panel closes, I have to reinstall it when I open it again.  Anyone have a suggestion?

  • HP 6890, Windows 8, 64 bit, Firefox browser, Samsung Laptop

    I have checked most of the posts on this section and I find the driver, download it, and try to install.  I have deleted my printer, uninstalled it, started from scratch to install the printer, but whenever I plug in the USB cable, I get the same "ca

  • Java.io.File causes "access denied" exception in a signed applet

    Hi, New to these forums and not entirely where it's appropriate to post this issue, so I'll stick it here for now until told otherwise. The problem: My applet throws the following exception. INFO: Exception Message: access denied (java.io.FilePermiss

  • HT4236 vidoes from pc to ipad

    Anyone know how to synv videos form a camcorder, that where copied to a pc, to an ipad ? The original files are in wondows media plaeyr format

  • Server Side Flex Code?

    My company currently has a back end image rendering engine built in Java. The rendering engine serves up images on request to a Flex User Interface through web services. What we have discovered through benchmarking is that Flex (or the Flash Runtime)