Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
automan25 #1
Javascript <--> Flash: communication trouble
On my webpage I need to be able to communicate from Javascript to Flash and
vice versa.
To communicate from Flash to Javascript I'm using FScommand.
From javascript to Flash I'm using the flashVars parameter of the Object &
embed tags. I have my page set up to dynamically write the object/embed code to
the DIV tag that I want to contain the flash movie. This is necessary due to
the variables that I'm using in the FlashVars values. The code looks similar to
the following:
var HTMLins = "<OBJECT ID='newsTicker' width='114' height='355'><param
name=movie value='movie.swf'><param name=FlashVars value='recalledBit=" +
parent.upperPanel.activeNewsClip + "'>"
document.getElementById("newsTickerLayer").innerHT ML=HTMLins;
This dynamic method of communication from Javascript to Flash works very well
with one exception. It screws up my FSCommand communication. My FSCommand code
used to run great when the object & embed tags were actually coded into the
page. Now that the page is set up to generate the object & embed tags
dynamically as mentioned above, the FSCommands don't want to work at all.
Any ideas?
automan25 Guest
-
JavaScript & Flash Internal movie communication
Hi I would like to build a html page that triggers various flash movies via javaScript. For example Id like to have two html checkboxes... -
flash <-> javascript communication in IE7
Hello, Having downloaded and installed IE7 Beta 2, my already working app. in IE6 using 8.0.22 Flash player, now suddenly is not reacting anymore... -
JavaScript to Flash communication
Hello, I am trying to communicte between JavaScript and Flash. Generality, I want to run a function in flash using JavaScript . I have a page... -
Javascript communication with Flash
Hello, Does anyone know if its possible to control a text field in flash with JavaScript. I.E. change font and font color?? Thanks! -
What's the deal w javascript -> flash communication?
This is syntax from Javascript... window.document.test.SetVariable("foo", "fubar"); In this case the object, which is the Flash movie is named... -
Laiverd.COM #2
Re: Javascript <--> Flash: communication trouble
Actually; there's no need to use FScommand at all. Here's a simple example
of what I once created:
[url]http://home.hccnet.nl/john.mulder/flash/js_comm.zip[/url]
But actually - unless you insist on publishing for Flash Player 5 or
earlier - it's well worth to have a look at Local Connection Object, which
is much more reliable. After all the simple action of turning of javascript
in the browser would sabotage whatever you're trying to achieve.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
automan25 #3
Re: Javascript <--> Flash: communication trouble
I examined your code. It seems to work very well. I won't work for my project
though. I chose to use FScommand because it eliminates that "click" noise that
IE produces every time you click on a link. That same click occurs when you use
the GetURL command from Flash. Since my script will be sending data to the page
twice every second the clicking noise would get rather annoying to the user.
You did mention creating the Local Connection Object though. Since I have
another flash movie on the site I can use Local Connection Object to store data
in the other flash movie rather than in the webpage itself, thus solving my
problem.
Thanks for the help.
automan25 Guest



Reply With Quote

