Dynamically embedded swf, has it ever worked

I have to repost it. Wondering what adobe will say about it.
I have tried this for a couple of days. I created a swf object in window.onload (also tried to create it directly while the script was loaded ), then call an AS function from JS. statically embedded swf works for both IE8 and FF, FF also fine for dynamically loading. In IE, this call externalinterface.call("echo", "as returns " + b); always shows "as returns false". The callback function has never worked in other approches with dynamic creation. Anyone has good experience?
Thanks.
 //js
<script language="javascript">
var containerready=false,flashready=false;
function addLoadEvent(func) {var oldonload = window.onload; if (typeof window.onload != 'function') {
window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }}
function embedswf(){
var a,swf="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
swf+=" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10, 0,0,0'";
swf+=" width='215' height='318' id='testswf1' align='middle'>";
swf+=" <param name='allowScriptAccess' value='always' />";
swf+=" <param name='allowFullScreen' value='false' />";
swf+=" <param name='movie' value='testswf1.swf' />";
swf+=" <param name='quality' value='high' />";
swf+=" <param name='wmode' value='transparent' />";
swf+=" <embed src='testswf1.swf' quality='high' wmode='transparent' width='215' height='318' name='testswf1' align='middle' allowScriptAccess='always' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' /></object>";
a=document.createElement("div");
a.id="swfholder";
a.innerHTML=swf;
document.body.appendChild(a);
containerready=true;
window.setTimeout(callas, 100);
} addLoadEvent(embedswf); function echo(p){ alert(p)}  function callas()
// alert("callas:containerready="+containerready+";fl ashready="+flashready);
containerready=true;
if(flashready){
var a=getswf();
a&&(a.flashfunc())
return
window.setTimeout(callas, 100);
} function setflashready()
flashready=true;
function getcontainerready()
//alert("getcontainerready:g31="+containerready+";fl ashready="+flashready);
return containerready;
function getswf()
if (navigator.appName.indexOf("Microsoft") != -1)
return window["testswf1"];
else
return document["testswf1"];
} </script> //as
import flash.external.ExternalInterface; flash.system.Security.allowDomain("*"); var rtm:Timer = new Timer(500);
startTest(); function f0():void {
ExternalInterface.call("echo", "one");
function timerHandler(event:TimerEvent):void
if (isContainerReady())
rtm.stop();
rtm.removeEventListener(TimerEvent.TIMER, timerHandler);
setupCallbacks();
function startTest():void
if (ExternalInterface.available)
try
if (isContainerReady())
setupCallbacks();
else
rtm.addEventListener(TimerEvent.TIMER, timerHandler);
rtm.start();
catch(error:Error) {
trace("An Error occurred: " + error.message + "\n");
else
trace("External interface is not available for this container.");
function isContainerReady():Boolean
var b:Boolean = ExternalInterface.call("getcontainerready");
ExternalInterface.call("echo", "as returns " + b);
return b;
} function setupCallbacks():void
ExternalInterface.call("echo","setupcallback");
ExternalInterface.addCallback("flashfunc", f0);
ExternalInterface.call("setflashready");

has it ever worked or is an Adobe bug? anyone knows?

Similar Messages

  • Embedded swf file doesn't work after publishing

    I am creating a lecture slides with embedded flashed swf which is created with AS3 including animation. It works well inside Powerpoint, butitdoen't work after publishing and running with web browser. My powerpoint version is 2007 and Adobe presenter is 7.07. I already look for soltutions by searching but I can't find one.

    Thank Shubhi. I have found out the key problem of not running when embedding a flash into Adobe Presenter is that the Main class must be inherited MovieClip not Sprite as I created it before. Now it works perfectly for flash versions created from both Adobe Flash Pro. CS5.5 (11) and CS4 (10).

  • Has anybody ever worked with EBS subject areas in OBIEE?

    What's speciel about Financial, CRM subject areas in OBIEE? Isn't it just a bunch of tables with financial or crm data joined in their own ways?
    Does anybody have any doc that describes the specs of such data models and how it works in OBIEE?
    Thank you for your helps

    There is a link to the Data Model Reference page in the OBIA documentation. You need a Metalink3 account.

  • My purchased download of Photoshop Elements did not work and I have been trying to reach a real person at Adobe.  Has anyone ever been able to do that.  If so can you tell me how to do that.

    My purchased download of Photoshop Elements did not work and I have been trying to reach a real person at Adobe.  Has anyone ever been able to do that.  If so can you tell me how to do that.

    Hi vision4success ,
    I would like to gather some information regarding your issue, So, please answer the questions below:
    What is the exact issue that you are facing?
    Do you get any error while installing Photoshop element?
    What is the Operating System that you are using?
    Since when you are facing this problem. Has it ever worked for you?
    What all steps did you try from your end?
    If you have any other details regarding the issue that might help us, please feel free to mention that as well.
    Waiting for you reply.
    Regards,
    Sarika

  • Will dynamic global hostnames ever work properly again?

    AEBS firmware 7.4.1 broke dynamic dns updating. Any attempt to set it up now simply results in TSIG errors.
    7.4.2 didn't fix it.
    Has anyone gotten signed dynamic DNS updates working on recent firmware revs of the AEBS?
    Will this feature ever work properly again???

    Hi berkeleywalker,
    I understand your discontent. I can assure you that all software updates developed by the manufacturer are intended to make your phone work better. Since you have done a Factory Reset and your phone continues to experience performance issues after you installed your applications, I recommend running your phone in Safe Mode for a while to ensure that no third party application conflicts exist. If your phone works properly in Safe Mode then a third party application conflict is causing your phone to malfunction and the conflicting application must be identified and removed from your phone.
    There is no easy way to identify a conflicting 3rd party application, the only way is to remove all applications and add one by one and test until the conflicting app is identified and then removed for good.
    AntonioC_VZWSupport
    Follow us on Twitter at www.twitter.com/vzwsupport

  • Embedded swf fiile in exported .exe movie not working

    I have exported a movie as a stand alone .exe file. The movie
    has a flash file embedded in it. When it plays on my own computer
    it works fine, but when it plays on another computer, it will show
    a solid red box for a couple seconds in a couple of different
    spots...all within the embedded swf file. Can anyone give me an
    idea why this might be occurring? I am thinking it has something to
    do with an SWF embedded in an EXE file, but really don't have a
    clue!

    I'm glad to see I'm not the only one. Only I have large
    portions of a very large EXE file delivered in red pages. It is
    irregular, too; before I left work yesterday, the entire file
    played fine. Reloading and rerunning it this morning, on the same
    machine, shows the red pages again. I'm experimenting to see if
    it's a loading/buffering problem by letting it cycle through a
    couple times, to see if that improves it. If it doesn't however, we
    have had better success splitting the file in two. But that
    presents it's own problems to link them to run as a single loop.
    I'll be very interested in knowing the solution to this, too.
    Oooo! I just found a useful reply to the same issue from a
    Captivate Consultant. Search under General forums, keyword 'red',
    and look for the title 'Screen goes red'. Here's what the solution
    reads:
    Check:
    1) Display time for the animation may need to be adjusted a
    tiny amount, or
    2) Frame rate for the animation may need to be changed if it
    conflicts with the movie frame rate.
    It only seems to happen on slides that contain animations
    because it is the animation that is causing the problem, so
    "tweaking" its settings can usually solve the problem.
    Hope this helps.

  • Video Skin not working in embedded SWF

    Are there issues with using a video skin on an swf that sits on a web page? Specifically, I have an swf that has a FLVPlayback component. The skin and its path are specified in the Parameters tab; autohide set to true.
    When the FLV in the swf plays, the skin appears on a mouse_over, as it should be. However, if the swf has the same dimensions as the flv, and the mouse rolls away, then it appears to me that the swf never "gets the message" that the mouse is no longer over it... and therefore the skin does not hide. Is this normal?
    If so, what's the work around? Designing the swf to be larger than the flv? I'd rather not, as that makes for some un-elegant (is that a word?) designing.
    Thanks,
    David

    Fixed it.
    var vSound1 = new Sound(this);
    var vSound2 = new Sound(this);
    var vSound3 = new Sound(this);
    playSound1 = function () {
    this.vSound1.start();
    on (press) {
    this.playSound1();
    }

  • Offline running - can "GetResources() for an embedded file ever work?

    This question has come up in various guises in the past, but has often then become confused with other issues (see [t-5123126] ) so I've not been able to find a useful answer. I've tried to bring the problem down to the essentials, and just want to know if what I'm trying to do can ever work, or if I should just abandon Web Start for this particular need.
    Our app is J2SE Swing and creates a Derby database locally on a PC. The application then captures keyed data and stores it on the local database. Persistence is via JPA (provider was Toplink, now EclipseLink).
    The data capture is performed using laptops running the application "offline" with no network connection. This is because the location has no network access of any description. Periodically, each laptop is reconnected to upload its data to a central server.
    To help with software distribution, we are using Java Web Start. All the jars are signed and the .jnlp file specifes offline usage is allowed.
    When running the application while connected to the network, there are no issues - everything works fine.
    When running offline, the application starts up so the Java Web Start caching is working and the code is obviously accessible. However, it throws a MalformedURLException within the EclipseLink code (which we do not wish to modify). The actual statement is:
    Enumeration resources = classLoader.getResources("META-INF/persistence.xml"); META-INF/persistence.xml exists within one of the jar files specified as resources in the .jnlp file.
    The classloader in question is the Java Web Start classloader ( com.sun.jnlp.JNLPClassLoader) which presumably retrieves classes and resources from the remote server or from the cache depending on how the app is being run. In online mode, the persistence.xml resource is found ok, in offline a MalformedURLException is thrown.
    My question: is this a fundamental "restriction" of the Web Start environment in offline mode? i.e. it can't load resources such as this xml file from a cached jar using the format shown?. My feeling is that this is just the way it is, and I should move on and try another form of software distribution, but it seems a shame to abandon Web Start as it otherwise meets our needs.
    Any relevent experience of this problem would be appreciated.
    Edited by: GrayMan on Aug 21, 2009 8:20 AM

    A system we're developing make use of a similar setup. I'm not sure if you run into this problem, but the classes in our app uses persistence annotations and do not rely on the orm.xml mapping file. After solving the persistence.xml show stopper, I could see that the application had really slow startup times in offline mode. By looking at the access logs in online mode, I could see that the app was requesting META-INF/orm.xml and META-INF/eclipselink-orm.xml. In online mode, the web server simply returned HTTP 404 with much delay. In offline mode, this resulted in really slow startup times due to timeouts for the mentioned requests.
    Creating valid xml files bundling them into the jar file of course didn't help.
    I successfully disabled lookup for eclipselink-orm.xml by specifying the following entry in persistence.xml:
    <property name="eclipselink.exclude-eclipselink-orm" value="true"/>
    To disable lookup for orm.xml, I modified the method loadStandardMappingFiles(String) in org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.MetadataProcessor (eclipselink 1.1.0).
    Perhaps this is useful for someone else also.

  • I have an Imac that is a year and a half old and the front of it just fell off  and it wont work now. Has this ever happened to  anyone?

    I have an Imac that is a year and a half old and the front of it just fell off  and it wont work now. Has this ever happened to  anyone?

    If you have Apple care and the problem occured without misuse on your part ... it can be replaced without charge.

  • CS 4 Dynamic Link to Encore doesn't work most of the time.  Encore stops operating after opening and periodically Premier Pro stops working.  I'm told that there has been a problem with CS4 when using Dynamic Link to go to Encore and build CD's.  Is there

    CS 4 Dynamic Link to Encore doesn't work most of the time.  Encore stops operating after opening and periodically Premier Pro stops working.  I'm told that there has been a problem with CS4 when using Dynamic Link to go to Encore and build CD's.  Is there a way around this?  Is there a patch to correct it?

    To build CD's???
    What problem does Encore have with DL?
    If DL is not working properly for you the way around this is to export from Premiere to either mpeg2-dvd for DVD or BluRay H.264 for BD-disks and import the files in Encore.

  • Has "Publish for Approval" in Aperture ever worked?

    Has anyone ever been able to get "Publish for Approval" to work in Aperture? We've been struggling with it for a week, and can't seem to get it going.
    If anyone out there has been successful, I'd love to hear how.
    Thanks,
    David

    I'm not using RAID or NFS. My startup drive is the standard 160GB SATA internal of a G5 formatted as Journaled HFS+.
    I have filevault activated on a 2nd account on this computer, but not on the active account.
    Publish was working with the above drive configurations. The only things that have changed since it was working is the uprade to Aperture 2 and a range of various software updates that came through after installing 10.5.2 and Aperture 2.
    I am using Time Machine, which I activated around the same time as I started using Aperture 2, which was when Publish stopped working. However, Time Machine is only set to backup the desktop, docs and music folders of my home account, plus a 2nd internal drive. But I thought it was worth mentioning.
    As I wrote in the email (to Sal), Publish doesn't fail right away for me, it happens after several images have been processed, then I get a -1700 applescript error.

  • Embedded SWFs not working with Flash 9

    Hello,
    I am also plagued with the Flash Player 9 issue. None of my
    embedded SWF files work if I publish with this version of the
    player installed. I ran the uninstaller and I'm now using version
    8. However, each time I open a PPT file I get an error saying "some
    controls on this presentation can't be activated. they might not be
    registered on this computer". This is very irritating. So, my SWFs
    still don't work. I found that if I register the v9 ocx and
    re-insert the SWFs, they will publish properly (while the Player 8
    is installed). However, I have about 50 existing PPTs with anywhere
    from 10-30 SWFs per presentation. I'd like to avoid this method if
    possible. Does anyone know of an easier solution? Thank you.

    good morning DocDVM and Supermercado Gato,
    I have the same issue with embedding SWF files into Breeze. I
    have been doing some searching the last two weeks and i found an
    tech note that you might want to read. It seems that Breeze is not
    really set up for Flash player 9 so Adobe came up with a work
    around. Read the technote.
    http://www.adobe.com/go/f9204eb8
    I am having my IT Department update Breeze for me so i will
    let you know if it works or if you update your Breeze let me know
    if this fixes the issue.

  • Has anyone ever installed OWC 1.0TB Aura Solid State Drive and Envoy Storage Solution for MacBook Air 2012? Did it work out?

    Has anyone ever installed OWC 1.0TB Aura Solid State Drive and Envoy Storage Solution for MacBook Air 2012? Did it work out?

    Has anyone ever installed OWC 1.0TB Aura Solid State Drive and Envoy Storage Solution for MacBook Air 2012? Did it work out?

  • TS3899 Our CEO has an iPhone and an iPad. Everytime he is at a specific airport (BWI) he is unable to send or recieve email over 4G or wifi. Everything else seems to work just fine over wifi or 4G LTE. Has anyone ever seen anything similar? is this malwar

    Our CEO has an iPhone and an iPad. Everytime he is at the Baltimore Washington Airport (BWI) he is unable to send or recieve email over 4G or wifi. Everything else seems to work just fine over wifi or 4G LTE. Has anyone ever seen anything similar? is this malware?
    Both devices are on Verizons 4G LTE network. Both devices do have some of the same APPS installed. Can this be a case of him connecting to a rogue wifi network of a hacker that may have installed malicious code on his devices when he connected? That would explain why only his devices have the same exact issue only at BWI airport.

    Something similar I've experienced. I was once having to use a AT&T hotspot and the iPad simply refused to access my mail via the mail app. But if I used safari I could get it.  So the internet was working, but my supposition is that something with the hotspot's firewall messes with mail exchange.
    next time your boss is at BWI, do you guys have a web interface? (for example if I wanted to access my work mail I could get them to set it up via the mail app and exchange, or I could go to a certain web address and access my mail that way via safari)
    He could try using safari and the web interface if you have it.
    If it's something in the hotspot's firewall I doubt it's anything that can be changed.

  • If ipod has been dropped in water, will it ever work again?

    If ipod has been dropped in water will it ever work again?

    Maybe.  Do not use or charge until it is dry. Dry using the instructions here:
    How to fix a wet iPod or iPhone | eHow.com

Maybe you are looking for

  • Can't stream slo mo videos to Apple TV via AirPlay

    I have a 5S and 6 Plus, both on iOS 8.1. I have an Apple TV (very latest 3rd gen model).  My mum has the same model at her house.  Both Apple TVs are on iOS 8.1. I cannot get slo mo videos from 5S or 6 Plus to stream to AppleTV via AirPlay.  It doesn

  • Replaced hard drive can't install OSX

    A friend gave me an iBook G3 500 MgHz. I want it to coordinate with my iMac G5 to be able to use same Tiger software. I put in 640 MB of Ram, then installed OSX 10.4. Everything OK but the modem was broke and there was not much room on HD. So I bough

  • In Firefox 3.6.6 gmail won't stay open; calendar opens on top of it

    when i open (with a button or bookmark) or if i type in google's mail URL, the google calendar opens on top of it almost immediately. this does not happen in other browsers or in previous releases, it's new since installation of firefox 3.6.6. i trie

  • How can i get the SSO to work successfully?

    How can i get the SSO to work successfully?  I followed the note for configuring infoview with ad sso using kerveros & .net. Adding the AD group into the win ad authentication configuration page creates the user group but the members of the group are

  • Logon procedure hangs on my Solaris 10, why?

    Today we added more RAM to the Virtual Machine called SRWIKI501 and now it has 1024 GB RAM but after reboot it hangs with this: SunOS Release 5.10 Version Generic_127128-11 64 bit Copyright 1983-20008 Sun Microsystems Inc. All rights reservd. Use is