LoadMovie (swf) scaling problem...

I have a movieClip for loading external pictures or SWF files
that's works just fine - unless the loaded SWF has an object that
is located or moves off the stage (it's original stage - the one
the loaded SWF was published with). The movieClip rescales the SWF
to keep the object in view. For example, if a line of text starts
off-stage left and is tweened to off-stage right, the movieClip
will zoom in, then out, to keep it displayed.
While this may one day be a nifty effect to play with, it's
not what I intended.
I've tried using this in the loaded SWF:
Stage.scaleMode = "noScale";
and this in the loading movie:
myMovieClip._lockRoot = true;
Thinking this would prevent the loaded SWF from scaling (and
to make sure the loading movie didn't think I was telling *it* to
stop scaling...), but that didn't work. I tried to rework the
loaded SWF so that nothing actually left the stage, but the effect
doesn't work with text or bitmap images (they skew) and the
animation gets a bit jumpy. I'd like to avoid converting it to an
animated GIF or movie, since GIFs don't animate and I'm concerned
about file size (and I'd like to able to allow for SWFs that may do
things those simply can't do).
I'd also like to keep it a movieClip, since I want it to be
able to still accept images.
I'm pretty sure there's an easy answer to this - maybe I just
screwed up with my placement of the code above (in the loaded SWF,
it's the first line of actionscript to run; Scene 1, frame 1 -- in
the movieClip movie, it's the line right after the movieClip is
created with createEmptyMovieClip and right before the SWF is
passed to it).
So, is there a way to prevent a movieClip from resizing a
loaded SWF that contains elements off-stage?

Okay, first, let me say, I completely forgot to move the
loading movieClip's registration mark to the top-left corner; when
I did that, it stopped the wierd scaling when the objects were
off-stage top and left.
I then tried masking as you suggested, and it did work, sort
of - the area where the mask covered the right and bottom still
showed, at least the mask did (which surrounded, but was not on,
the stage). The result was a little version of the loaded SWF,
surrounded by a border right-and-bottom.
That's when I realized that flash ignores the stage
completely with loaded SWFs. Yeah, I know, I should have got that
when I had to replace the background color with a rectangle on a
bottom layer.
It then struck me exactly what I did wrong - the function
that resizes the SWF to match the loading movieClip's size was
still looping (all it did was check to make sure the loaded SWF was
completely downloaded, then size it), and when things went off
stage, they were taken into account everytime. I setup a flag that
indicates whether or not an image or SWF has been loaded and sized.
That fixed it.
That's what I get for writing actionscript at 3 in the
morning.
I'm not sure if this will still work for symbols that start
off-stage right or bottom (the registration mark prevents them from
showing left and top regardless of the resizing). A single starting
blank frame should fix that, though.
Thanks for your help - I was ready to give up and stick with
static images.

Similar Messages

  • SWF scaling problems in a Portfolio

    How do I get a SWF to scale properly in my Acrobat 9.x portfolio home page? Objects don't seem to keep their relative proportions/composition when the window is resized.

    DaJoDa,
    Could you please give me more specifics so i can answer your question?
    LuSeeMoo

  • Image scaling problem with object handles

    Hi,
    I am facing scaling problem.I am using custom actionscript component called editImage.EditImage consists imageHolder a flexsprite which holds
    image.Edit Image component is uing object handles to resize the image.I am applying mask to the base image which is loaded into imageholder.
    My requirement is when I scale the editImage only the mask image should be scaled not the base image.To achieve this I am using Invert matix .With this
    the base image is not scaled but it  is zoomed to its original size.But the base image should not zoomed and it should fit to the imageholder size always. When I scale the editImage only the mask image should scale.How to solve this.Please help .
    With thanks,
    Srinivas

    Hi Viki,
    I am scaling the mask image which is attached to imageHolder.When i  scale
    the image both the images are scaled.
    If u have time to find the below link:
    http://fainducomponents.s3.amazonaws.com/EditImageExample03.html
    u work with this component by masking the editImage.If u find any solution
    for scale only mask ,plz share the same.
    thanks,
    Srinivas

  • Action when "loadmovie" swf clip finishes

    Hi,
    I am a fledgling flash designer. I am moving on nicely with
    the program but I am stuck on one particular task, I was hoping
    that someone may be able to help me.
    I have a container movie which is a menu. That menu loads a
    buffered audio player movie into a target named "jukebox" that is a
    movie in itself with its place controls. Everything works 100%.
    Great. Except :-)
    I would like the jukebox movie to "know" when the loadmovie
    swf has finished so it can advance. At the moment if I dont place
    stop commands and user control buttons to move around the jukebox
    movie the jukebox just loads one then the other, it obviously
    doesnt wait until the loaded movie .swf has finished.
    I suspect it may be a case of making the individual loaded
    swf.s declare a variable which is equal to the frame its playing
    and then passing that variable off into the main movie and when if
    that variable total = complete frames then move to next movie...
    But being a novice I lack the script knowledge..
    Can anyone help?
    TIA :-)
    J

    if you're loading into bo_mc, you can't control where your
    loading image is going to be positioned inside bo_mc: the top left
    of your loading image will be placed at the center of bo_mc and
    there's no way to change that.
    and your container movieclip (bo_mc) may, and probably
    should, be an empty movieclip with 0 width and 0 height. so,
    centering within bo_mc, in that situation, makes no sense.
    and the only way to control the position of your loaded image
    is to control the position of bo_mc or one if its ancestors.
    so, you're more clear but you can't do what you're thinking.
    you can't keep the mc (bo_mc) static and center the loaded jpg.
    you can load into bo_mc and then position bo_mc so it's
    centered with respect to the stage or any other movieclip on-stage.
    that way your image will be centered.

  • HELP PLEASE - loading external swf scale problem

    I have a Flex 3 Actionscript Project. Basically all it does it take some flash vars, set the sound volume,  and load an external swf using a loader and add the loader as a child. The problem is I want the loaded external swf to be scaled to fill the entire stage, even if it distorts it, and that doesn't seem to be happening.
    I really need to resolve this. ANY HELP APPRECIATED.
    Marcus

    Thanks for the reply!
    Here's basically what my code looks like (note: I cut some stuff out that wasn't relevant for the sake of clarity).
    private var swfLoader:Loader = null;
    public function MySwfContainer()  
        stage.scaleMode = StageScaleMode.EXACT_FIT;
        stage.align = StageAlign.TOP_LEFT;
        var request:URLRequest = new URLRequest(swfUrl);
        swfLoader = new Loader();
        swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,SWFLoader_Complete);
        swfLoader.load(request);       
    private function SWFLoader_Complete(event:Event):void
        addChild(swfLoader);
    What I am observing is that if a swf larger than the stage area is loaded it clips it rather than scale it down and make it fit.
    Marcus

  • Scaling Problems

    I have a action script 3 project in flex 2 and I am seeing
    some sort of auto scaling that is causing me grief. This is a pure
    actionscript project. In my main class i have a background added
    and the background image size is the exact same size as the flash
    window(700x500). This is specified in the html that launches the
    swf.
    The problem is that the image is being stretched such that a
    large portion of it is off the bottom of the window. Using screen
    capture, i was able to confirm that the visible area is 700x500. If
    i add a component thats 50 in height, and screen cap it, it ends up
    being more like 80 in height.
    What i really want is a 1 for 1 pixel representation, or for
    it to scale to fit whats in the html, such that there is never
    anything cut off.
    If anyone has any ideas how this might be happening I would
    love to hear it.

    stage.scaleMode=StageScaleMode.NO_SCALE; did the
    trick.

  • How to can I add a close button within a loadmovie swf

    I made a list of words, which are links. When you rollover the text it loads a graphic with definitions to the lists of words. I made the (graphic with definitions) a "swf" and I used the loadmovie script to load the swf.
    I added a button within the swf, to close the swf, and used the unload movie script to close the swf.
    Here's the problem, the swf loads but when I try to close the swf by using the button, nothing happens.
    Is this because I added the button within the swf. Or better yet, what script should I use to close the swf. I using AS2.
    thanks for any help

    For the button's unloading code try using:
    unloadMovie(this);
    Or
    _parent.unloadMovie(this);

  • Macbook to Hdtv scaling problems

    Hi there!
    I have a macbook 2008 alumiinium 2.4ghz model. I am trying to connect it to my HDTV. I bought a miniDP to HDMI and connected to my tv and it works great. The picture fits the tv perfectly, however even though it fits the screen I was wanting to use the bigger screen to work on Logic Pro as a 13in screen is a bit of a pain at times. The problem is that so far my macbook screen it being stretched to fit the 42in tv screen so I don't actually get any extra space as my screen just looks bigger!
    Any suggestions on setting to fix this? I have an LG television if that helps. I cant for the life of my figure how to get it to work. The picture on my tv is really sharp and great but its just scaling up everything on my mac when what I really want is to be able to use that extra screen real estate for my logic pro projects!!!
    Cheers in advance!
    Tom

    There is a chance that your MDP to HDMI adapter is not working properly with audio. I had that problem with one that I had bought. I tried a newer one and the sound came through with no problems.
    The only thing I would suggest (before buying a new adapter) is, try a different HDMI cable... if you have one. That way you can rule out that as being the problem.

  • SWF Viewing problem - Web Galleries?

    Hi there,
    I am entirely new to this – I’m using Dreamweaver MX and use Abobe Bridge CS2.
    My questions are;
    1 – I have created a Web Gallery in Adobe, and then placed the swf file into a Dreamweaver page, my problem is this – the file works ok in design mode when I test it, but when I ‘proof’ it in explorer 8 it fails to appear, just a blank white box….i have examined the link to the file in Dreamweaver and believe the link to be ok after having read on here about this possibility, but I’m not so sure – so the code for the page is as follows….
    2 – Will I be able to create multiple galleries?, if so how can I do this (as I’m a photographer and wish to display different aspects to my work on different pages)
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="600" height="600">
          <param name="movie" value="Gallery%20One/gallery.swf">
          <param name=quality value=high>
          <embed src="Gallery%20One/gallery.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="600"></embed>
        </object>
    Many Thanks in advance – and forgive the dumbness or any misunderstanding on the more technical aspects, as I said I’m beginner in these things!.
    Reagards,
    JB

    .htaccess first assumes you're on an Apache server. Are you?
    To make the file, create a text file with the single line of text recommended above. Use Notepad or Text Edit -- a program that will save a simple text file (don't use Word). Save it on your computer and call it anything you want. If you name it .htaccess on your local machine and you're using a Mac, it will disappear (because any file name that starts with a period on UNIX is invisible).
    Upload the file you made to your server. You can put it in your root directory because .htaccess files affect the directory they're in and all directories below it.
    Rename the file .htaccess on the server.
    You're done.

  • SWF in SWF sound problem

    Hi, I made a preloader, witch is a SWF file with a progress
    bar and a container, in this container will be loaded the page SWF
    witch is a flash presentation, my problem is that the page SWF has
    sounds for buttons over state, and if I run the SWF it works, but
    if it's loaded by the preloader I have no sound anymore. Any
    suggestions anyone ?

    Man, you`re fast!
    And all over the place, it seems... For years now, whenever I look for solutions to my Flash problems, at least some of the answers are from you!
    Just wanted to say thanks and that I eventually found this same answer from you on another post here on the forums, and it solved my problem.
    So, thanks Kglad!

  • AS2 stage Scaling Problem

    Hi..
    I'm Ajanthan.. I work for a e-learning concern. Now i had a problem. I have developed the entire module with 800x600 Resolution.
    But Now I got an issue that i need to reduce the content area (Shrink the contents instead of changing the resolution). Because some one had developed the custom player that will affect some of the margins of the content.
    Is there any AS2 script is avail for scaling the entire stage to 80 % of its original size for the entire module... If so Please help me in this...
    Thank you..
    Ajanthan M

    or take the as2 v-cam from the internet and put it in your flash on a new layer, and scale the vcam +20% of the stage size.

  • Simple SWF File problems

    Hello all, im trying to create a very simple swf file, but have come  across some problems.
    The file i want to create is very much like this - http://davidtest.webcastglobal.com/swf2/flash.swf
    This swf allows me to import it into Flex, and control which frame is  being viewed.
    I achieve this using a app that can be found here -
    http://davidtest.webcastglobal.com/swf2/Main.html
    When you press Next or Previous, it jumps forward or backward a frame.
    Now i want to create a swf file like the ball file, although it will  just contain a series of images, 5 for example.
    I tried creating such a file in Flash, using both AS2 and AS3.
    I created a project with 5 frames, and put an image on each frame,  i  then put the "stop();" tag on each frame.
    When i imported it into my flex app, flex cudnt communicate with it.
    So the ball flash file has been made in a different way ?
    Can anyone shed some light on the situation please?

    Can no one help me on this ?

  • Interactive document exported as swf navigation problems

    I created an interactive document, exported as a swf file. Each page has an animation build, text fade in, images slide in etc. When I navigate to the next page, it displays the completed build, reloads and plays the animated build. When I navigate to the next page it does the same thing again. I want to be able to navigate to a page and view the animation from the beginning not see the completed animation first. Any ideas what could be the problem?

    It´s a bug. Start your animation from outside of the page area or if you have to start it from some visible place, create a mask that covers your animation´s starting point. Then use a timing panel to start your animation by fading the mask away, then proceed to the actual animation. If you have white background in your page, mask can be a simple white rectangle.

  • Scrollable frame scaling problems

    Hello all,
    Having a funny problem I've never encountered before. I've got the usual set-up for a scrollable frame ( content / content frame ) I've grouped it all together and then when I paste it into the content frame it either scales itself down and then when I tried it again it scaled itself up. The content in question is a combination of picture and text. Anyone encountered this before? Any solutions? The only solution I found was to copy an old scrollable box box from an old page.
    As always any help is much appreciated.

    Right click the frame and choose Fitting > Frame Fitting Options. Deselect Auto-Fit:

  • HTMLLoader loading local content (SWF files) problem

    Hello guys,
    I'm just finishing my application but I facing a problem.
    I'm currently developing a desktop application using AIR.
    I'm using HTMLLoader to load local SWF files when te user tries to access specific content on the application.
    I successfully accomplished this, but the loaded SWF also loads other files (assets and xml files with translations) and that is not working.
    When a SWF is loaded he just stops on his own loading screen (when loading the XML files).
    All this stuff is happening on my CustomNativeWindow:
    (my CustomNativeWindow "overlays" the main application)
    public function CustomNativeWindow()
             var nativeWindowInitOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
             nativeWindowInitOptions.systemChrome = NativeWindowSystemChrome.NONE;
             nativeWindowInitOptions.renderMode = NativeWindowRenderMode.DIRECT;
             nativeWindowInitOptions.resizable = false;
             nativeWindowInitOptions.maximizable = false;
             nativeWindowInitOptions.minimizable = false;
             super(nativeWindowInitOptions);
             alwaysInFront = true;
             this.activate();
    public function setProperties(contentName:String, contentURL:String, posX:Number, posY:Number, stageWidth:Number, stageHeight:Number):void
              this.stageHeight = stageHeight;
              this.stageWidth = stageWidth;
              this.contentURL = contentURL;
              this.contentName = contentName;
              this.x = posX;
              this.y = posY;
              this.width = stageWidth;
              this.height = stageHeight;
              this.title = contentName;
              this.addEventListener(Event.RESIZE, onWindowResize);
              SWFHTMLLoader();
    private function SWFHTMLLoader():void
              //REQUEST LOAD URL
              var request:URLRequest = new URLRequest(contentURL);
              //HTML LOADER SWF
              htmlLoader  = new HTMLLoader();
              htmlLoader.width = stageWidth;
              htmlLoader.height = stageHeight;
              htmlLoader.addEventListener(Event.COMPLETE, onHtmlLoaderComplete);
              htmlLoader.load(request);
              stage.addChild(htmlLoader);
    private function onHtmlLoaderComplete(e:Event):void
              trace("NATIVE WINDOW HTMLLoader complete");
              onWindowResize();
    private function onWindowResize(e:Event = null):void
              if (htmlLoader)
                        htmlLoader.width = stage.stageWidth;
                        htmlLoader.height = stage.stageHeight;
    Probably something related to security?
    How can I fix this?
    Is kinda urgente... deadline is coming...
    Thank you!

    Thank you kglad for your fast response...
    The reference to the content comes from a XML loaded on the main application.
    var xml:XML =      <Content  en="game" >
                                      <ImageSource>assets/images/gallery/resources/gameone.png</ImageSource>
                                      <ContentSource>content/gameone/gameone.swf</ContentSource>
                                </Content>;
    contentURL = xml.ContentSource;
    So contentURL is: content/gameone/gameone.swf
    Am I in trouble?

Maybe you are looking for

  • Reg., Adapter Queries

    Hi Experts, Can someone please answer the following queries? 1. Explain about what are the ‘Type A’ and ‘Type B’ Adapters? 2. From the following adapters, please categorize the adapters with respect to the type of the communication they perform (like

  • Using a whole iPhoto Album as screensaver

    Until last evening, besides all the built-in screensavers supplied by Apple, all my iPhoto albums were available as screensavers by going to the Apple icon, choosing System Preferences and selecting the "Desktop & Screensaver" icon. Last night I adde

  • Faq bad link.

    Is this supposed to work? http://forums.adobe.com/message/3844126#3844126 It's the FAQ to how to submit feature requests.  Telling that it's  a broken link.

  • Condition type authorise

    Hi i need to hide a condition type in pricing procedure ., only authorised person to see the particular conditon type in sales order pricing , i have PR00 which all end user can enter ., another condition type ZDISfor distributor price is there but u

  • Cannot add HP Deskjet 3940

    Yesterday I bought an HP Deskjet 3940, which allegedly works until Tiger. The driver install seems to work fine. I then go to the Printer Setup utility and try to add the printer. It shows up on the list as 'Deskjet 3900', with the correct driver (De