Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can ActionScript be used to pass info to JavaScript?

Posted on 2004-10-29
2
Medium Priority
?
198 Views
Last Modified: 2010-04-03
I need a way of getting an often-changing 256 character string of data
into a JavaScript. Ordinarily (of course), I'd just put the string into a
separate, external file and call it in using <script src="256characterstring.js">.

Problem is, I'm prohibited from using iframes, javascript includes, etc.
But I can use Flash.

So my question is this... can the 256 character string be embedded
somehow into a flash file in such a way that it can be read and acted
upon by Javascript?

Knowing absolutely ZIP about ActionScript, it would seem like you could
create something and give it a title of "1234567890...." and then
using DOM inside of JavaScript get the title of that object.

If that makes ANY sense at all.. I appreciate your comments, feedback.


0
Comment
Question by:sleepybear
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Tony_Goodman earned 1500 total points
ID: 12447507
There are a few different ways you could do this, here is a web site to look at for some examples:
http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm

One easy way to do it is to create a text box on your flash file somewhere and call that variable value in javascript.  Here is the javascript code:
parent.Stat.document.LFrame.SetVariable("_root.Qtr.text",document.SAS.Qtr.value);

Also, you can call a javascript function from flash
Ex: getURL("javascript:parent.Main.Receive();","Main");

If needed, you could pass values in the function call

Hope this helps,
-Tony
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question