faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 14 people (43%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

Hello, I would like to send a js-variable to a textfile(for using it in flash) could you please tell me how I can do that

Apr 5th, 2008 19:19
ha mo, Jean-Bernard Valentaten, chris kat,


Well, I'm afraid you can't write a textfile using JavaScript.
But you can set the Flash-Variable directly.
Let's say you've got a FlashMovie called Film1, then by using the 
following line, you set the Variable some_var contained in anyField 
(hierarchical structure of Flash!!! The Var doesn't need to be 
contained in a Field, or whatever it is called in Flash :) ) to the JS-
Var anyValue.
Film1.SetVariable("/anyField/:some_var", anyValue);
Therefore the FlashMovie has to be on the same Page and has to be 
running (not neccesarily playing though).
HTH
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com