Can't Use Dreamweaver Flash Embedding with ExternalInterface

I've been trying to use ExtermalInterface to call ActionScript 3 functions from JavaScript and have been having a problem when embedding SWF files using Dreamweaver. When I use the sample code at the bottom of the ExternalInterface docs page (http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/external/ExternalInterface.html) the JavaScript/ActionScript function calls work fine. But when I insert a SWF with Dreamweaver CS4 they don't. They do actually work in Internet Explorer 8 but not in Firefox 3.5, Safari 4, or Chrome 3.
The problem has to do with the the way the SWF embedding is done. On the ExternalInterface page mentioned above a different form of the <object/embed> tags is used than in DW. Here's the sample code from the docs page:
     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
             id="ExternalInterfaceExample" width="500" height="375"
             codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
         <param name="movie" value="ExternalInterfaceExample.swf" />
         <param name="quality" value="high" />
         <param name="bgcolor" value="#869ca7" />
         <param name="allowScriptAccess" value="sameDomain" />
         <embed src="ExternalInterfaceExample.swf" quality="high" bgcolor="#869ca7"
             width="500" height="375" name="ExternalInterfaceExample" align="middle"
             play="true" loop="false" quality="high" allowScriptAccess="sameDomain"
             type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer">
         </embed>
     </object>
