MC scale on RESIZE

I am currently working on a swf (call it swf_A) that will eventually be loaded into another swf (call it swf_B) and have a few questions about resizing movie clips with the RESIZE event.
Here is my code this for swf_A:
public class swf_A extends MovieClip
          public function swf_A()
               stage.dispatchEvent(new Event(Event.RESIZE));
               stage.addEventListener(Event.RESIZE, updateSize);
          private function updateSize(event:Event):void
               doorsMC.width = stageWidth;
               doorsMC.height = stageHeight;
This is resizing my Movie Clip, however when I drag the flash player to make it bigger, it seems that it is scaling from the bottom right of the player.  I see the Stage, or white background in the top  and left of the player.  Any Ideas?
Second part is if I use a reference to the stage like doorsMC.width = stageWidth; and doorsMC.height = stageHeight;    will this break when I load it into swf_B?
Thanks guys,
[EDIT]:  Ok, seems I figured out my scaling problem, looks like i was missing import flash.display.StageAlign; and stage.align = StageAlign.TOP_LEFT;
Thanks again.

OK, I have reworked my files a little, I did find out that loading a swf into another does break it when using a strait reference to the stage...... stage.dispatchEvent(new Event(Event.RESIZE));. So, What I have going on is a situation where I will have a parent swf that children swf will be loaded into.  Some have to be scaled while other need to remain a constant size and centered.
I originaly had the following code in my Parent swf:
//in the constructor
stage.align=StageAlign.TOP_LEFT; //Specifies where the contents in the stage are aligned from
stage.scaleMode=StageScaleMode.NO_SCALE; //Stops the contents of the swf from scaling
stage.dispatchEvent(new Event(Event.RESIZE)) //Dispatch an event everytime the screen(browswer/swf) is resized./stage.addEventListener(Event.RESIZE, updateSize); //Listens for the event just dispatched
//outside the constructor
private function updateSize(event:Event):void
               //center content
               _currentBoard.x = stage.stageWidth/2 - _currentBoard.width/2;
               _currentBoard.height = stage.stageHeight/2 - _currentBoard.height/2;
