Closed
Bug 183512
Opened 22 years ago
Closed 22 years ago
Macromedia Flash Object methods not exposed to Javascript in DOM
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: joachim.kathmann, Assigned: peterl-bugs)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130 Hi, I made a page with a Flash movie and tried to call some of the Flash methods such as .StopPlay() in Javascript, but none of them are known to JS. The Flash object itself is accessible e.g. its id attribute can be printed, but when calling StopPlay() or other methods of the object, the Javascript console says "StopPlay is not a function". At first I thought it was an error within my object tag or somewhere else in my sourcecode but after double checking I found no errors. Then I found the given example on Macromedias support site which shows the same behavior. Browser <-> Flash communication is not working at all. Reproducible: Always Steps to Reproduce: 1. Visit the link above 2. Enter Text in the first Flash movies text box 3. Click the arrow button Actual Results: Text does not appear in the destination textbox. Expected Results: Text from the first movie should be transferred to the second movie via Javascript. Using Flash Plug-In 6.0 r47. Already removed name attribute from the Flash <object> tag as mentioned somewhere else in macromedia flash support, but still does not work.
Comment 1•22 years ago
|
||
Peter: were you working with DOM access? Would this fall into that arena? Or is there something else going on here?
Assignee: beppe → peterl
Comment 2•22 years ago
|
||
This error in the Javascript console is common of setups where the plugin's XPT file was not correctly installed or read by the browser. To remedy the problem, ensure that flashplayer.xpt is in your plugins folder and was installed at the *same time* as npswf32.dll. If you don't have the xpt but do have the DLL, delete the file and re-install the Flash that comes with Netscape 7 by clicking on this link: ftp://ftp.netscape.com/pub/netscape7/english/7.0/windows/win32/ewc9e/flash.xpi -->INVALID, reopen if it still doesn't work after proper installation.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 4•22 years ago
|
||
Hi there, tnx for your fast replies. OK, I checked the Plugins Folder, and there was indeed no flashplayer.xpt file. I deleted the npswf32.dll and re-installed the player using the xpi link you provided. Mozilla successfully installed the Flash Plug-in and the xpk file and the dll are now in the plugins folder. BUT: All the test movies still do not work. Exactly the same behavior as before. A colleague here at work freshly installed the same mozilla version and the xpi player and gets the same result. Any other ideas ?
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Comment 5•22 years ago
|
||
did you try to open javascript console? at least I'm getting "Error: window.document.get_var.SetVariable is not a function Source File: http://www.macromedia.com/support/flash/ts/documents/flash_to_flash_comm/flash_to_flash.htm Line: 13" after click arrow button.
Comment 6•22 years ago
|
||
ahh, my mistake, I should have tried the testcase first. It does indeed fail, but I think it's something in the markup. Using the Javascript debugger that comes with Mozilla, I broke on the error line and I think I see the problem. Here's the HTML from the testcase: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=get_var width=300 height=200 name="get_var"> <param name=movie value="recieve_from_flash.swf"> <param name=quality value=high> <embed src="recieve_from_flash.swf" quality=high width=300 height=200 swliveconnect=true name=get_var type="application/x-shockwave-flash"> </embed> Here's the Javascript: window.document.get_var.SetVariable("displayVar", theVarFromFlash); Here's the error: 0004: window.document.get_var.SetVariable("displayVar", theVarFromFlash); Caught exception: ``TypeError: window.document.get_var.SetVariable is not a function'' So, if I type window.document.get_var in the debugger, I get: 0004: window.document.get_var $[15] = [NodeList] [class: NodeList] {0} ahh, this is an array, not an EMBED tag! So let's see what's in the array: 0004: window.document.get_var.item(0) $[16] = [HTMLObjectElement] [class: HTMLObjectElement] {0} 0004: window.document.get_var.item(1) $[17] = [HTMLEmbedElement] [class: HTMLEmbedElement] {0} ok, there's our embed tag. So now lets try to call SetVariable on that: window.document.get_var.item(1).SetVariable("displayVar", theVarFromFlash); ...and then the text gets copied. --->INVALID, cc:ing emillard for updating testcase
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 7•22 years ago
|
||
Sorry for bugging you again ;) Checked the test case on Macromedia site in Venkman. Yes, it's working when calling SetVariable() on item(1) in the array and not on item(0). But that means that Mozilla JS does not support the <object> tag in this case, only the w3c deprecated <embed>. The test case should at least work with the <object> tag, since Mozilla claims to support w3c standards. For compatability reasons it could support the <embed> tag as well. Or does it just fail on supporting the <param>? That could explain why it can't find the methods, because there's no flash file assigned to the <object> tag.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 8•22 years ago
|
||
-->INVALID The outer OBJECT tag is only coded for an Active-X control. Gecko only knows how to render OBJECT tags based on mime type and will not render Active-X controls without a special plugin.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 9•22 years ago
|
||
Then Mozilla should be able to render the flash object using something like: <object type="application/x-shockwave-flash" data="myMovie.swf" id="myMovieObj"> which doesn't work either. I couldn't get a flash to show up in Mozilla unless I use the <embed> tag. That contradicts W3C standards: <embed> is a Netscape proprietary tag, <object> is W3C standard for generic object embedding. By the way, is alternate object rendering supported within the Mozilla <object> tag? I mean by nesting different types of objects, so the browser decides which one is supported and will be rendered as described in: http://www.w3.org/TR/1998/REC-html40-19980424/struct/objects.html#h-13.3.4 That would be the solution in favor to the ActiveX/Plug-In problem. <object(for IE ActiveX)> <object (for Mozilla)> <object (for Other)> </object> </object> <embed (for Netscape)> </object>
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 10•22 years ago
|
||
seems to work for me when rewritten like so. <object type="application/x-shockwave-flash" id="funtimes" data="send_to_flash.swf" id="send_to_flash" width="300" height="200"> <param name="movie" value="send_to_flash.swf"> <param name=quality value=high> </object> however the send_to_flash_DoFSCommand() half seems to not work, but document.funtimes.Play() and the like seem to work fine without an <embed>
Comment 11•22 years ago
|
||
yeah, this bug is INVALID, 1-way scripting works fine with OBJECT tags. However, I think there may be a problem with 2-way scripting (FSCommands). I've opened bug 184722 on that issue. Please open seperate bugs on other issues.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•