-
Linux + BeOS = ? ? ? ? ? ?
SOS: Calling JavaScript Function from Flash to return a value
Hello!
I would like to call a JavaScript Function stored in <head> tag of HTML from Flash.
I would like it to execute the whole function and return the value. I am unable to decipher how to do it.
I am putting all the code below.
The JavaScript Function in HTML:
<script>
var buildInfo="";
var name="";
var majorVersion="";
var minorVersion="";
var label="";
var buildName="";
function getBuildInfo(){debugger;
var theUrl = pxReqURI+ "?pyActivity=@baseclass.GetXMLAboutScreen";
var strBuildInfoXML = httpRequestAsynch(theUrl);
var objXml = new ActiveXObject("microsoft.xmldom");
objXml.async = false;
objXml.loadXML(strBuildInfoXML);
buildInfo = objXml.selectSingleNode("//aboutInfo");
name = buildInfo.selectSingleNode("name").text;
majorVersion = buildInfo.selectSingleNode("majorVersion").text;
minorVersion = buildInfo.selectSingleNode("minorVersion").text;
label = buildInfo.selectSingleNode("label").text;
buildName = buildInfo.selectSingleNode("buildName").text;
}
</script>
The Code I used in Flash:
onClipEvent (load) {
getURL("javascript:getBuildInfo('""')");
txt.HTMLtext=name+" "+majorversion+"."+minorversion+" "+label+"<br>"+buildname;
}
What I want to do is take the values generated from JavaScript and display them in Flash, but it doesnot seem to work.
Please help me out........... need this code solved badly today......... Your help will be highly regarded
To design is Human. To Flash is Divine.- Nikhil "NicK" Desai
Anyone, who stops learning is old, whether at twenty or eighty.
Anyone, who continues learning stays young.
The greatest thing in life is to keep learning and stay young. - Henry Ford
-
Flashmatics
for communicating between javascript and flash , i would recommend using ExternalInterface:
http://blog.deconcept.com/2005/08/16...nal-interface/
-
Linux + BeOS = ? ? ? ? ? ?
I really tried understanding it, but could not get it...........
If you can pass on a sample fla, it would help me a lot.
I am about to explode working on this thing.......... wish if you could send me an fla sample for this concept..........
To design is Human. To Flash is Divine.- Nikhil "NicK" Desai
Anyone, who stops learning is old, whether at twenty or eighty.
Anyone, who continues learning stays young.
The greatest thing in life is to keep learning and stay young. - Henry Ford
-
Flashmatics
-
Linux + BeOS = ? ? ? ? ? ?
To design is Human. To Flash is Divine.- Nikhil "NicK" Desai
Anyone, who stops learning is old, whether at twenty or eighty.
Anyone, who continues learning stays young.
The greatest thing in life is to keep learning and stay young. - Henry Ford
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|