This worked great, untill I have to import a swf that does need to be scaled, So my thinking was, remove this from the Parent swf and pace what is needed in the constructor of each child swf document class.  This does not seem to work.
Inside of one of my children swf, I now have the following:
package
     import flash.display.Sprite;
     import flash.display.Stage;
     import flash.display.StageAlign;
     import flash.events.Event;
     public class Directory extends Sprite
          public function Directory()
               if (stage){
                    onAddedToStage();
               } else {
                    addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
          private function onAddedToStage(event:Event=null):void
               removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
               stage.align = StageAlign.TOP_LEFT;
               stage.scaleMode=StageScaleMode.NO_SCALE; //Stops the contents of the swf from scaling
               stage.dispatchEvent(new Event(Event.RESIZE)) //Dispatch an event everytime the screen(browswer/swf) is resized.
               stage.addEventListener(Event.RESIZE, updateSize); //Listens for the event just dispatched
          private function updateSize(event:Event):void
               this.x = stage.stageWidth/2 - this.width/2;
               this.height = stage.stageHeight/2 - this.height/2;
This is not working, as it still scales the contents of the flash player (my child swf) when I resize it.  Also when I run just the child swf, I get an error 1120: Access of undefined property StageScaleMode.
Thank, I appreciate any help.

Similar Messages

  • On the iOS7 photos do not fit the screen, and I can not move or scale or resize.. Is there something I am missig?

    On the iOS7 photos do not fit the screen, and I can not move or scale or resize.. Is there something I am missig?

    Yep, I have the same issue...really upset about this upgrade now, wish I could rollback to iOS 6..
    -Steph

  • Need to global find and scale and resize frame on a linked graphic

    I have a whole set of files that contain multiple instances of an icon set (placed AI file). All of these are formatted to flow in the text as anchored objects with various object styles. I need to make sure that all instances of the placed AI icons are scaled to 30% and that their frames are fit to content. I have a LOT of files and each one has at least 20 of these icons. I thought the Object find and replace would help, but unfortunately it will not let you search for links, and while I can search for the object styles, there's no option to change scale and the fit content options does not have the "fit frame to content" (and doesn't work anyway from the few tests I ran using "fit content proportionally"). 
    Does anyone have any ideas for how I can fix this globally in nearly 500 documents without having to manually select each icon and change the scale and apply the fit frame to content? I've done a handful of files this way, and it's VERY time consuming.

    First make sure this works by duplicating a file and testing.
    Make 1 image the size you need it
    Grep search for
    Find
    ~a
    Change to
    ~C
    if that doesn't work then try ~c (lower case) I can't remember how that works
    If it does work - then you can open 2 documents and choose "All Documents" in the Search field.
    If it's fine on 2 docs - then I'd say go ahead and do the rest.
    I stress to please use a duplicate set of files in case things go bad.

  • Edit scales without resizing a graph

    I'm using an intensity graph in order to show an image acquire by a camera. The size of the 2D array linked to the graph is related to the number of pixels of the image. But I do not want the scale to be in pixels but in µm, knowing that 1 pixel is 5.29*5.29 µm.
    How can I change the scale of the intensity graph in order to show µm without changing the plot area?
    Thank you.

    zyl7,
    the parameters you are looking for are properties from the graph itself. Therefore, you have to look around a bit in the property node from a graph... i am sure you will find out quite quick what i mean.
    There are some examples provides with LV, but they are commonly focused on a special control; sadly i havent found one for intensity charts/graphs.... but this link can help you.
    hope this helps,
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Can Edge animation scale/resize like Flash and Canvas

    One of our biggest concern right now is animation made with Adobe Edge can't scale and resize like Flash or Canvas (and we are not talking about fluid or responsive design) Is that true? Our animations need to allow user zoom in or zoom out without any restrictions, can we build our animation with Adobe Edge?
    Thanks

    The best solution I've found is to override the width of your stage div in CSS to auto!important. Then, use media queries to resize your div, using the CSS zoom property (and scale transform for Firefox).
    /*  Example CSS for an Edge stage div of 800px width  */
    #MY-EDGE-STAGE-DIV{width:auto!important;max-width:800px;}
    @media screen and (min-width: 1px) and (max-width: 480px)
              #MY-EDGE-STAGE-DIV{zoom:0.5;-moz-transform: scale(0.5);}
    @media screen and (min-width: 481px) and (max-width: 600px)
              #MY-EDGE-STAGE-DIV{zoom:0.6;-moz-transform: scale(0.6);}
    @media screen and (min-width: 601px) and (max-width: 800px)
              #MY-EDGE-STAGE-DIV{zoom:0.8;-moz-transform: scale(0.8);}
    @media screen and (min-width: 801px) and (max-width: 50000px)
              #MY-EDGE-STAGE-DIV{zoom:1;-moz-transform: scale(1);}

  • Batch Resize/Scale

    I just downloaded the Photoshop CS4 trial to try something.
    I need to scale and resize images for use on our web site.
    Our images are not evenly proportioned, some are 400 x 400 or 400 x 200, ect.
    I would like to make them scale down to fit within a 240px x 240px image.
    We have thousands of images to do and 3 other sizes to scale the same images to.
    Can this be done using the batch automate and record the steps?
    Thanks

    Easier yet, use the Image Processor, either from Photoshop (File>Scripts>Image Processor) or from Bridge (Tools>Photoshop>Image Processor). Put 240 in both width and height of Image Processor dialog and it will constrain the longest dimension without changing the aspect ratio.

  • Accidentally create project 2560 x 1600 - is there an easy way to scale down...

    ...to optimal size for browser, say 1024 x ???.  IS there a scale tool like in AfterEffects...I hope/wish/pray?
    Thanks,  bill

    You can select and scale your objects. Group them together, then use Modify > Transform > Numeric Transform to scale or resize.
    Then you can trim excess canvas area from Modify > Canvas> Trim canvas.

  • How do I resize partitons?

    Ok i downloaded the yosemite beta a while ago, i looked up some post on google and tried  to get rid of the os and try to combine my partitions but from the past forums on here it seems that it still does not work, i still do not have a option to combine the partitions. I tried the terminal code "diskutil cs revert disk1" does not seem to work, I tried some apps through the app store still does not give me the option to combine "resize" back to one. Right now im back with 10.9.5 mavericks and deleted yosemite but it still shows the separate partition!

    In the Drop Zone inspector, you should find Pan and Scale parameters. Use the Scale to resize and Pan to position.

  • Scale nine for scalable components?

    Is there any way to make a scalable component use scale nine coordinates?  It seems that the only options for scaling are to tile or scale (stretch) the image/layer.  I'd love to specify the edges so they aren't distorted.
    Thanks!

    You will need to take your project into Flash Builder to create components that scale. Scale nine, resizable components, and constraint based sizing are not supported Flash Catalyst 1.0
    These were pretty big features to bite off for 1.0, so expect them in the next version.
    Ty

  • Rotated image overlaps other controls

    Hi, I am working on an AIR app involving images. One of the functionalities is viewing as well as rotating images. I made a simple test app to illustrate this portion:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
        <mx:Script>
            <![CDATA[
                private function rotate():void
                    var bitmap:Bitmap = Bitmap(img.content);
                    var matrix:Matrix = bitmap.transform.matrix;
                    var centerX:Number = bitmap.width/2;
                    var centerY:Number = bitmap.height/2;
                    matrix.translate(-centerX, -centerY);
                    matrix.rotate(90*Math.PI/180);
                    matrix.translate(centerY, centerX);
                    bitmap.transform.matrix = matrix;
            ]]>
        </mx:Script>
        <mx:Text width="100%" text="Some text"/>
        <mx:Image id="img" width="100%" height="100%" source="test.jpg" horizontalAlign="center" verticalAlign="middle"/>
        <mx:Button label="rotate 90" click="rotate()"/>
    </mx:WindowedApplication>
    The application window has text on the top and a button on the bottom, with the image in the middle. Each click of the button rotates the image by 90 degrees.
    On launch, the app works great. It fetches the image file and fits it to the Image container. As I resize the application, the image also resizes and maintains the position relative to the other controls. Top text and bottom button are where they should be. All good. Let's assume the image is landscape/wide. After I perform the rotate 90 degrees by clicking the button, although the image is rotated and now in portrait orientation, the bottom portion of the image is now out of the image boundary and overlapping the button.
    Is there a way to tell the image to fit the content to the container again? Basically, re-layout the whole thing as if the image is in this new orientation.
    I suppose I can try to figure out a change in scale and resize the image, but I am not sure if this will hold when the user resizes the application. Also, the rotated image is now rather far to the left, as the "top left" corner is where a landscape image would be. For a portait orientation that's centered horizontally, it should be further to the right. I suppose I can also come up with some formula to center the rotated image. It just seems that the application already has all this logic built in, as it did exactly what I wanted when the image was loaded initially. If I can just ask the application to do it again. Note that similar issue occurs if the image starts out in portrait orientation and is rotated to landscape (too far to the right).
    Thanks in advance for the help.
    Will

    Thanks Sheila and Arnis,
    Today I opened the project to try different zoom settings and the problem has vanished; I get the correct arrow at zooms of 100, 120 and 140%.
    Likely a bug somewhere deep in Frame's innards. Anyway we've ordered TCS3 so soon I'll be using FM10. Thanks anyway.
    --- Derek

  • Manipulation of the size of an image inserted into an Image Field

    Hi,
    I'm learning LiveCycle Designer ES 8.2 as I go. My apologies for the lengthy post but I'm trying to give you as much background as possible.
    I'm are trying to design a form that will allow us to automate data entry (by importing fields into our Access dbase instead doing the data entry by hand).  However, at the end of the day, I also need an electronic pdf file of the same form and a printed paper copy.  Things have been going well until working with the Image Field.
    The form is fairly complicated - 4 pages long.  We're collecting extensive data on specific locales (location, what was seen there, who did the work, etc). On one page, three different images (maps) are needed, each one showing different details on the site's location.  [Please note these images will not be imported into the database but must appear in the electronic pdf and on the paper copy.] The people who fill out the forms are expected to do so using Adobe Reader (the form will have extended rights so that they can save the data they enter on the form).  They would then email us the form as an xml file.  Once we receive the form, we have to add some additional information and then the finalized paper copy and electronic pdf would be made.  We have already done this successfully with much simpler forms, none of which have needed Image fields.
    Here's my problem - one of the three maps required is a standard 1:50000 scale topographic map which shows things like contour lines and latitude/longitude lines.   For accuracy and comparison reasons, having the standard 1:50000 scale is very important to us, so we can make absolutely certain the submitter has the right location.  If the dot plotted on the map is out just a few millimeters, we're looking at an error that represents 100s of meters on the ground.
    The current form exists in Word - we have never had any rules about the image formats used (jpg, gif, etc) or the resolution, as long as the image was clear.  The only rule was that the scale of the topographical map image HAD to be at 1:50000 scale.  This gets very tricky because Word will automatically mess with the physical appearance of the image, based on its resolution.  In most cases, the submitter simply readjusted the image within Word, stretching/resizing it manually until the scale was correct.  Another option was to use an image in the emf file format so that Word didn't readjust the image's appearance based on its resolution. Whatever method they used was fine by us, as long as the scale was correct.
    So far, after playing with all the "sizing" options of the Image field, along with embedding or not embedding the file, I do not see any way to control the physical size of the image. On our form, the three image fields are different sizes, with 2 of them being small (~2x3 inches) and the 3rd being large (~7x7 inches). Regardless of the settings I chose for each image field, the program simply resizes the topographic map whatever Image field it was inserted into,  making the same image appear physically smaller or larger at will.  I cannot correct the scale by resizing it, like I can in Word.   Instead, when I try to select the image, all I am asked is if I wish to insert another image.  Inserting an .emf file format into the field doesn't work - it only shows a blank screen instead of the image.
    Is there a way for the user to adjust the image's physical size in the form, after inserting it (like they can do in Word)?  Demanding that everyone use a standardized resolution or image format also seems highly unlikely to work - there are too many submitters and too many programs that can be used to make the image (some are making them using GIS programs, others are scanning the bought topographic print).  I'd appreciate any help you can give me on this.  I have had very little luck tracking down discussions on Image fields and how they work best within LiveCycle.  Any comments would be helpful!

    Hi,
    I have an example here that is intended to demonstrate the difference between Positioned and Flowed subforms: http://assure.ly/i8pSdy.
    This shows how you can use a slider to change the dimensions of the image object.
    I have extended this to an example with buttons to scale the image: http://assure.ly/i8ZI5Y
    This may not be fine enough for your purposes, but it may give you some ideas.
    Good luck,
    Niall
    Assure Dynamics

  • Liquid Layout - aspect ratio of background

    I am working on a new site with a liquid layout and I havent been able to find a way to keep the aspect ratio correct with the different sizes.
    I wish it was as simple as
    bgimg1._width = Stage.width;
    bgimg1._height = Stage.height;
    the image size im working with is 990x600 for a 1024 display.
    I would like the image to be centered and never to have empty area, so if it needs to it would strech past the sides. Any help is really appriecated.
    Thanks,
    Randy

    when you create the symbol, make sure that 0,0 is not the top left, but the center.  for example in your case, the location of this image symbol would be -495 for x, and -300 for y coordinates.
    Now that the image symbol is centered for itself, it is now time to center it on the stage.  You can do that be finding out the center of the stage which is half of that.
    Now you can set the coordinates of the symbol equal to the center of stage.
    example, myPic.x = Stage.width/2.
    Great, the symbol is now always centered.  But how to make it scale?  It depends on how you want it to scale.  Scale when resizing the webpage, or just scale to fit once?
    If it is just to scale to fit once, you can just play with the values until it fills the screen by setting myPic.scaleX = 1.2; //or greater. Have to do scaleY too.
    If you are trying to make the background scale dynamically, you would first need to create a listener that will detect the change of the stage.
    Inside that change handler, you can set the scale of the symbol based on how much the stage has changed.  The stage would only change if the html wrapped around it is set to scale.
    Hope this helps.

  • Can I increase the page size in an existing PDF?

    We have a PDF of a CAD drawing from a consultant.  The problem is, the page size is letter, and we need it to be tabloid to accommodate a section of General Notes and a Cost Estimate table.  We would rather not go back to the consultant both from a cost standpoint and from a time standpoint.
    Is it possible to increase the page size within the PDF so that I have some blank space at top or bottom for the needed blocks?
    I am using Adobe Acrobat X Pro.
    Thanks!

    Hi Mamie ,
    Please refer to the following kb document and see if this helps.
    https://helpx.adobe.com/acrobat/kb/scale-or-resize-printed-pages.html
    Let us know how it goes.
    Regards
    Sukrit Dhingra

  • Making my header background image scaleable using fluid grid layout

    I'm sorry I dont really know how to post a link to this site (its not online just on my laptop) But really all I have is a blank screen I just started trying to build this responsive site (the site I was building wasn't responsive so i had to start over so thats where I'm at. I started a new fluid grid layout in dreamweaver cc I use 24 collums at 100%. I deleted the the div (but not the grid container one) . First is that I'm trying to build a header using the fluid grid layout (my laptop screen is 1920 px wide so I use the full screen because I want my site to take up a users full screen). The issue is when I use a image thats 1920 px width for a header background it test great in the browers meaning it scales correct but when I check it out in the smartphone and tablet preview options within dreamweaver cc the image is chop off. How do I get the image and really the rest of the site to scale and resize correctly not just in full screen for my pc but for tablets smartphones and anyones computer? I'm baffled please help? I hope I'm being clear if not I'll try again I need your help thank you

    Try to keep responses in the original thread, it keeps replies from getting confused.
    http://forums.adobe.com/thread/1430668?tstart=0

  • HELP MEE....SOMBODY

    NEED HELP ...
    PLEASE USE BASIC ENGLISH NOT SPACE SHIP CHAT'TER..........
    HOW DOO I MAKE MY PICTURE IN PICTURE VIDEO IMAGE SHAPE INTO A RETANGLE SHAPE NOT SQUARE SHAPE.
    I DO NOT WANT-IT TO BE A PERFECT SQUARE SHAPE.
    I LIKE TO STRENCH THE IMAGE ACROSS THE TOP OR LOWER PAGE.
    THEN ADD A SECOND DIFFERENT VIDEO IMAGE BELOW THE TOP IMAGE.
    EACH TIME I CLICK THE BOX IMAGE I HAVE NOW TO PUT CURSOR ON THE ICON ARROWS THE IMAGE ONLY GOES FROM LARGE OR SMALL PERFECT SQUARE.
    MY GOAL IS TO HAVE A TOP VIDOE OF THE NARATOR,WHILE THE LOWER ELONGATE STRENCH IMAGE SHOWS THE EVENT OF SPORTS OR BIRTHDAY IN THE BEGINNING OF VIDEO TO PROVIDE THE VIEWER A CAPTION PREVIEW SO THAT BOTH STRENCH IMAGES TOP AND BOTTOM COMPLETE THE FIELD
    HELP
    IM IN WASH DC............A.K.A........................N-WASHDC

    Charles,
    Welcome to the forum.
    Unfortunately, you posted into the Tips & Tricks sub-forum, with is a repository for articles on how to do things better, more efficiently, or to just give tips. Steve G. will probably move this post out to the main forum, where many more folk will see it and can answer your question.
    In the meantime, let me give you some instructions and also a link to a tutorial on doing what you want to do:
    You will want to use Track Matte Keying to get your PiP in the shape and position, that you need. This is a process of limiting the image in your second video, let's call it "Clip B" for this example. Start with your "background" video, Clip A, on your Video Track 1. Drag your Clip B to Video Track 2, above Video Track 1. At this point, Clip B covers up Clip A - obviously not what you want.
    In the Effects Panel, there is an Effect, Track Matte Keying. This allows one to create a "window" to view Clip B through, and limit Clip B to a set area. Now, open up Titler, and create a Shape the size that you want this "window" to be, and drag it to the position that you wish Clip B to show through. Make this Shape a white Fill, with no Stroke. It will be a white rectangle on a black field. Drag this Title to Video Track 3, above your Clip A and Clip B,and then drag the Tail of this Title to extend the full Duration (length) of your Clip A and Clip B. AT this point, you'll only see this white rectangle over Clip B. Don't worry, we're going to address that next.
    Now, I'd go to Clip B and in the Effects Panel, choose Edit Effects, choosing the Fixed Effect Motion>Scale to resize Clip B, so that it fits about the rectangle on your Title, and then use Motion>Position to place this resized Clip B, to be under that rectangle. In the Effects Panel, find Track Matte Keying (Hint: there is an active Search box, and if you type "track" it will locate Track Matte Keying. Drag that Effect to Clip B. Choose Edit Effects and open up Track Matte Keying Effect. In the dialog box, link to your Title on Video Track 3. Choose Alpha, and then hit Enter to Render this footage. Play and see how well you got Clip B positioned and resized. If you need to alter either the Motion>Scale, or the Motion>Position, turn off Track Matte Keying on Clip B, resize/reposition, as is needed, then turn Track Matte Keying back on.
    If you need to resize your rectangle, you can do that by Dbl-clicking on it in Video Track 3, and manipulate it in Titler. If you choose the Selection Tool (Arrow), you can click that rectangle and you'll get the Bounding Box with Handles. Drag the Handles to resize, or click in the middle to reposition that rectangle.
    Here's a tutorial featuring Track Matte Keying. It's build around softening skin tones on a young lady, so there are steps that you will not use, but it gives you a good idea of the workings of Track Matte Keying and how the Timeline looks. Just imagine that instead of a blurred duplicate of Clip A, you're doing the PiP with Clip B through the Track Matte Keying.
    Note that the beauty of Track Matte Keying is that you can soften the edges of the window, just by adding a Blur Effect to that Title (your Track Matte).
    One can also apply the Crop Effect to Clip B, use Motion>Scale and Motion>Position, to do the same thing, but you will get a hard edge. If that is not an issue, then this would be the easiest way to go about your editing. Simple, but with far less in the way of control.
    Good luck,
    Hunt

Maybe you are looking for

  • What are the steps to share photos in iOS 8

    Shared Photostreams worked in iOS 7 but the invitations aren't sending now, with one exception. Also the phone won't send attachments via email - only text - so not sure if current problem is pilot error or the phone itself. Thus I'd like to get the

  • Suppress select audio frequency

    I have an old cassette tape-recording, recorded from the BBC radio.  I have recorded it in garageband, but the original recording had a high-pitched whistle, caused, I think, by noise from a nearby TV.  Many people would remember that annoying whistl

  • Enable paywall for free folios

    The social sharing feature is great; especially the ability to share to someone without an iPad. Currently we cannot set a paywall for our magazines because they are free. To be able to use social sharing to increase our download numbers would be jus

  • InDesign Help Menu open every time app is selected

    Hey guys, I have this ridiculous problem that just started today: Every time I "⌘(command)+tab" from another app into InDesign, the "help menu" opens up... and it does it every time!!! So let's say I ⌘+tab from word to in design. Once indesign opens

  • Restoring "lost" to my itunes library

    Getting this error message for many songs in my iTunes library on my iMac.The song XXX could not be used because the original file could not  be found. Would you like to locate it?