In DW, instead of an <embed> tag a second object tag is inserted. I did find that by manually giving the second <object> tag its own ID (a different ID from the one given the first tag by DW I could make the function call work in FF. But you would then have to choose the ID based on the browser. And, worse, that technique doesn't work in Chrome or Safari.
So, the workaround seems to be to use the style of embedding used on the ExternalInterface page. But, I don't like that approach for several reasons. First, the page  won't tell the user they need to upgrade their FlashPlayer if that's a problem. Second, you have to manually copy/past the embedding code instead of using DW's nice menu option. And I suspect there may be other benefits to the DW approach,
So, is there a way to make the DW embedding style work with ExternalInterface in all the major browsers??
David Salahi

Very interesting, thanks for your insight. Dreamweaver does seem to be a black sheep in this regard. Curiously, one of the reasons I wanted to stick with DW is because it highlights the <embed> tag in yellow—which normally means an HTML error. Not being entirely up on the ins and outs of the embed tag I thought maybe it's deprecated or something so wanted to avoid it. But now, I've found that it's apparently the right way to do things.
I did a little testing; here are my results...
My SWF was originally generated in FlexBuilder (as an ActionScript project) so I copied over the Flex-generated HTML page and modified it for use with ExternalInterface. That works fine in all four of the browsers I mentioned in my original post.
Next, I grabbed an HTML page generated by Flash's Publish menu option and made the same modifications. Again, everything was copacetic.
Each of the three tools (Flash, Flex & Dreamweaver) generate different HTML code for embedding a SWF file and only two of them work with ExternalInterface. I guess I'll steer clear of Dreamweaver's Insert-> Media -> SWF menu option in the future. This cost me an entire day of hair-pulling.
But thanks for your tip!
David Salahi

Similar Messages

  • Can I use a flash drive with my iPad?  If yes, what kind?

    Can I use a flash drive with my iPad?  If yes, what kind?

    Actually, and to clarify, the Lightning to sd card camera reader does not have a usb port in any shape.
    The Lightning to usb camera adapter is the one that has the USB port. (its an entirely different product)
    http://store.apple.com/us/product/MD821ZM/A/lightning-to-usb-camera-adapter?fnod e=3a
    The old 30 pin Camera connection kit, had a USB port adapter as well as the sd card reader in the same package.
    In any case, if the iPad you bought is an iPad 4, then no you{ll need to decide if you want an Sd card reader or the actual USB port.
    If its an iPad 2 then the camera connection kit will offer the usb port in the box.
    However as was already mentioned, and with either product you can only transfer pictures in a very specific format.

  • Can't use 4GB flash card with 10.3.X

    hi, i have 2 compact flash cards, both 4GB that i cannot mount on my 10.3.x machines but they work fine on my 10.4.x machines.
    is there anyway to get the cards to mount in 10.3.x? i get an error saying the disk is unrecognizable.
    thanks for the help

    Have you tried to erase & reformat using Disk Utility?
     Cheers, Tom

  • HT5287 Can I use a flash drive with mac osx 1 0.8

    When I insert a flash drive into the computer the icon does not show up on desk top.

    Welcome to the Apple Support Communities
    This option isn't turned on by default. Open Finder > Preferences > General and mark External disks

  • Can I use my custom board with LPC2378 processor with ULINK2 on Embedded module for ARM and LV.

    Issues in ARM and LV
    Can I use my custom board with LPC2378 processor with ULINK2 on Embedded module for ARM and LV.How can I create my elemental I/O vis or I have to use the existing Keil board vis. Confused. Please help.
    I have LV8.6. Which ver of embedded module for ARM should I buy. Website shows combined price for ARM module and LV. But I already have LV8.6 so what is the cost of module.
    Regards
    Shradha

              If the processor of your development board  is the cortex-M3 core, I think you do not have to buy keil board. Now, there are a lot of OS and emulator suitable for Cortex-M3.
              Operating system I am referring to  is the real time operating system such as keil RTX,uCOS,FreeRTOS,CooCox CoOS and so on. CooCox CoOS is very new, you can get more information from http://coocox.org/ .
              Emulator or debugging tools such as ULINK2,st-link,Jlink,CooCox Colink and so on. CooCox Colink is also very new.  You can download the Colink Plugin from here Colink Plugin . 

  • Can I Use Dreamweaver CC on a 32 bit Windows 7 System

    I have to use a Windows 7 32 bit os at work. Can I use Dreamweaver CC on a Windows 7 32 bit os?

    Dreamweaver CC (2014.1) system requirements
    Windows 
    Intel Pentium 4 or AMD Athlon 64 processor
    Microsoft Windows 7, Windows 8, or Windows 8.1
    2 GB of RAM
    1 GB of available hard-disk space for installation; additional free space required during installation (cannot install on removable flash storage devices)
    1280 x 1024 display with 16-bit video card
    Internet connection and registration are necessary for required software activation, validation of subscriptions, and access to online services.*
    And yes, either 32 or 64 bit.

  • Can I use a flash drive to back up my iTunes?

    Did a search on backing up my iTunes, and only get the option of backing up to a disc (Which is what I've done over the past 3 years. I now have 6 discs accumulated).
    Can I use a flash drive to back up my apps, music, and videos?
    I only have a total of 1.6 GB of apps, music, & video.
    If so, would I then be able to transfer everything from the flash to a new hard drive when I replace the current one?
    Thanks for any advice or help.

    The backup built into iTunes works only with CDs and DVDs, but you can back up onto a flash drive or hard drive manually. Just drag the entire iTunes folder (normally in your user's Music folder) onto the backup device.
    would I then be able to transfer everything from the flash to a new hard drive when I replace the current one?
    Yes. If you back up the entire iTunes folder, you should be able to just copy it back to the new drive in the same location (user -> Music folder).

  • Can i use Xcode 4.1 with PhoneGap 1.1.0 on Lion

    can i use Xcode 4.1 with PhoneGap 1.1.0 on Lion

    Looks like Adobe & Apache are quietly dropping support for phonegap/cordova...must be the same reasons they stopped flash on mobile last year...resources being refocused where they will be more beneficial, etc.

  • HT1751 I need to uninstall and reinstall iTunes (it won't let me update). So, how do I copy or back up my iTunes library of over 1,500 songs? Can I use a Flash Drive to do so?

    I need to uninstall and reinstall iTunes (it won't let me update). I have IE 8 on Windows XP, and iTunes 10 something. In my Program files list I see iTunes and iTunes (2) and even iPod and iPod (2) where a tech had to back up and do this for me before. I'm just trying to fix it all. I keep getting the "The feature you are trying to use is on a network resource that is unavailable. Click OK to try again, or enter an alternate path to a folder containing the installation package 'iTunes.msi' in the box below." I can even run a search and find the folder, but it gives me the same error message. I was planning on using the Microsoft Fix-It tool  to help uninstall then Reinstall iTunes. But I need to backup my library. So, how do I copy or back up my iTunes library of over 1,500 songs? Can I copy the folder to desktop or can I use a Flash Drive to backup my music? I don't want to do anything until I know for sure how I can backup my songs, and then reinstall them into iTunes. Thanks for any help.

    Ok, thanks that helps. I don't have an external hard drive though. What about backing up through 'the cloud'? I'm just wondering since my husband syncs his iPod to the PC through iTunes and he's worried that he will lose all the songs on his iPod if the library is lost from iTunes and he tries to 'sync' it up again. I'm not exactly sure how to  'copy the entire iTunes folder' either. I kinda suck at this unless I have step by step instructions, which I haven't found yet on iTunes help or other sources.
    The only way I know how to back anything up is by going back to a restore point, etc. (as stated before, we don't have an external hard drive.)
    Thanks for the info.

  • How can I use my Apple ID with 2 Apple devices?

    I just got an ipad mini and I registered it with the same Apple ID I use for my iphone 4s. Everything was fine until I downloaded apps to the ipad and noticed that the ones I had on both devices  no longer opened on my iphone. Why is this? How can I use my Apple ID with 2 Apple devices and how can I recover my apps on my iphone?

    I've had an iPad for almost two years. When I purchased an iPhone last fall I set it up to use the same Apple ID as my iPhone. I've had no problems doing this. Try resetting each device and see what happens.
    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • How can i use my apple ID with the itune store over my windows laptop

    how can i use my apple ID with the itune store over my windows laptop

    If you don't have iTunes installed on your laptop then you can download and install it from here : http://www.apple.com/itunes/download/
    You can then log into your account on it via the Store > Sign In menu option (on iTunes 11 on a PC you can get the menus to show via control-B) :
    And you can then select the Store on the left-hand sidebar (you can enable the sidebar via control-S), and then browse items in the store and buy them by clickin on their price.

  • Can I use an USB disc with my macbook pro bought in 2005.  What capacity will it take 2.00 or 3.00?

    can I use an USB disc with my macbook pro bought in 2005.  What capacity will it take 2.00 or 3.00?

    The first MacBook Pro's were not released until the beginning of 2006, and they had USB 2 ports.
    Anything available new in 2005 would have been a PowerBook G4 and they also had USB 2 ports.
    A USB 3 disk will just transfer data slower then it could do, if you plug it into a USB 2 port though, so you can buy either.

  • I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    do I need to create another account with a different email account
    Yes, the email addresses need to be unique to each device. You may use the same Apple ID on each device, but the email address used by each device needs to be different.

  • How can I use my time capsule with windows7

    How can I use my time capsule with windows7?

    This is asked regularly.
    https://discussions.apple.com/message/10978060#10978060
    Look at the more like this. On the right column next to the post.
    Load airport utility for windows.. which will also load bonjour for windows.
    In windows explorer type \\TCname or \\TCipaddress (replacing with the actual values.. names with spaces will give you trouble so change all names in the TC to SMB compatible or actual ip address).

  • New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    Oh yes! Apple will be happy for you to buy as many Apple products as you can afford.
    As and when needed, each can be given its own selections of content to sync with.
    tt2

Maybe you are looking for

  • SAP BI 7.0 Runtime Errors: DBIF_DSQL2_DEFAULT_CR_ERROR

    Hi - We have a BI 7.0 landscape running on HP-UX and Oracle 10g. While tryin to run delta process chains for loads, we had a runtime error as shown. Job started Step 001 started (program RSPROCESS, variant &0000000013914, user ID ALEREMOTE) Activatio

  • Safari and app store fail to work after installing Maverick, what can I do?

    Safari and app store fail to work after installing Maverick, what can I do?

  • F.13 - Automatic Clearing

    Hello SAP Guru, I am trying to post a clearing document; however, It's not letting me do it. When I select the "Test" option the document appears on the list. As soon as, I remove the test option to actually post the transaction it doesn't post anyth

  • Case insensitive quick search of UCM

    'Quick Search' in UCM looks case sensitive. If I create a file with title as 'Test File' it shows result in following cases Test Test File But it can't show result when I search for test test file Is there a way to make it case insensitive search? Th

  • Missing Tools. ACK! Help!

    At work I'm using CS5 on a Mac. Today I tried installing a new brush and after doing so all my tools went away, and I mean ALL of them. Looking under the WINDOW menu the only things tht are listed are: New Window, Arrange, Application Frame, Applicat