Loading an external .swf to a main .swf

so i fairly new to flash but had a question about
loading an external .swf into a mian one. So i was jsut wondering
if anyone had great links to a site that could help or anyone who
might want to explain it step-by-step. and one question of my own a
very stupid one infact if i keep the background white on my .sfw
that i am going to load into my main one will the background still
be there when it shows up on my website?
Any help?
Thanks...

Start by reading the Live Docs on the loadMovie() method.
That will get you headed in the right direction.
As for the background of the loaded SWF (by which I mean the
background color as specified in the PI for the document), no, that
is ignored when loading it into another movie. If you need it to
have a background, create a new layer at the bottom of the timeline
and draw a rectangle filled with the color you need before
generating the SWF.
Hope that helps!

Similar Messages

  • Load SWF file in main SWF with parameters

    Hello everybody,
    I recently got a new flash Application which is a Photo Gallery.
    This App is made of multiple folders (source files), a FLA file, a SWF with its javascript SWFObject and an Html page which instantiate this App with some parameters (size, config file path, ...).
    It needs an XML file to find all the Photos it displays, to do it I need to configure my application in the HTML Page and give it the "xml_path" :
    var so = new SWFObject("index.swf", "gallery", "249", "249", "10", "#111111");
    so.addVariable("xml_path","load/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
    so.addParam("allowfullscreen","true"); 
    so.write("flashcontent");
    By the way, I have a second application, the WebSite, which have to display the Gallery SWF in its "Gallery" page.
    Here is how I do it at the moment (in ActionScript3) :
    var swfRequest:URLRequest = new URLRequest("C:/......../Galerie/index.swf");
    var swfLoader:Loader = new Loader();
    //Charge le SWF Galerie dans le SWF Site
    swfLoader.load(swfRequest, context);
    container1.addChild(swfLoader);
    //Positionne le SWF
    swfLoader.x=10;
    swfLoader.y=120;
    It successfully loads the Gallery application but It shows an error telling me it doesn't find the XML configuration file... In the HTML file I simply had to write the "so.addVariable("xml_path","load/config.xml");" to tell where the XML file is...
    So, my question is : How can I integrate my SWF application giving it some parameters like above, in Action Script 3?
    Thank you ,
    Patrick

    No, nothing with HTML.
    I have 2 SWF applications. One is the Gallery, and the second is my Main Page.
    My Main Page must integrate the Gallery module in one of its page.
    The problem is when I try to integrate it, I think I must give de future loaded SWF some parameters like this :
    (My Main SWF loading in HTML)
    var so = new SWFObject("WebSite.swf", "flashcontent", "520", "700", "10", "#111111");
    so.addParam("allowfullscreen","true");
    so.addParam("allowScriptAccess","always");
    so.addParam("menu","false");
    so.addParam("wmode","opaque");
    so.addParam("bgcolor","#000000");
    so.setAttribute("id","flash");
    so.write("flashcontent");
    It was for the Main App. For my Gallery SWF I had to load it like this (in HTML) :
    var so = new SWFObject("Gallerie.swf", "gallery", "249", "249", "10", "#111111");
    so.addVariable("xml_path","Galerie/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
    so.addParam("allowfullscreen","true"); 
    so.write("flashcontent");
    So at the beginning I had 2 different projects with an HTML page for each.
    Now I wan't to directly integrate the Gallery SWF into the Main SWF. And as you have seen I must give it some parameters such as the "xml_path" and "allowfullscreen". This must be done in ActionScript 3 and I don't know how...
    I think I have to use FlashVars but I don't know how. As I said before, I have tried using the loaderinfo.parameters, but it is in read-only...
    Do you have an idea of how I can make it work ?

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

  • Sound plays in stand-alone SWF, but not when SWF is loaded into another SWF

    I have my Main FLA (Main.SWF) into which I load another SWF (1.SWF).  I have a sound the plays in 1.SWF and it works just fine when I publish 1.SWF alone.  When I load 1.SWF into my Main.SWF and publish Main.SWF, the sound in the loaded 1.SWF no longer plays.  I can't figure out why.
    //Here's the code (AS2) in 1.SWF to play the sound; seems pretty straight forward.
    mySound = new Sound();
    mySound.attachSound("soundSWF1");
    mySound.start();

    I found some information on-line that helped me figure out how to fix this issue.  First, I moved the sound object code to the timeline of the movieclip in which I wanted to play the sound, even if the movieclip was in a loaded SWF.  So if I my sound should play in mc_1.mc_2.mc_3, the sound object is created in mc_3 timeline.  Also, when creating the sound object, "this" is placed as the parameter, as such:
    soundObject = new Sound(this);
    Also, when stoping the sound, I'm using stopAllSounds() instead of soundObject.stop().
    I hope this helps someone who is struggling with this same issue.

  • Reference to main.swf from nested swf

    Hi,
    I have main.swf that loads page.swf . I want to have a button
    inside page.swf that tells main.swf to do something.
    How do I refernce the timeline of Mian.swf
    I use mx2004
    Thanks,
    Robert

    See:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=194&threadid=1173850&en terthread=y
    If you target what you want to do just like if it was in the
    same swf. The mc you want to load won't work correctly until it's
    tested in the movie your loading into. Like my code. _root with dot
    in between each nested element. My code has the an empty mc called
    'empty' that MARK_EXPAND is loaded into. And 'empty' is nested in
    'InterfaceYO' which is nested in HEADERfadeout which in turn is
    (obviously) in the _root, which is the source.

  • Loading in external movie

    hi all
    I have a problem loading in movies from a movie with a
    scrolling menu. the problem is the movie(load.swf, the movie trying
    to load into)is also loaded into main movie, so because of this
    needs the code;
    _global.loadNewMovie():
    at the end of the maintimeline to load in and out of the main
    movie.
    thus my problem, I have the movie load.swf loading in and out
    of my main.swf but know I can't get the little external movies to
    load into load.swf......does this make any sense...sorry bit of a
    newbie : (
    so movie trying to load into is
    load.fla
    small external movies to load
    movie1_02.fla
    movie1_03.fla
    I've put a link to a zipped folder with the fla's in would
    anyone beable to help me get the movies movie1_02.fla and
    movie1_03.fla loading into load.fla whilst still keeping the
    _global.loadNewMovie():
    on the main timeline??
    heres the ln link
    http://www.pmrltd.co.uk/help.html
    cheers for your help

    if you want the movies to simply load into your load.swf like
    this and when one finishes the next loads in, you'd be better off
    creating a container movie clip at (0,0) that you load your
    load.swf movie into. tell this movie to play through its timeline.
    at the end of that timeline, have it do a
    this.loadMovie("movie1_02.swf") and then add a line of AS on the
    end of movie1_02.swf that would
    this.loadMovie("movie1_03.swf"). not the best approach but it
    should work.

  • SWF calls up multiple SWFs - but Wordpress Paths are screwing it up?????

    Hi,
    I have a SWF I put on one of the sites I did, and honestly - I am very savvy - But with this one I am a bit baffled. This MAP SWF has 1 MAIN SWF then an SWF for each city the loads the City INFORMATION.
    You can see the way it is suppose to functions here - Click a region then choose a city. It loads a map
    http://edgelogistics.com/map.swf
    However on this page does not load the SWFs connected with the CITIES.
    http://edgelogistics.com/locations/
    I am assuming that it has to be an addressing issue. Here is the OBJECT SETUP I am using. It is not loading a FLA only SWF's so it must be hardcoded in the file with the address.. I tried it will the www and without.. did not doing anything..
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="775" height="513" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="menu" value="false" /><param name="wmode" value="transparent" /><param name="src" value="http://www.edgelogistics.com/map.swf" /><embed type="application/x-shockwave-flash" wmode="transparent" width="775" height="513" src="http://www.edgelogistics.com/map.swf" menu="false" quality="high"></embed></object>
    Thank you so much for looking at this.
    Jay

    From what I can see, the scenario fits the possible problem source.  When you link directly to the swf file, it is able to load whatever files it needs to because it was designed to do that in Flash testing.  But when you embed that swf file into an html page that lives in a different folder ("locations") the swf needs to have its targeting adjusted for the files it loads as if it were in that same "locations" folder.
    If that explanation doesn't come across clearly, the easiest way to explain a solution for this would be to say that if you can move all the swf files/folders into that locations folder, and adjust the url for the embedding code, chances are the problem will be solved.
    I don't know what the reference to an fla is meant to mean.  fla files are not used on a server, they just create the swf's which are.

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • Loading an external SWF from an external SWF

    Hello,
    I'm somewhat caught between a rock and a hard spot on a flash
    site project. Here is the situation:
    I have created a parent movie (which loads all external SWFs
    inside of it) that has the menu navigation built into it. However,
    my client wants me to place some more links inside of the external
    SWFs that lead to other pages (external SWFs) of the site. Is this
    at all possible? I was hoping there is a way to tell a button in an
    external SWF to make the parent movie switch between external SWFs.
    Any and ALL help is very much appreciated. Thank you.
    Another question: does this involve using the _parent script?
    Elijah

    Hello,
    Thank you for replying. Here is exactly what I'm needing to
    do:
    We will call the parent file "index.swf". Inside "index.swf"
    I have a "holder" for external swf files to load into when I call
    on them from the main menu buttons on "index.swf". When a customer
    comes to the site, the "index.swf" file initially loads
    "welcome.swf". Inside of "welcome.swf", I have some images that I
    want to make into links to other external swf files.
    My problem is when someone clicks on one of those pictures I
    want the "index.swf" file to open up the corresponding external swf
    file in its "holder", where "welcome.swf" currently resides. Also,
    all of these swf files ("index.swf" included) have stand-alone FLA
    files, none are attached to one another. I have never worked with
    "levels" before, would that be necessary in this case? I have
    attached the code for the external swf loader.
    I hope that gives you a better idea of what I'm trying to
    accomplish.
    Thanks again.
    Elijah
    CODE:

  • Loading an external clip(swf) and removing existing one

    Hi All,
    I am tearing my hair out; I simply want a button when
    clicked, to load an external swf. But I just can't seem to get my
    head around it. Here is my code:
    butt1_btn.addEventListener(MouseEvent.CLICK, swf1);
    function swf1(evt:MouseEvent):void
    loadSwf1.load(new URLRequest("swf1.swf") );
    butt1_btn.buttonMode = true;
    Any help with this would be much appreciated!
    Kind Regards,
    Boxing Boom

    Hi,
    Sorry for late response. I used the following code, which
    loads another swf and replaces the original swf;
    computerProtection_btn.addEventListener(MouseEvent.CLICK,
    removeMain, false, 0, true);
    var ld:Loader = new Loader();
    ld.load(new URLRequest("computerProtection.swf"))
    function removeMain(evt:MouseEvent):void {
    this.parent.addChild(ld);
    this.parent.removeChild(this);
    Now, the problem is that when I use the same code to get back
    to the original, it doesn't work. Obviously, I have changes the
    button name and the requested swf.
    I get an error stating something about the main timeline.
    Funny, how it works only once, loads a swf but won't load another
    swf file.
    I appreciate the time this issue has taken. But an answer
    would be nice!
    Kind Regards,
    Boxing Boom

  • Loading an external .swf then referencing to it's label

    I'm new with Actionscript and am currently working at
    building a website. I've got a lot figured out so far but one
    problem I'm running into is when I try to load an external .swf
    using the loader component and then reference it or try to point to
    it within my main .swf I can only load the "gallery.swf." through
    myLoader.contentPath = "gallery.swf";
    I'm trying to load it and then point to a specific label so
    it loads that frame or label. I've created separate labels for each
    image in my gallery so that when I point to them with AS, it knows
    which image to load. It worked when I had the gallery in the main
    .swf but when I used the loader component it didn't work.
    The AS I used that worked before I made a separate .swf and
    used a loader was:
    on(release) {
    _parent._parent._parent.photos_MC.gotoAndPlay("img1");
    what I thought would work was:
    on(release){
    _parent._parent._parent.myLoader.contentPath =
    gallery.swf.photos_MC.gotoAndPlay("img1");
    I'm probably totally off, but if anyone could help out I
    would appreciate it!

    This looks like AS2 code, you may want to post there.
    Assuming this is AS2 code, the contentPath of the Loader specifies
    the url to load. Once the swf is loaded, you can then gotoAndPlay()
    to the label you want.
    Hope that helps.

  • Button from External SWF to Play Movie in Main SWF

    Hi Guys,
    Ok I'm working in Flash 8, Action Script 2;
    I'm building a website, in which the 'Gallery Page' has a link to an external swf file, which is a scrolling clip of thumbnails.
    What I want to do, is create each thumbnail into a button, which will then play a Movie Clip from a frame located in the Main swf file.
    (So basically, each thumbnail button is a small photo, will play that photo in a large scale as a movie)
    eg.
    thumbnail1_btn  needs to go to main swf and play movieclip1.mc, frame 1
    thumbnail2_btn nends to go to main swf and play movieclip1.mc, frame 2
    I'm unsure of the code for this? Or if I've built this up wrong?
    If someone could help me out, that would be great!

    If you haven't set _lockroot on the loaded SWF, than a simple _root call from the loaded SWF will talk to the main SWF.
    IE:
    on(release){
    _root.gotoAndPlay(1);
    If you did set the lockroot, then call the level directly, via:
    on(release){
    _level0.gotoAndPlay(1);
    Once on the root level, you can access a movie clip as normal.
    So:
    on(release){
    _level0.movieClip1.gotoAndPlay(1);
    will call the movie clip "movieClip1" which resides on the timeline of _level0 (which is main.swf in your instance), and tell it to jump to the first frame and start playing.

  • GotoAndPlay specific frame in external swf from main swf

    I have a main swf that loads 2 external swfs.
    I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
    In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff.
    NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
    However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
    Here is code in frame #1 of main swf to load external swfs:
    //load academic movie
    var swfLoader1:Loader = new Loader();
    container1.addChild(swfLoader1);
    var url1:URLRequest = new URLRequest("academic.swf");
    swfLoader1.load(url1);
    //load wisdom movie
    var swfLoader3:Loader = new Loader();
    container3.addChild(swfLoader3);
    var url3:URLRequest = new URLRequest("wisdom.swf");
    swfLoader3.load(url3);
    Here is code in frame 2 of main swf that checks button to see where to go in external swf:
    //academic button clicked
    function academicClick(event:MouseEvent){
       container3.alpha = 0;
       container3.visible = false;
       container1.visible = true;
       container1.gotoAndPlay(1); //this is where I am trying to force it to start at frame 1
       container1.alpha = 1;
    I don't want to reload the external movie to force it to start over.
    Any help would be much appreciated.

    You can easily control this by making the external swf to load with your movieclip, The below is the code snippet that clear on accessing the specific frame on external swf.
    //Loading clips content
    var ldr:Loader;
    var mcExt:MovieClip;
    //Loading
    loadswf("external.swf");
    function loadswf(tmp:String):void{
        unloadSwf();
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    //UnLoading
    function unloadSwf():void{
        if (ldr!=null){
            ldr.unloadAndStop();
            removeChild(mcExt);
            mcExt=null;
    //Intervals (The part you work on the specific frame within the external swf
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        if (num==1) mcExt.play();
        if (num==9) {
                mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                function skipfn(e:MouseEvent):void{
                    mcExt.stop();
                    mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
        if (num==mcExt.totalFrames){
            mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
            gotoAndStop("help");
    hope it solve

  • AS2 mc loads 1 external swf from group depending on cookies and .html location

    I am attempting to load an external swf banner into an empty movieclip (main.fla for argument), which seems straightforward enough. But the idea is that each .swf (banner) is a link to its own respective html page. I.E. bannerA.swf links to pageA.html etc.
    The first problem is that I dont want main.fla to display bannerA.swf on pageA.html since the user will already be on pageA. So I need main.fla to recognize the .html page that the user is currently on (I have to do this in one flash file, otherwise I would make 4 which exclude the banner for its own page– though, if this would greatly reduce headache, I might be able to talk the powers that be into it).
    Secondly, I need main.fla to remember which banner (or banners) the user has seen on previous visits to a page so that the banners will rotate with each consecutive visit.
    Im guessing this can be implemented with an array and some listeners, but Im no AS2 guru. Any help would be more than appreciated.
    Thank You,
    Ryan

    Oh, I know I am sorry about that! I have been fiddling around
    and updating that version... I changed it to be a pop-up after I
    posted the question because in the forum for where I purchased the
    main layout template, a lot of people had written in saying that
    they could not get any gallery features to work with the buttons...
    so its something in the main page code, I don't know what.. but I
    am a bit eager to get the site up so I reverted to a pop-up for
    now...

  • Loaded SWF communicating with Main Timeline

    Let's say I load an external SWF to my main timeline. In that
    loaded SWF, I'd like to have a button that when clicked, removes a
    Movie Clip from the main timeline.
    How do I do that? Should be simple, right?

    Sorry I misunderstood your question, but here is the code.
    The second part is original swf altering a movie clip in the
    external (mov2.swf), just making an mc 50% transparent....
    circle_btn.addEventListener(MouseEvent.CLICK, printButton);
    function printButton(myevent:MouseEvent){
    var portLoader:Loader=new Loader();
    var printThumbRequest:URLRequest=new URLRequest("mov2.swf");
    portLoader.load(printThumbRequest);
    stage.addChild(portLoader);
    portLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    loaded);
    function loaded(event:Event) {
    circle2_btn.addEventListener(MouseEvent.CLICK,
    talkToExternal);
    function talkToExternal(myevent:MouseEvent){
    event.target.content.green_mc.alpha=.5;
    }

Maybe you are looking for

  • Please help with wireless printing

    I am running a wireless network in the house and having trouble printing. The printer (Canon MP800) is connected via USB to my Windows XP desktop. The desktop is connected via Ethernet to a 2Wire DSL modem that broadcasts the wireless signal to my Po

  • Oracle lite on pda's

    hi... Can we use Oracle Lite OC4J on the pda's.what are the other requirements?do we need to have JVM or is it bundled along with OC4J client? Also we are using webtogo driver to connect to th elite database.So what is the connection url in msql to c

  • OBIEE 11G Presentation Variable

    Working with two column prompts, and I need one to feed off of the other.  I was thinking I need to set one column as a presentation variable, and create sql for the other, so that it responds to the first.  The columns are Organiztion and Department

  • Media is not showing up on my wiki/blog server

    I have recently setup a server running 10.5 and running Podcast Producer. I have created a wiki/blog page and created several groups. I have attempted to use Podcast Capture to post videos, files and presentations to the webpage but the files never s

  • OEM in Browser on 10g

    Hello, I have set up Oracle database server 10g on windows 2003 server. It seems to be working ok, but the enterprise manager web site is not updateing. it shows page last updated back in augest. And it is not looking of posicy violations any more. C