Urgent! external swf not loading with swfobject!

hello there,
I have a swf that loads another one into it through an empty
movieclip - When i embed it with swfobject it doesnt appear.
My guess is that i would have to mention the external swf in
the flashvars ... Done that with no success.
Does anyone have an idea of what could be causing me this
trouble?
thanks

Generally the problem will be that the path of all externally
loaded content is relative to the html page, NOT the swf location.
If everything is in the same folder then that isn't it.
Otherwise nice dice is correct, we will need to see your code
to go further.

Similar Messages

  • External .swf not loading on HTML pages

    Good morning,
    I'm having trouble and I was hoping someone could shed some light on what I'm doing wrong. I have a main .swf file from which external .swf files are being loaded through the use of buttons.
    When I preview the animation, everything works just fine. The problem occurs when I put the animation on the website where it needs to be. The main animation appears like it's supposed to, but the buttons are not successful in loading the external .swf files. I've made sure that all .swf files are on the server but still nothing. Could anyone help? I'm not sure what the problem is.
    Here's the AS:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest(event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    Thank you,
    - Cmarcoux

    For anyone having a similar problem in the future, the solution is in bold:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest("../../media/flash/" + event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    For the animation to work on a website, the file path was needed.

  • SWFs not loading in Air 4.0... for iOS

    Hi,
    I've read some of the posts about the problem of SWFs not loading in iOS.  This seemed to have to do with the SWFs having code.  We removed code from the SWFs and In previous releases, using previous SDKs (I don't remember the last one that worked) we had everything working.  But in the latest version compiled with the latest SDK (4.0...) none of the SWFs load.
    of course I'm learning about this late in the game.
    One more piece of information.  I did a test with an application that just loads one codeless SWF and have exactly the same result. 
    If anyone has any ideas, I would be very grateful.
    Best regards,
    Chris McLaughlin

    Hi,
    So code or no code external SWFs require a loader context.
    I borrowed this directly from a kglad response:
         var lc:LoaderContext=new LoaderContext(false,ApplicationDomain.currentDomain,null);
    When I add the LoaderContext to the loader (at least with my experimental app) the SWF loads.
    Also from kglad's example: yourloader.load(yourexternalswf.swf,lc);
    Thanks kglad.

  • Checking an external swf is loaded?

    Hi
    I'm loading an external .swf via typing the swf name into an input text field and hitting a submit button.
    The swf loads fine, but I'm trying to incorporate updating a status text field on a succesful load or if there is an error during loading.
    I can't find my mistake in the code - to me it should be making  load_status_txt display "ok", but the swf just loads with no status update.
    All the text fileds are fine, because if I code  load_status_txt.text = "hello" straight after addChild(loader); -  load_status_txt displays "hello"
    Can anyone see an obvious mistake below?
    Thanks so much again.
    Shaun
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

    use:
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

  • I want to load external swf in movieclip and next external swf should load Automatically

    I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.
    How can we can check total frame and current frame of imported swf in a movie clip.
    any help will be appreciated
    regards,
    Jatin Dembla

    in as3 you use the loader class (not movieclips) to load external swfs.
    you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.
    you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).
    var loader:Loader=new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
    loader.load(new URLRequest("swf1.swf"));
    var loadedSWF:MovieClip;
    function loadcompleteF(e:Event):void{
    loadedSWF=MovieClip(loader.content);
    trace(loadedSWF.totalFrames);

  • ITunes store not loading with iOS 7 on iPhone 4S

    iTunes store not loading with iOS 7 on iPhone 4S.
    I have tried reset network connections
    I have restored
    I have backuped
    I have erased all content
    I have rebooted
    I have DFUed.
    I have also the same issue with iTunes on pc, with -50 error.
    Is this an apple server error?!

    Thom_d, you mean your 4s work smoothly? my 4s also 32gb look to be more laggy especially playing asphalt8, infinity blade2, etc... the graphic will stop for few second while you racing.. Are you sure you didn't encounter this kind of problem? About battery life, it only last for 5hours without 3g services(only using wifi). Pretty shock saw what you mention above.

  • Apple home start page will not start and games will not load with flash.

    Apple home start page will not start and games will not load with flash.

    Never mind...I just figured it out. Restore windows when quitting box in Gen Prefs must be unchecked. To many new little things.

  • Audio does not load with video

    The audio does not load with video in 12?

    Welcome to the forum.
    Can you provide us with a bit more information, please?
    What OS version are you using?
    What are the full specs. of the AV file, that is not Importing with Audio?
    What Project did you set up, at New Project?
    Exactly what steps were used to Import that AV file?
    Did you allow adequate time for PrE 12 to Conform the Audio portion of your file?
    Good luck,
    Hunt

  • Loading external swf  not complete

    Hi, I'm trying to load external swf (with more than one frame and actionscript 3 on every frame - I used there "timeline" coding) from my main swf.
    code for loading external swf into main swf:
    var loader01:Loader;
    function openGame1(evt:Event):void
    loader01 = new Loader();
    var requestSWF01:URLRequest = new URLRequest("game01.swf");
    loader01.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, processHandler);
    loader01.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
    loader01.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
    loader01.load(requestSWF01);
    addChild(loader01);
    function processHandler(evt:ProgressEvent):void
    var loaded:Number=evt.target.bytesLoaded;
    var total:Number=evt.target.bytesTotal;
    var stav:Number=loaded/total;
    loaded_txt.text=(Math.round(stav*100))+" %";
    function initHandler(evt:Event):void{
    loaded_txt.text="";
    function errorHandler(evt:IOErrorEvent):void
         trace ("Error: " + evt.text);
    I found out that this works only for loading swf, which has only one frame (and all actionscript on that frame)... It seems that if there are more frames, than it will not load complete swf (hmm maybe it is caused, because not all objects on frames are export in first frame). Preloading starts but after for example 20 % the event.INIT is fired and the external swf starts to play (and crashes..).
    You can see this here http://bvyborcik.xf.cz/  If you click on the blue building on the left with blinking text "Start hry" you will see what happens - preloading is not completed and after clicking on first floor btn, the swf crashes...
    Please is there a solution for this kind of problem?  Any help or pointing is welcome.
    regards Boris

    just curious, is the file you want to load the swf into set up exactly the same way with the same stage size, fps, and layers?

  • Loading external swf fonts created with fontswf, loaded with a Loader, compatible with iOS

    Let me immediately start out by saying that I do in fact have a current working solution for using embedded fonts, generated by fontswf and working in an AIR ActionScript mobile application, and also currently working fine with iOS.
    My current app needs CFF fonts, so I currently use the fontswf tool to pre-generate the .swfs using:
    fontswf -4 -a [SomeAlias] -o [SomeFont.swf] [SomeFont.ttf]
    and then I am currently embedding them in my app source code .as for compilation using:
    [Embed(source="/swf/SomeFont.swf", symbol="SomeAlias")]
    public static var SomeFontClass:Class;
    I then have no problem registering them using Font.registerFont(SomeFontClass) and everything works fine.
    However, I would prefer to take the use of these swf fonts one step further and load them dynamically using a Loader so that I do not have to take the hit of having multiple CFF font swfs embedded in the main compiled SWF and so that I could even load an unknown future set of fonts without having to supply them as part of the app build.
    Now I have seen and read many blogs and tutorials where people have exported font swf from Flash Builder where you add an explicit 'Class' name or even made standalone .as static files compiled into standalone swfs only including the two lines:
    [Embed(source="/swf/SomeFont.swf", symbol="SomeAlias")]
    public static var SomeFontClass:Class;
    so that you also have a 'Class' involved. Then people use some form of appropriate applicationDomain.getDefinition("className") as Class
    to pull out the class for the font registration.
    My question is, how does one perform the same font loading and registration of fonts using a Loader only loading the .swfs produced directly from fontswf?
    It seems only a DefineFont4 is tagged in the swf, there doesn't seem to be a 'Class' per se to call on.
    More importantly, iOS apps cannot load external swfs with code in them, so my understanding is any extra wrapped swf that would contain a custom Class technique would fail the iOS requirement of only having one main SWF with any ActionScript compiled code.
    Is there an alternative to the 'Class' technique by grabbing the DefineFont4 tagged resource from the swf and instantiating a proper working Font class from that? One that would still be compatible with the restrictions placed on AIR mobile apps running on iOS?

    Ironically, just after posting this, Adobe released AIR 3.5 beta onto labs, and added multiple SWF support for iOS.
    While this new support makes it easier to manage your content across multiple SWFs and technically allows you to use the class based separate .swfs for each font if desired, the system still requires that all these SWFs be present at compile time when making the final app .ipa for iOS.
    So this still doesn't solve trying to load fonts after the app is already built. For example, as part of a downloaded in-app purchase mechanism.

  • Trouble loading an external swf file implemented with AS3

    I am using Adobe Flash CS3
    At first, I tried
    swf_mc.loadMovie("//swf file
    location");
    It gave me
    quote:
    Warning: 1060: Migration issue: The method loadMovie is no
    longer supported.
    USE: var l = new Loader(); addChild(l); l.load(new
    URLRequest("your url"));.
    Well, the given code isn't working at all.
    But since it is a migration error, I thought maybe I can just
    save it into Flash5 format with AS1. Then it worked with most
    external swf files. However, the one I am trying to load is a swf
    file with AS3, so my older version swf can't load it at all.
    Anyone has any ideas about how to load an external AS3 swf
    file?

    AS3 is a completely different beast than AS1 or 2. loadMovie
    was removed from the language.
    The answer to your question is two fold. First, Adobe was
    kind enough to give us the code when it finds a migration issue.
    var _ldr:Loader = new Loader();
    addChild( _ldr );
    _ldr.load( new URLRequest( "your url") );
    Handling progress has also changed. I have a ContentLoader
    package on my site that you're free to use that should familiarize
    you with the new way that things are done in AS3.
    http://sd-dezign.com/blog/?page_id=10

  • Loading external swf using Loader.load() method is delayed with flash player 10.1 and next versions.

    I am trying to load an external swf file of size 300 kb using Loader.load() method and trying to access some objects in it and i am getting some delay in loading the external file with flash players 10.1 and next versions.
    The action script code used to load:
    var strUrl:String="toLoad.swf";
    var urlReq:URLRequest=new URLRequest(strUrl);
    var ldrLoader:Loader = new Loader();
    var ldrLoaderContext:LoaderContext = new LoaderContext();
    ldrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, externakSwfLoaded);
    ldrLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorInLoadingSwf);
    ldrLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorInLoadingSwf);
    ldrLoaderContext.applicationDomain = ApplicationDomain.currentDomain;
    ldrLoader.load(urlReq, ldrLoaderContext);
    addChild(ldrLoader);
    System specifications:
    O.S. Windows XP sp2 (32 bit)
    Browser IE 6.0 (128 bit)
    Flash Player version WIN 10,2,152,32

    I think you are lost. This forum is for ROME. It sounds like you want one of the Flash or Flex forums...
    Good luck!
    Harbs

  • Preloaders in external .swf not working

    Hi people.
    I have built this website to showcase our work
    http://www.perfectmarketing.co.uk
    All the movie clips shown in the centre of the screen are
    external .swfs with their own preloader.
    But when the site is live, the preloaders don't seem to be
    working, it takes a while for the movie clip to load and the
    preloader doesn't show. I want it to show so people know something
    is loading.
    anyone have any ideas.
    Thanks,
    Paul

    I am experiencing the exact same problem on my site -
    www.expansiondesign.com
    It works in flash player but not when live (tested safari and
    firefox)
    I don't know if you are using the same script as I am paul.
    I execute the following when each image button is pressed:
    button1.onRelease = function () {
    startLoading("image1.jpg");
    which runs this:
    function startLoading(whichImage) {
    loadMovie(whichImage, "_root.image_holder");
    _root.onEnterFrame = function() {
    infoLoaded = _root.image_holder.getBytesLoaded();
    infoTotal = _root.image_holder.getBytesTotal();
    percentage = (infoLoaded/infoTotal*100);
    _root.loader._yscale = percentage;
    _root.loader._visible = true;
    if (percentage>=100) {
    delete this.onEnterFrame;
    _root.loader._visible = false;
    Thanks,
    Barton

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

  • Gallery tree swf not loading

    I am using the gallery_tree.fla provided in the Samples for
    Flash 8 Pro to build a small photo gallery, substituting the name
    of my xml file in this line of code in the action script:
    treeDP_xml.load("bbq_gallery_07.xml"); .
    I used the gallery_tree.xml, substituting my image filenames
    in the nodes. I placed the images, the .xml and the .swf in the
    same folder. The .swf will play if I open it on my local machine in
    a browser, but on the web server, it just continues to show the
    loader but no images or tree.
    My .xml and Actionscript is attached. Suggestions as to my
    problem?

    Seems odd it will only run once. Usually if a cache problem
    you get the same
    results even when you update the movie or server scripts.
    If it is
    http:// it is not local even if from the browser
    cache.
    Verify the html is validated.
    Check to see if this applies to all swfs. Create a simple
    hello world swf
    that connects to a JSP script that returns a simple value to
    Flash. If that
    seems to work, then the problem is in the JSP or
    Actionscripting coding.
    Check you can load the JSP script repeatedly using a direct
    call to it on
    the browser line using
    http://.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "srikanth_s_india" <[email protected]> wrote
    in message
    news:e6obld$lfb$[email protected]..
    > Thanks for the article link.
    >
    > I can't provide the URL as it is within our application
    which requires
    > logging
    > in. However, one more interesting thing about it is that
    it always works
    > for
    > the first time (in the browser/machine) but not from the
    next time.
    >
    > My doubt is whether it is because of the caching? When
    it loads for the
    > first
    > time, the HTML and SWF files load from our server and
    hence are allowed to
    > communicate with our JSP. However, when it loads the
    subsequent times, it
    > probably loads from the cache and hence considered as a
    local file and not
    > allowed to communicate with our JSP file which is on the
    Internet.
    >
    > Can anybody tell me how to enable a local SWF file to
    load SWF files from
    > the
    > Internet & access URLs from the Internet in Flash 8
    pluggin?
    >

Maybe you are looking for

  • Can't detect external monitor, shows only 640x480

    Hi, I'm using a Macbook Pro Unibody 13" 2.53GHz to connect to a Dell 2408WFP external monitor. It worked FLAWLESSLY with my old Macbook Pro using a DVI cable. 1) I first bought the infamous mini-Displayport to DVI adaptor. It didn't work (red static

  • Can't connect to 128-bit encrypted network

    I'm trying to use my Airport card to connect to a 128-bit hex encrypted Linksys network. My roommate has a PC laptop and has connected without any problems, but whenever I try to log on, I get a "incorrect password" message. I've selected "WEP 40/128

  • Set control in subVI

    I would like to set programmatically a control in a SubVI via VI server - how can I do this? Thanks Urs

  • CS4 photomerge cannot align my images- period...

    I have downloaded the plug-ins and reset my preferences.  Still: the message "some images cannot be aligned" and no suggestion on how to fix the problem.  I have always successfully used CS3 toi merge edited tif files.  Any other ideas except to relo

  • Feature Request: Functions for Renaming and Deleting LrDevelopPresets

    As it stands, there is no way to delete an LrDevelopPreset programmatically - short of deleting the develop preset lrtemplate file, but even then the effect doesn't take place until after restarting Lightroom. Likewise, there is no good way to rename