Loading a swf page

When the statment below executes, the URL is correct but the
swf file does not load and run until I click the refresh button.
How do I get this to work without having to click on refresh in my
browser?
Thanks,
Bob
<cflocation
url="jukebox.swf?./XML/#SESSION.SessionID#.xml" addtoken="no"
>

When the statment below executes, the URL is correct but the
swf file does not load and run until I click the refresh button.
How do I get this to work without having to click on refresh in my
browser?
Thanks,
Bob
<cflocation
url="jukebox.swf?./XML/#SESSION.SessionID#.xml" addtoken="no"
>

Similar Messages

  • Need help with SWF page transitions please :)

    I am having an issue recreating something I have seen on
    other flash sites... (For example on 2Advanced.com) It is hard to
    explain but I will do my best. I am advanced in design, layout,
    tweening, and am a beginner to intermediate action scripter. So
    even if your solution is a point in the right direction to some
    code I could pick up and noodle around with that would be great.
    That having been said, on to the issue, it's a 2 parter:
    Part 1:
    I have a Master FLA (or SWF) containing navigation that loads
    secondary SWF pages into movie clip containers for the 5 additional
    pages of the site. These load above the Master movie clip masking
    it (Navigation floats above) so the loaded pages are sandwiched in
    between.
    View page in it's current state here:
    http://sky.prohosting.com/tk421808/rwip/gallery_MAIN.html
    This works ok right now, but I have the SWFs replacing one
    another in one single movie clip container. What I would like to do
    is similar to shuffling 5 cards... if you want the 4th card down
    you pull it out, it goes to the top and slides over the last
    visible card on top. So I would like the first page clicked to
    slide in covering the master MC, the second page clicked, to slide
    in covering that one, and so on and so forth. This would be easy if
    the pages were linear, then I could just stack the movie clips, but
    since the user will click out of order I need a way to load one
    into MC_2 (on top), Then when another is clicked have the MC_2 SWF
    move down a level (Swap MC?) to allow the second to slide in above,
    and then delete the movie that has moved down into level one
    (Bottom) then have this repeat when another movie is clicked. This
    way it will look like the page you clicked is always sliding in
    over the one you are leaving.
    Part 2:
    I have no idea how to do this next part but... I believe it
    involves a gotoAndPlay. I would like to have animation in the movie
    that is unloading after the button for the next page to load is
    clicked... in other words, you have loaded a page, you click on
    another link, and before the new external SWF page loads, the
    current performs a gotoAndPlay where I have animated some
    de-constructing swipes that remove the text, shapes holding the
    text, and the image. ONLY THEN does it start to load the movie for
    the link it selected. I think what I am trying to ask here is how
    does it carry the link through the unloading animation until it's
    done and then execute the loading of the new external SWF of the
    link they just clicked?
    I pray this makes sense... If not I would be happy to explain
    further. :) Thanks in advance for any help!

    >> I have no idea how to do this next part but... I
    believe it involves a
    gotoAndPlay. I would like to have animation in the movie that
    is unloading
    after the button for the next page to load is clicked... in
    other words,
    you
    have loaded a page, you click on another link, and before the
    new external
    SWF
    page loads, the current performs a gotoAndPlay where I have
    animated some
    deconstructing swipes that remove the text, shapes holding
    the text and them
    the image, and ONLY THEN does it start to load the movie for
    the link it
    selected. I think what I am trying to ask here is how does it
    carry the
    link
    through the animation until it's done and then execute the
    loading of the
    external SWF of the link they just clicked?
    <<
    You don't use frames. I'd probably use Fuse for this - which
    is a sequencing
    engine. (www.mosessupposes.com) You can call a function when
    the sequence is
    done animating - using what's known as a callBack function.
    That'd be the
    best way, IMO.
    For part one, you could either place mutliple empty movie
    clips, or just
    create them using createEmptyMovieClip - which is a MovieClip
    method, and
    then load your swfs into them with MovieClipLoader. You can
    use swapDepths
    for layer control, in order to have any given clip move above
    another, layer
    wise.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Loading multiple SWFs across many pages in a Flash interface

    I have a Flash AS3 interface that lets users go tto different
    pages with the usualy back & next buttons. Each page they come
    to loads in a page-specific XML file with content, and then
    possibly graphic files and/or SWF files.
    My question is this: When a user happens to quickly click the
    next page button, they will gte each page to start loading its
    assets. I believe that this would cause pages that they didn't
    soend more that a fraction of a second on to continue loading in
    the background. So if they quickly click through 20 pages, all 20
    pages' assets are loading. Sounds like I have a bad design on my
    hands!
    Without designing/developing for it, is this the simple
    result of loading in a file to Flash? Should I look into stopping
    iles from dpownloading if a user leaves a page before it's fully
    downloaded? Is that even possible?
    Any thoughts or advice would be greatly appreciated!

    I have a Flash AS3 interface that lets users go tto different
    pages with the usualy back & next buttons. Each page they come
    to loads in a page-specific XML file with content, and then
    possibly graphic files and/or SWF files.
    My question is this: When a user happens to quickly click the
    next page button, they will gte each page to start loading its
    assets. I believe that this would cause pages that they didn't
    soend more that a fraction of a second on to continue loading in
    the background. So if they quickly click through 20 pages, all 20
    pages' assets are loading. Sounds like I have a bad design on my
    hands!
    Without designing/developing for it, is this the simple
    result of loading in a file to Flash? Should I look into stopping
    iles from dpownloading if a user leaves a page before it's fully
    downloaded? Is that even possible?
    Any thoughts or advice would be greatly appreciated!

  • Design/gallery website - loading external SWF asset on splash page

    Hello all,
    This forum has been such a help with my website, i've found the answers to hundereds of questions but I've hit a bit of a brick wall and I wonder if anyone can help me.
    I have recently built a website http://www.intivision.co.uk/ using illustrator/flash/flash catalyst. It's still a work in progress and I'm happy with the gallery pages and general functionality but I'm having major issues with my splash/load screen and a few other niggles.
    The animation on the front page is a looping photo gallery i created in flash (as a .SWF) and imported into Catalyst. It is designed to play (and loop) indefinately after 2seconds of loading the title page. Half the time I access the site the animation does not load at all and just shows a blank screen and my logo. It will appear once the page is refreshed. A very bad first impression.
    I have a feeling this is because the SWF is externally loading the asset (which is only 350kb). Is there a solution or a way to imbed this animation so the entire project won't 'play' until this intro is loaded?
    Thanks - Tom
    ps Any other comments would be greatly appreciated

    Thanks for taking your time! Much appreciated.
    I like not complicated :-)  So it is now loading from the start - stretching over the whole timeline. How do I controll the visibility during the "HOME" = that is invisible?
    This is the code I use to load the external swf:
    var Xpos:Number=0;
    var Ypos:Number=0;
    var swf:MovieClip;
    var loader:Loader=new Loader();
    var defaultSWF:URLRequest=new URLRequest("main_movie_241x700.swf");
    loader.load(defaultSWF);
    loader.x=Xpos;
    loader.x=Ypos;
    addChild(loader);

  • Loading random .swf's in html page

    Desired scenario: I have a site which I want random .swf
    files to load into index page each time a user refreshes or visits
    the site.
    Solution: I used a Javascript array solution in the .html
    page. Note: it works perfectly in Firefox and Safari.
    The javascript code for that is listed below.
    Problem: In IE, the page which is supposed to load the
    random .swfs in blank. I tried to solve the problem by using an IE
    conditional statement with a single .swf embedded (so at least
    visitor could have interactive experience).
    <!--[if IE]>
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    width="800" height="600">
    <param name="movie" value="drinks.swf" />
    <param name="quality" value="high" />
    <embed src="drinks.swf" quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="800"
    height="600"></embed>
    </object>
    <script type="text/javascript"
    src="fixit.js"></script>
    <![endif]-->
    Any help would be appreciated. The link to the site in
    question is:
    http://www.jayminnickinteractive.com

    Thank you for checking. Yes right now they are all working.
    But many times I visit the flv's don't load - i wonder if it is a
    flash thing or more connected to my web host.
    Gary

  • Can I combine two methods of code to load various SWF files into the same location

    I presently have a set up where a large SWF file brought on the stage by clicking small icons from the scrollable thumbnail menu on the bottom of the stage. All of it happens at the same frame with .xml loading file.
    Here is the code for constructing the ImageLoader(for thumbnails) and SWFLoader for (bigger SWF files)
    [CODE]
       function _xmlCompleteHandler(event:LoaderEvent):void {
       _slides = [];
       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
       var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
       //loop through each <image /> node and create a Slide object for each.
       for each (var image:XML in imageList) {
        _slides.push( new Slide(image.@name,
              image.@description,
              new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                   name:image.@name + "Thumb",
                   width:_THUMB_WIDTH,
                   height:_THUMB_HEIGHT,
                   //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                   //x:260, y:320,//doesn't work here but works in line 69
                   scaleMode:"proportionalInside",
                   bgColor:0x000000,
                   estimatedBytes:13000,
                   onFail:_imageFailHandler}),
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                    name:image.@name + "Image",
                    width:_IMAGE_WIDTH,
                    height:_IMAGE_HEIGHT,
                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                    x:0, y:144,
                    scaleMode:"proportionalInside",
                    bgColor:0x000000,
                    estimatedBytes:820000,
                    onFail:_imageFailHandler})
    [/CODE]
    Here is what I would like to resolve. I have another section on the site with an image collage. Every image is a button. I want to script this each image on click to go to the label with ImageLoader and SWFLoader AND TO OPEN A UNIQUE SWF (ASSOCIATED WITH AN IMAGE CLICKED) ON THAT PAGE
    Previously this is what I did to achieve it. I would specify a String:
    [CODE]
    var sourceVar_ProductsPopUps:String;
    [/CODE]
    and then all my buttons will have their unique SWF assigned for them which opens at another labeled section ("prdctsPopUps" in this example):
    [CODE]
    function onClickSumix1PopUp(event:MouseEvent):void {
      sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
      gotoAndPlay("prdctsPopUps");
    [/CODE]
    Then in the "prdctsPopUps" section I would specify that var string to bring up SWF files. The value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the previous page.
    [CODE]
    loaderProductPopUps = new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]
    But I need both of them to be working at the same time. First there is a sectionA from where a user can navigate to specifically targeted SWF to section B's SWFLoader. Then in the section B a user has an option to bring up other SWF files into SWFLoader from the scrollable thumbs menu. Is there a way to combine these two lines into one:
    [CODE]
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
    [/CODE]
    and
    [CODE]
    new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]

    Thanks for looking into my issue.
    Unfortunatelly I am not so advanced in AS and do not complitely understand the logic of the problem. I will try to decribe my set up more precise.
    So, my main flash file is broken into labeled sections on the main time line.
    One of the sections is "Applications" It has an animated collage of images. Each image acts as a button and once clicked brings a user to a section called "ApplicationsPopUps".
    "ApplicationsPopUps" section has small image thumbnails scroll menu at the bottom of the screen and a large SWFLoader in the middle of the screen. User can click on an image in the thumbnails scroll menu and a corresponding SWF file will load in the middle of the screen in SWFLoader. User can click on left/right navigation buttons and preceeding/following SWF file will load in SWFLoader.
    Everything works fine (with your previous help)
    Here is the working code for the ImageLoader and SWFLoader (please let me know if you need additional code on the page):
    function _xmlCompleteHandler(event:LoaderEvent):void {        _slides = [];       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.        var imageList:XMLList = xml.image; //In the XML, we have  nodes with all the info we need.        //loop through each  node and create a Slide object for each.       for each (var image:XML in imageList) {         _slides.push( new Slide(image.@name,               image.@description,               new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",               {                    name:image.@name + "Thumb",                    width:_THUMB_WIDTH,                    height:_THUMB_HEIGHT,                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                    //x:260, y:320,//doesn't work here but works in line 69                   scaleMode:"proportionalInside",                    bgColor:0x000000,                    estimatedBytes:13000,                    onFail:_imageFailHandler}),                 new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",                   {                     name:image.@name + "Image",                     width:_IMAGE_WIDTH,                     height:_IMAGE_HEIGHT,                     //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                   x:0, y:144,                     scaleMode:"proportionalInside",                     bgColor:0x000000,                     estimatedBytes:820000,                     onFail:_imageFailHandler}) 
    Thumbnails in the section "ApplicationsPopUps" and images in the image collage in the section "Applications" represent the same photographs. So when a user clicks on one of the images in "Applications" section it would be natural that that image will load in the "ApplicationsPopUps" section. However "ApplicationsPopUps" section presently has a working code (as sampled above) It looks too complex for me and I do not know hot to implement this feature. I do want to keep the functionality of the thumbs image scroller in section "ApplicationsPopUps" as it is now. But I want to add that when a user click on an image from section"Applications" then that particular SWF file will load in SWFLoader in section "ApplicationsPopUps" and then the present functionality can as well be exectuted. Presently it just opens on a first image in xml order.
    P.S. I see that you had a download link in your answer. How did you do it? I could also upload a small sample file with my problem. This way you could see all the set up right away.

  • Loading a SWF inside another SWF question

    Hello friends,
    1. (IMPORTANT) As all we know when putting some Flash SWF
    inside an HTML page, normally it starts playing as soon as its
    first frame is loaded.
    Now in my case I have to load a SWF (let call it Flash A)
    inside another Flash, I used mx.controls.Loader control to do this.
    But this internal loaded SWF (Flash A) doesn't display untill it is
    completely loaded. Although what is interesting is that if it
    contains a sound track I can hear it while it is being loaded.
    I wana know is there any way that we can make this Flash
    display while being still loaded.
    2. Is there anyway to change a Flash playback FPS at runtime?
    Thank you so much for any note and help.
    - M

    damatrixhasu wrote:
    > i want to know how i can load a flash inside another
    flash container
    go to help - search for 'loadmovie'
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Accessing resources in loaded/external SWFs

    I've been looking around for an effective way of solving this
    issue, but without much like. What I'm trying to accomplish is
    creating a container for my newest Flash site in main.swf and
    loading other swf files that provide resources that modify mcs,
    functions etc. of the main.swf. I plan to have main.swf hold my
    background, logo etc. then each subrelated page as contact.swf,
    index.swf to be placed on top of that swf.
    I did find this thread:
    http://www.kirupa.com/forum/archive/index.php/t-241538.html
    but all I managed to get from it is how to reference elements in
    the child from the parent using Loader.content. What I'm trying to
    figure out is how to reference from the child to the parent. ie. if
    I want to modify the background of the main.swf which is contained
    in a function called changeBackground().
    To add some more complexity I am trying to keep as much of my
    code in .as files that are placed in the Document class. So for
    each main.fla I have a main.as and index.fla is index.as. In my
    index.as script I need to determine how to access objects/functions
    contained in main.as.
    I HOPE that I've explained that all properly. If I'm being
    confusing or using inappropriate terms - apologies.

    First, you need a loadComplete function in your icMain class
    to get called after the swf is loaded. You set up that relationship
    already in this line:
    indexLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    loadComplete);
    so you need this:
    private function loadComplete(event:Event):void
    then, move these functions into the loadComplete function as
    you have to wait until the swf is loaded before setting the
    reference:
    var indexPage:indexPage = indexLoader.content as indexPage;
    indexPage.icMain = this;
    In your indexPage class, you need to move your set mainSWF
    function outside of the indexPage function. Also, the type of
    object you are passing, according to your code, should be icMain.
    So, instead of this:
    public function indexPage():void
    public function set mainSWF(icMain:MainSWFDocumentClass):void
    _icMain = icMain;
    Do this (notice I changed the name of your variable to avoid
    name conflict. using the convention of starting class names with a
    Capital letter would help too):
    private var _mainSWF:icMain;
    public function indexPage():void
    public function set mainSWF(mainSWF:icMain):void {
    _mainSWF = mainSWF;
    Here is the rewritten icMain class:
    package
    public class icMain extends Sprite
    public function icMain():void
    var indexRequest:URLRequest = new
    URLRequest("index/index.swf");
    var indexLoader:Loader = new Loader();
    indexLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    loadProgress);
    indexLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    loadComplete);
    indexLoader.load(indexRequest);
    private function loadComplete(event:Event):void
    var indexPage:indexPage = indexLoader.content as indexPage;
    indexPage.icMain = this;
    And here is your rewritten indexPage class:
    package {
    public class indexPage extends Sprite
    private var _mainSWF:icMain;
    public function indexPage():void
    public function set mainSWF(mainSWF:icMain):void {
    _mainSWF = mainSWF;

  • AS3 load external swf problem, please help...

    Hey guys, I am really in need of an answer here. I would tremendously grateful if someone has the answer. I'll keep it simple and right to the point:
    1. I have created "index.swf" in AS3. Has it's own "MainClass" class.
    2. I created "holder.swf" which is the main landing page. Has 2 buttons, for the viewer to load the site in fullscreen or standard.
    3. In the timeline of "holder.swf" I have created 2 frames, 1st frame containing the buttons, second frame containing the AS3 external swf loader script.
    It does not seem to want to load my "index.swf".
    I have tested a million different ways, it load other swf's just fine, AS2 and AS3, but for some strange reason it just will NOT load "index.swf".
    This is driving me crazy, I have a feeling it has something to do with a class conflict. I have tried (import MainClass;) in the first frame of "holder.swf" and no luck.
    PLEASE GUYS, LET ME KNOW IF YOU KNOW THE ANSWER!
    THANK YOU SO MUCHO.
    Michael

    Hey kglad,
    Thanks for the quick reply!
    Well here is the problem... With the exception of a few things I need to update, as well as implementing some better preloaders etc... the site is running alright...
    About a week ago I decided that I wanted to site to start with the above landing page. A simple "holder.swf" which would give the viewer something to look at before entering the site... (ideally I want to find a script that will begin loading "index.swf" while the viewer is still on "holder.swf", but I'll figure that out later).
    Anyhow, I created "holder.swf" as I have many times before, and for some reason it does not seem to want to load "index.swf" into the second frame when instructed to do so... does that make sense?
    So... ideally I would like the site to start on the above graphic, then once the button is clicked, "index.swf" opens up...
    It's driving me crazy, because my code works on other swf's I've tested it with, just not with index.swf, which leads me to believe there is something in the MainClass.as file which is causing it not to load...
    What are your thoughts?
    Oh, and many thanks again!!!
    M

  • How do I load a .swf onto a flash pro file?

    My class i'm taking right now is using Adobe: Flash Professional CC Classroom in a book, and there's a point in the lesson where you upload/load a swf file(s). Technically it's supposed to be multiple because its the outline coding for a website, but I'm not understanding this...
    page1_mc.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_5);
    import fl.display.ProLoader;
    var fl_ProLoader_5:ProLoader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_5:Boolean = true;
    function fl_ClickToLoadUnloadSWF_5(event:MouseEvent):void
      if(fl_ToLoad_5)
      fl_ProLoader_5 = new ProLoader();
      fl_ProLoader_5.load(new URLRequest("http://www.helpexamples.com/flash/images/image1.jpg"));
      addChild(fl_ProLoader_5);
      else
      fl_ProLoader_5.unload();
      removeChild(fl_ProLoader_5);
      fl_ProLoader_5 = null;
      // Toggle whether you want to load or unload the SWF
      fl_ToLoad_5 = !fl_ToLoad_5;
    I know that I have to have the swf file in the same folder as the Parent file, and the name of the 'small page/file' goes in the url "" up there but what other connection am I missing?
    Why Is the Test File basically strobing??
    Thanks so much guys in advanced!
    Shadows  : )

    my guess is that if its strobbing you may be missing a Stop();
    function

  • Embedded .swf (page flip) Very Slow

    Hello,
    Within my flash file, I embedded a .swf (page flip) that is taking too long to load. When flipping through, it lags. Is there anything that could be done?
    Reference:
    http://www.lucysonlinestore.co.cc/home.html
    The .swf (page flip) is under "Clothes".
    Any advice appreciated.

    kglad,
    I apologize for the misunderstanding. I don't wish for anyone to go through my files. My intention of posting on here is for anyone with the past experience of slow performing page flips to share their solutions. Since page flip is so popular in flash sites, I thought people would have encoutered such problems. I included my site to show as an example. I do appreciate you taking the time and effort to go through the files and test run them.
    The error you're referring to is caused by declaring and using the loader in frame 3. In frame 1, I'm unloading the loader. If I declare the loader in frame 1, then the unloading won't work properly.
    I did search online for past posts, while many people encountered page flip performance issues, there is not much solutions out there. I thought better solutions are out now. It's at times like this that I wish I knew more about flash and AS3. Started to learn about a week ago doesn't help solving the errors.
    Thank you for looking into this.

  • What is the code to load a .swf file in AS3 on the same layer?

    I'm new to AS3 and am trying to figure out the code for loading a .swf file on the same layer of the same page, thereby replacing all of the information. I don't want to put it on layer 2, etc. Another easy thing I can do in AS2 but am struggling with in AS3.
    thanks!
    Steve

    There are no 'layers' in AS3 - there is just the display list. You can use addChildAt to add things at a specific depth - thereby placing it behind or above something, but if you just use addChild it goes on top of whatever is currently there...
    Anyway - to answer your question, you can load a .swf with a Loader object like so:
    var l:Loader = new Loader();
    l.load(new URLRequest("myFile.swf"));
    addChild(l);
    You can wait for complete like was shown, but you don't have to. And this will not 'replace' anything - it just loads myFile.swf on top of anything currently being shown. If you want to 'replace' what's there you need to remove it first:
    while(numChildren){
         removeChildAt(0);

  • Loading external swf movie to website - AS3

    Hi, once again I am stuck because of AS3, it was sooo easy to load external swf in as2.
    I have a very simple website where HOME does not want the external swf to show but all other pages should have the swf running as a main banner on left hand side.
    My site is built with labels - if you click on any other page except "HOME" the swf should load and stay loaded while navigating on the "following pages",  and when you navigate back to "HOME"the banner should unload.
    Should be easy right? I browse the Internet for 2 days and find millions of code, but nothing that works.
    Do I need a Loader placed on the following pages or an empty movie clip (with an instance name?)
    I tried the below, but it only loads if you click on button "l'ambition" first, since this is the frame where the code is placed, and it is of course not unloading on "HOME. I have a keyframe on label "ambition" where I have a Loader box and the code (both running all over the following pages.
    var request:URLRequest = new URLRequest("main_movie_241x700.swf");
    var loader:Loader = new Loader()
    loader.load(request);
    addChild(loader);
    Do I need an EventListener?
    Anyone...? Please hand me complete code since that will help me a lot. You can see the test site here: http://www.gattadesign.fr/CSD/index.html
    Thanks in avance!
    Anna Gatta

    Thanks for taking your time! Much appreciated.
    I like not complicated :-)  So it is now loading from the start - stretching over the whole timeline. How do I controll the visibility during the "HOME" = that is invisible?
    This is the code I use to load the external swf:
    var Xpos:Number=0;
    var Ypos:Number=0;
    var swf:MovieClip;
    var loader:Loader=new Loader();
    var defaultSWF:URLRequest=new URLRequest("main_movie_241x700.swf");
    loader.load(defaultSWF);
    loader.x=Xpos;
    loader.x=Ypos;
    addChild(loader);

  • Loading External SWF that loads XML

    Hey all I have a swf that loads an swf file into that loads pictures from an XML file thanks to Ned Murphy.  I have a new problems with it.  It works everywhere I try it except on the webserver.  When I try it I get nothing.  It doesnt seem to load the external SWf file or it may not be loading the XML file.  I am not sure why.  Has anyone ran into this before ? thanks.
    EDIT
    It works if I try the SWF from the webserver but when I embed it in an HTML file and run it through a broweser I get nothing.

    If the swf is is another folder from the html page that embeds it, you probably need to adjust how you target the files that the swf's load. 
    When you embed an swf file into a web page, anything the swf loads has to be targeted as if that swf is in the same folder as the html page that holds it.  So if the html page uses something like "flash/main.swf" to embed the top level swf, then if the top level file loads another swf from that same flash folder it needs to also use the "flash/other.swf" regardless that it is in the same folder on the server.  When it's embedded in the page, it's as good as being wherever that page lives.

  • Loading external SWF when first one is finishes

    The code I have so far is included below. Right now the first swf (first of two loaded into main swf) (intro.swf) loads fine on mouseclick of the "go" button. However I would like the first swf to unLoad and the second swf to load ("europe.swf"). This will be a one frame swf that will link to various others. After multiple tutorials/forums I can't figure out how to get the second swf to load while the first unloads.
    I hope I make sense and thanks for any help.
    import flash.display.MovieClip; import flash.display.Loader; import flash.net.URLRequest; go.addEventListener(MouseEvent.CLICK, goIntro); var loaderIntro:Loader  = new Loader(); var contentIntro:MovieClip; function goIntro(e:MouseEvent):void {      loaderIntro.load(new URLRequest("intro.swf"));      addChild(loaderIntro); } function onEnterFrame(e:Event):void {      if (contentIntro.currentFrame == contentIntro.totalFrames) {           removeChild(loaderIntro);           loaderIntro.removeEventListener(Event.ENTER_FRAME, onEnterFrame);           loaderIntro.unloadAndStop();             var loaderEurope:Loader = new Loader();             loaderEurope.load(new URLRequest("europe.swf"));             addChild(loaderEurope);                  } }

    So,
    I finally figured it out. Most likely not the best option or completely correct but it works how I want it to.  So what I have is my "welcome.swf" that loads the "intro.swf", once this finishes playing the "europe.swf" loads, which is a interactive menu to go further into particular countries/regions.
    My welcome page only needs to be 1 frame, but i put a stop(); on that first frame and then added the same number of frames that are in the "intro.swf" and added a button to that last frame "goplayEurope" of "welcome.swf" that unloads "intro.swf" and loads "europe.swf".  I know not the best way! But I'm not the best (or even past beginner) at as3. I've also figured out a way after nearly endless searches thanks to google and forums like this to communicate back to parent swf to tell it when the loaded swf is in it's last frame.  So hopefully this helps someone!!! And PLEASE feel free to correct me/my code wherever necessary...I know it's far from perfect.
    In frame1 of "welcome.swf" (also has a loader)
    stop();
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import fl.controls.ProgressBar;
    go.addEventListener(MouseEvent.CLICK, goIntro);
    var loaderIntro:Loader  = new Loader();
    var contentIntro:MovieClip;
    var myPB:ProgressBar = new ProgressBar();
    myPB.source = loaderIntro.contentLoaderInfo;
    myPB.x = 300;
    myPB.y = 350;
    myPB.width = 400;
    myPB.height = 10;
    function goIntro(e:MouseEvent):void
         loaderIntro.load(new URLRequest("intro.swf"));
         loaderIntro.contentLoaderInfo.addEventListener(Event.COMPLETE, startIntro);
         go.visible = false;
         addChild(myPB);
         function startIntro (e:Event):void
              addChild(loaderIntro);
              play();
              removeChild(myPB);
    And frame375 of welcome.swf ("intro.swf" has 375 frames as well)
    stop();
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    goplayEurope.addEventListener(MouseEvent.CLICK, goEurope);
    var loaderEurope:Loader  = new Loader();
    var contentEurope:MovieClip;
    function goEurope(e:MouseEvent):void
         loaderEurope.load(new URLRequest("europe.swf"));
         addChild(loaderEurope);
         goplayEurope.visible = false;
         loaderIntro.unload();
    Now for the communication communicating the last frame has been reached...here is a simple example.  I think there are still a lot of issues with this one so please help out if you can. For this example the sending swf is 100 frames
    Sending swf
    import flash.net.LocalConnection
    var function1:LocalConnection = new LocalConnection();
    stage.addEventListener(Event.ENTER_FRAME, function2);
    function function2(e:Event) :void
         if(this.currentFrame == 100)
              function1.send("connectionname", "functionsendname");
    //so that the mc goes back to frame 1, otherwise I've found it doesn't play right if you choose to play again
    gotoAndStop(1);
    Receiving swf
    var function1:LocalConnection = new LocalConnection();
    function1.client = this;
    function1.connect("connectionname");
    function functionnamesend() :void
         loadername.unload(); //the loader name is what you call your loader variable when loading said swf
    So like I said, none of this is perfect but is working for me, constructive criticism extremely welcomed!!!

Maybe you are looking for

  • Lost all my contacts in my address book

    I am running 10.2.8 All my contacts just disappeared from my address book (no crash or anything unusual). Can anyone give me advice on how to get them back? Or if it is possible. Thank you for any help.

  • I have an issue in Adobe Reader, blurry text with a section of a PDF. Same file works fine on a colleagues PC. Even tried Pro?

    I posted this question on Twitter last week, was asked to check the settings for rendering and this didn't make a difference. I then installed Adobe Acrobat Pro to see if this made a difference but no luck. Finally I was asked to print in B&W but aga

  • How to display data in ComboBox when click on DataGrid Row.

    Hi!      I am new to Adobe Flex. I am building one Project that was related to Comapny and Customer. First I created Company Master. Then I create Customer Master successfully and My Backkend is SQLite Database.      My Problem is I have two files on

  • Wiki Tags

    I can not add any Tags in my Wiki's in Lion Sever 10.7.3.  I know that the templates are gone but the are searches and pages for tags but no way to add.  what am I missing here?

  • Unseen exception (RMI)

    I am using RMI to create a client server hotel booking system applet. My client sends the server a new booking by calling the addBooking() method that the server provides. iI get the following error when I try to send it to the server that I don't un