?
Solved

Returning a Javascript variable value into Flash (AS2)

Posted on 2009-04-13
1
Medium Priority
?
523 Views
Last Modified: 2013-11-11
Hi Folks,

I have the following lastpage function in javascript which is getting called in a html page onload

<body onLoad="lastpage();">

I have a flash page which has a dynamic text field with a variable name of score. I wanted to return the value from Javascript into this dynamic text field.

Any ideas how?

Thanks

RG
function lastpage(){
	var finalscore = WM_readCookie("scoreval");									
	var percentscore = calculatescore (finalscore, totalquestions);			
	percentscore = eval(percentscore);
	var score = percentscore ;
	return score ;
}

Open in new window

0
Comment
Question by:rgarimella
[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
1 Comment
 
LVL 4

Accepted Solution

by:
H01 earned 2000 total points
ID: 24130813
Hi rgarimella,

You can use javascript function SetVariable to return the value into the text dynamic field.

You can visit this link http://oddhammer.com/tutorials/firefox_setvariable/ as sample.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

764 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