Loading swf into swf in exact position

It's very simple to load an external swf into a main swf with
loadMovieNum("name.swf", 50);
But how do I control the position of the loaded swf?
Currently it just pops in the top left.

Try loading your external .swf into a pre-positioned
movieClip, for example myMovie.loadMovie("name.swf). If you do not
want to do this you can position the loaded movie later in your
application or onload by setting the x and y pos with some
AS.

Similar Messages

  • Load .swf into .swf with linked .flv

    Hi all,
    I'm trying to load swf-2 into swf-1, with swf-2 externally
    loading an .flv.
    When I go straight to swf-2, it works fine. And when I embed
    the flv in swf-2, and open swf-1, it works fine.
    It's only an issue when swf-2 is pulling the EXTERNAL flv.
    Any ideas?
    Thank you,
    Tracy

    are the files all in the same directory? if you load a swf 2
    in a swf 1, then the code used by swf2 to load the flv file would
    be executed as if the code was executed from swf 1 location. is swf
    2 and the flv in a different folder from swf 1?

  • Loading Text into SWF

    Hello Everyone,
    I wonder if anyone could help?
    I have a SWF with multiple dynamic text fields. I want to
    load in the contents of ONE text file into the five or so fields at
    the touch of a button. Can anyone advise on how to set up a XML or
    TXT file and the Action Script to allow this to happen?
    Any advice or pointers in the right direction would be
    greatly appreciated.
    Darren.

    Couple of quick questions... For the Textfields:
    a)Do you have the textfields already on stage (in other words
    your "5 or so" comment in your first post is fixed to the number of
    textfields you put on stage). If so, what the names of the
    textfields and in what scope (e.g. main timeline or inside a clip
    called "textHolder" etc.
    b)Or do you want them created dynamically by code? If they
    are to be created dynamically by code, are they to be placed in
    fixed (scattered) locations or is there a pattern - e.g. are evenly
    spaced? If the positions are fixed and do not fall into pattern...
    then what are they (in sequence) or if they are in a layout pattern
    please describe it.

  • Dynamically loading text into SWF

    I'm building a flash web site and here are a couple parts of
    the site the client is going to want to update regularly. Is there
    a simple way that I can have an external file (XML?) that a client
    can edit to update parts of the site without having to re-export
    the swf or involve me, without getting into any real heavy
    scripting?
    Anything you can do to get me pointed in the right direction
    would be greatly appreciated.
    Thanks in advance.

    Couple of quick questions... For the Textfields:
    a)Do you have the textfields already on stage (in other words
    your "5 or so" comment in your first post is fixed to the number of
    textfields you put on stage). If so, what the names of the
    textfields and in what scope (e.g. main timeline or inside a clip
    called "textHolder" etc.
    b)Or do you want them created dynamically by code? If they
    are to be created dynamically by code, are they to be placed in
    fixed (scattered) locations or is there a pattern - e.g. are evenly
    spaced? If the positions are fixed and do not fall into pattern...
    then what are they (in sequence) or if they are in a layout pattern
    please describe it.

  • Loading PDFs into swf dynamically

    Is it possible  to load a PDF into a flash app dynamically, much like you can with a jpg?
    I know FlashPaper is available, but that doesnt do anything as far as allowing for dynamic loading if you need to load PDF dynamically
    I need to load pdfs dynamically and get displayed after converted within  Flash Player
    Any Solution ?
    Thanks

    Couple of quick questions... For the Textfields:
    a)Do you have the textfields already on stage (in other words
    your "5 or so" comment in your first post is fixed to the number of
    textfields you put on stage). If so, what the names of the
    textfields and in what scope (e.g. main timeline or inside a clip
    called "textHolder" etc.
    b)Or do you want them created dynamically by code? If they
    are to be created dynamically by code, are they to be placed in
    fixed (scattered) locations or is there a pattern - e.g. are evenly
    spaced? If the positions are fixed and do not fall into pattern...
    then what are they (in sequence) or if they are in a layout pattern
    please describe it.

  • .swf being able to load contents into it issue.  Please help?

    Hi there,
    I have strange situation regarding flash that I can't figure out.  I have a flash .swf file that is intended to load .flv video files into them at the local root level.
    I have been able to do this on my own server, but the .swf and the .flv videos are now located on the media streaming server, and the .swf is able to show up on it's own when embedded onto my page (on MY server), but it's not being able to load the video files.  I am perplexed because the videos are structured in the same EXACT way that it was being done on my server, but they will not load onto my .swf as they were doing when they were on my server.
    For example, one of the videos is loaded by using this convention in my actionscript:
    var file = "videos/Bob_Peebler.flv";
    So, on my media hosting service, I've loaded the .swf file on the local root, and the videos are placed in the same exact directory structure as they were done on my server.  In the example above, the  "bob_peebler.flv" is located inside the videos folder, and the videos folder is on the same level as the .swf
    In my flash file, I've thought that the var needs to point to the actual URL of the flash file, so I've then typed out the URL of the flash video, but I still can't seem to get it to work.
    var file = "http://iongeo.fileburst.com/videos/Bob_Peebler.flv";
    Here is where the .swf can be located to get a better sense of what I am trying to accomplish.
    http://iongeo.fileburst.com/ChannelGuide_Features.swf
    Please let me know if I can clarify on something better.
    I would really appreciate any kind of assistance that could be provided.
    Thank you

    Hello
    On my flash, I already have those parameters in place.
    I don't think there would be any security issues however, since I have used a player .swf which loads from the media site and plays the videos without a problem.
    http://www.iongeo.com/channelguide_test_dev/
    click on the four images at the bottom of the screen to see how it works.
    Now, I am pretty much doing the same thing, but this time embedding the other swf to load the videos.  As I mentioned, I was able to do this when everything was on our server, but now there is an issue for some reason when I try to load the .flv into the .swf from the other media server.

  • Loading SWF into level and setting height/width/location?

    Hi folks, I am an old AS2 guy who gave up on Flash heavy coding when it switched to AS3. Always thought it was less intuitive, longer, and a brand new language and I got tired of trying to keep up when most of my clients did not want to pay for a full flash site. But I got this client...
    Here's the problem, I can load a swf into my main stage or into an MC , but I cannot find out anywhere how to set parameters or load into a level so it doesn't replace the current material or fix to a size that doesn't block my other material.
    I've gotten this far:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    loadGallery();
    function loadGallery():void
    var l:Loader = new Loader();
    var req:URLRequest = new URLRequest("shortstack.swf");
    l.load(req);
    l.contentLoaderInfo.addEventListener(Event.INIT, galleryLoaded);
    function galleryLoaded(e:Event):void
    addChild(e.target.loader);
    What i want to do is load shortstack.swf into level 5, say, and fix it to the bottom left corner of the stage, and set its height to 400px and width to 980. 
    I have a an MC on the stage at those exact dimensions called placeholderMC, but I cannot figure out a way to target it, and the tutorials I've read have to do with loading on CLICK (I want it to load on enterFrame), and none of them tell me how to set parameters, as I could in old AS2.
    FWIW, AS3 may be more powerful, but AS2 was easier to understand.
    TIA,
    Jeff

    http://www.adobe.com/devnet/flash/quickstart/display_list_programming_as3.html

  • Load swf into RAM via an asset manager

    Hi.
    I have an AS3 virtual world and we are continually loading external resources such as swfs and sounds.
    A few of my menu screens that take a damn long time to load. Read a tut that said we should load them into RAM using an asset manager.
    I'm assuning the asset manager is simply a Class used specifically for loading and unloading graphics, swfs and sounds. So the important part to ask is:
    What do they mean by loading into RAM.
    I thought all swfs were automatically loaded into RAM ie: cached or in the flash player cache or the browser cache. Or do I have to do it specifically myself with some code. We are importing external files so we thought that was a great idea as they are shared by many games.
    btw: RSLs I have read about but I don't understand. I thought my externally loaded files were RSLs (runtime shared libraries) or would I have to do some physical coding do convert them into RSLs.
    This is so important because I am not very experienced but I am getting a lot better due to help receied in this forum and my current programmer is leaving me. I have been studying up on As3 and design patterns and I understand basic coding a lot better now.
    CHEERS
    EDIT: Just read that I am using a http call. - I use urlloader - well that's what you use isn't it or how would you load an external swf. Just read that you can hold the swf as a variable which loads it in RAM and therefore will be available immediately. Know I don't understand anything as I have never read that anywhere.

    Hi Andrei, nice to see you around here.
    Well, somebody helping me says that normally we make a http request with urlLoader to the server and that is what was happening each time. We weren't getting the cached swf. (that bit I don't understand and doesn't sound right - anyway...)
    So he says if we create a dictionary class to hold that swf then the next time we make a request we will get the movie from there and not from the server.
    I have highlighted the main parts of code below.
    What I don't understand about all this is that I have never seen anything like this in my life. I have read extensively and read all about loading external files and using this type of asset manager with the dictionary class does not ring a bell and goole comes up with nothing.
    I hunch is that as you say, we are doing something wrong somewhere because the only way to get an external file is via urlLoader to the server the first time and then the second time it should look for it cached on our computer is that right? Or when we make the urlLoader request how does it know to look on our computer first before going to the server or are these innner workings of the flash player I know nothing about. This is so important as when I get 10 kids on the computers they wait for as long as 5 minutes for movies that have already been downloaded many times before.
    Cheers in advance.
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        public class AssetLoader extends Loader
            private var _assetName:String;
            public function AssetLoader()
                super();
            public function get assetName():String
                return _assetName;
            public function set assetName(value:String):void
                _assetName = value;
    The asset manager loading class
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.utils.Dictionary;
        public class AssetManager extends Sprite
            public static const ASSET_LOADED:String = "assetLoaded";
            private static var _instance:AssetManager;
            private var _assetsLoaded:Dictionary = new Dictionary();
            private var _assetsBeingLoaded:Dictionary = new Dictionary();
            public function AssetManager(pvt:SingletonEnforcer)
             * loads and asset and keeps a reference to the loaded content
             * @param name
             * @return null if the asset is not loaded yet
           public function loadAsset(name:String):MovieClip
                var asset:MovieClip;
                if (_assetsLoaded[name])
                    asset = _assetsLoaded[name];
                else if (_assetsBeingLoaded[name] == null)
                    var skinloader:AssetLoader = new AssetLoader();
                    skinloader.assetName = name;
                    skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    skinloader.load(new URLRequest(name));
                    _assetsBeingLoaded[name] = true;
                return asset;
            protected function loadCompleteF(e:Event):void
                var skin:MovieClip = e.target.content as MovieClip;
                var name:String = ((e.target as LoaderInfo).loader as AssetLoader).assetName;
                _assetsLoaded[name] = skin;
                delete _assetsBeingLoaded[name];
                dispatchEvent(new Event(ASSET_LOADED));
             * gets an instance of the class
             * @return
            public static function get instance():AssetManager
                if (_instance == null)
                    _instance = new AssetManager(new SingletonEnforcer());
                return _instance;
    internal class SingletonEnforcer
    The function inside a class called Screen which is used by menus classes to load their swf menus.
    protected function loadSkin(path:String = null):void
                trace("skin to load: " + path);
                Home.instance.addPreloaderF();
                _path = path + Home.instance.cacheString;
                if (_usingAssetManager)
                    loadSkinFromAssetManager();
                else
                    if (_skinloader.content)
                        _skinloader.unloadAndStop(true);
                    _skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    _skinloader.load(new URLRequest(_path));
            protected function loadSkinFromAssetManager(e:Event = null):void
                _skin = AssetManager.instance.loadAsset(_path);
                //if no skin we have to wait to be loaded it
                if (_skin == null)
                    AssetManager.instance.addEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                else
                    AssetManager.instance.removeEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                    loadCompleteF(null);

  • How can I load an external SWF into a movie clip that's inside other movie clip?

    Hi.
    I creating my first flash (actionscript 3.0) website but I'm
    stuck with a visual effect I want to create.
    I have a window on my website called contentWindow. Every
    time you click a button this window is supposed to leave the stage,
    load the requested content and return to the stage.
    The sliding window is a movie clip with 83 frames, 21 to
    enter the stage, 21 to leave the stage again, 20 for nothing (its
    just to simulate the loading time) and 21 to return to the stage.
    Now my goal is, when the user clicks on a navigation button,
    the window exits the stage, loads an external SWF with the content,
    and then returns to the stage.
    I've the "window" movie clip with an instance name of
    "contentWindow". Inside there is another movie clip with an
    instance name of "contentLoader". The content that the user
    requested should appear inside the "contentLoader".
    Now, when the contentWindow leaves the stage, I get this
    error message:
    quote:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at rwd_fla::MainTimeline/trigger()
    If I switch
    "contentWindow.contentLoader.addChild(navLoader);" for
    "contentWindow.addChild(navLoader);" it works fine, but the
    external SWF doesn't move with the window.
    How can I load an external SWF into a movie clip that's
    inside other movie clip?

    Hi,
    Recently, I have been putting together a flash presentation.
    And I am just wondering if the following might help you, in your
    communication with the said swf file:
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onComplete);
    function onComplete(event:Event):void
    event.target.content.thinggy_mc.y -= 100;
    Not the best example, but this allows you to target a mc
    within an external swf file. I think if you look up this code, you
    will have an answer ;)
    Kind Regards,
    Boxing Boom

  • FAQ: How do I load an external SWF file into a parent SWF file?

    A ton of Flash users visit Adobe’s we site every month wondering  about how to load an external SWF file from within another SWF.
    Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
    How do I load more than one SWF?
    How do I load a SWF into a specific location in the display list?
    How do I resize the loaded SWF?
    How do I set its X and Y location?
    Here are some additional resources that elaborate on loading content and on working with the display list:
    Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
    Help > AS3 Developer’s Guide > Loading an external SWF file
    Help > AS3 Developer’s Guide > Loading display content dynamically
    Loading multiple external SWFs within a main SWF – CreativeCow.net forums
    Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
    Video tutorial: Preloading in ActionScript 3.0.  By Lee Brimelow. A slightly more complicated example, showing how to  make the parent SWF display information about the progress of loading  the external SWF.
    Tutorial: Loading and unloading SWFs - FlashAndMath.com
    This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
    SWF to SWF Communcation via ActionScript 3.0 (by kglad)

    quote:
    Originally posted by:
    NedWebs
    You now seem to want to get rid of the swf once it has loaded
    and played itself thru. To do that you would need to have something
    in the swf itself that triggers its removal in its last frame. The
    following might work...
    MovieClip(this.parent).removeChild(this);
    Unfortunately I couldn't get this to work. I placed it on the
    last frame of the SWF to be called - is that right?
    I am not sure I am doing it correctly...

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • Loading an external SWF into movie?

    I am trying to laod an SWF into and empty movie clip using no
    human interaction. I.e the ovie laods once a certain point in the
    timeline is reached.
    Here is the code I have
    Can anyone help?

    i dont see how that code would work at all, to be honest...
    But, there are sooo many variations of a pre-loader, that it
    wouldnt surprise me if it did work.
    your formula is wrong. it should be...
    Math.round((loadedbytes/totalbytes) * 100)
    by your code i see that you are sending the playhead to the
    frame equal to the ammount loaded.
    In this case, you need the ammount loaded to be a WHOLE
    number, and not decimal numbers, as you can't say
    gotoAndPlay(5.22984749); for eg..
    ok this code should go on the first frame of the SWF you are
    loading into your main SWF.
    If its not there...it needs to be there.
    second: this pre-loader does what it's supposed to...but it
    doesnt specify the "who" part of the code.
    try thiese 2 alternatives..
    loadedbytes = this.getBytesLoaded();
    totalbytes = this.getBytesTotal();
    frame = int(loadedbytes/(totalbytes/100));
    if (frame > 100) {
    frame = 100;
    if (loadedbytes == totalbytes) {
    // this takes you to the next scene
    this.gotoAndPlay(5);
    OR
    this._lockroot = true;
    loadedbytes = _root.getBytesLoaded();
    totalbytes = _root.getBytesTotal();
    frame = int(loadedbytes/(totalbytes/100));
    if (frame > 100) {
    frame = 100;
    if (loadedbytes == totalbytes) {
    // this takes you to the next scene
    _root.gotoAndPlay(5);
    let me know how you go.

  • Loading an external swf into my parent swf?

    Does anyone know how I can load an external .swf file into my
    parent file? I have tried to use loader actionscript but think I am
    using the incorrect script or putting it in the wrong place? If
    anyone can tell me the script and where to/how to use it that would
    be amazing? Thanks

    thanks GWD!
    I am using the unloadMovieNum(); command, i have loaded the
    child into level 5 of my parent swf. the parent has multiple scenes
    this one with a layer with a stop(); action and another layer with
    the loadMovieNum("portfolioone.swf", 5); script. it loads the child
    perfectly. The child has a number of pictures in it and a back
    button at the end. I have been adding the
    on (release) {
    unloadMovieNum(5);
    script to the button which unloads the child but stops
    because of the stop action in the first frame of the particular
    scene within the parent. I want to be able to add a script to this
    button which will take me back to a labeled frame in a particular
    scene of the parent, I tried the this.removeMovieClip(); but
    doesn't seem to be working for me, Thanks for the reply, hope you
    can help me further??

  • Loading an external .swf into an empty container

    I'm loading an external .swf into an empty container.
    Everything seems to work fine except when the .swf is loaded both
    seems to be running extremely sluggish. The button rollovers are
    slow, the page transitions..everything. I can't figure out why it
    is doing this. Both .fla's have the same frame rate. Is there some
    known reason why this might happen?

    well, we've tried that and it is actually a little bit worse.
    Normally i test everything in a browser window anyway. I'm thinking
    it might be a naming issue of some variable or something that is
    the same for both fla's....not sure yet though.

  • Load SWF into empty movieClip?

    Hello,
    Could anyone please point me in the right direction to find
    out how to load an external SWF into an already existing movieClip
    instance that is already placed on the stage? This is the way I've
    always worked in AS2, but I can't find how to do it in AS3. Can
    anyone point me to an example where URLRequest works with a
    specified movieClip instance?
    Thank you!

    I understand why you might think I was ignoring your advice,
    but this isn't the case. You're expertise is much valued and
    respected.
    My purpose for continuing to experiment with loading into a
    movieClip was an attempt to find an easy way to layer the SWF
    behind other elements, but as you know, although it works for this
    purpose, it doesn't allow control of the loaded SWF from the main
    timeline. For others struggling to learn as I am, here's a link
    where I found the answer to my question above:
    http://www.hostingforum.ca/776586-as3-controlling-loaded-swf.html
    The transition to AS3 is not as easy for some as for others,
    and there are new concepts to understand.
    Don't know what "nvm" means... curious, but might be better
    off not knowing ;) Thanks again for all the help you offer to all
    of us who are struggling.

Maybe you are looking for

  • I am trying to update my second generation iPod touch to iOs5

    whenever i plug it in to itunes and click "check for update" it says "the iPod software update server could not be contacted. Make sure your network settings are correct and your network connection is active, or try again later" but my wifi is on jus

  • Acrobat 9 Pro: Can't view last odd page in navigation panel

    When viewing pages of a pdf through the pages navigation panel in Acrobat 9 Pro in 2-up view, if the document finishes on an odd page, you cant scroll down and view the last page in the navigation panel. This wasn't a problem in Acrobat 8 Professiona

  • Embed PDF file in HTML region

    Hi There I have a simple report - with a link to view an underlying document. The document will be displayed on a seperate page with one HTML region. Say the file to display is statement.pdf and it is has already been uploaded to apex images. There i

  • Create remittance challan in withhlod tax

    Hello friends... while create remittance challan using T code J1NCHLN  i got error Number group not maintained for CO code xxx section IEQ xxx and business place xxxx. thanks

  • ADOBE PDF Variable text field

    Does any one know if there is a way to change the size of a text field on the layout depending the amount of data coming into the form? Thanks!