Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
AndrewTexas webforumsuser@macromedia.com #1
Send variable from Flash to HTML
I have a quiz in Flash. I want to take the quiz results (testscore) and send it to an HTML page to be assigned to a variable. How do I send variables from a .swf to HTML?
Here is my Flash script to get the testscore variable:
correctText = correctQuestion;
numberQuestionText = questionsPerQuiz;
testscore = 100* (correctQuestion / questionsPerQuiz);
stop();
Thanks in advance.
Andrew
AndrewTexas webforumsuser@macromedia.com Guest
-
Send Variable From ASP to Flash to ASP
I'm really, really new to Flash and using Flash 8 Pro. This is what I'm trying to do. I have a list of cars, when someone clicks on a car, they... -
send a variable from flash to flashcom
Hi All, I'm trying to send a variable from my flash project to the flash comm server. In my main.asc file, I use some remoting code to update a... -
Using Javascript to send a variable to FLASH
Hello... If I send a variable to my site... Example --> http://mysite.com/?variable=test How do I import that variable into my FLASH... -
Way to send variable from Flash to parent HTML page?
HTML page (with FORM on it) opens new window with interactive Flash; want to send info. on Flash page back to HTML. Saw one post with about 200... -
flash variable send to director
I have a problem, I needs send since flash to director a string but i can't. I found a example in director support that send a variable numeric to... -
Laiverd.COM #2
Re: Send variable from Flash to HTML
Basically this can be done using javascript, but maybe you should elaborate
on what you want to achieve finally. Anyway; basically you could do
something like this.
This will put 'testscore' in a form field:
In head tag of our HTML page write this javascript function
<script language="JavaScript" type="text/JavaScript">
// <!--
function passFlashVar(whichVar){
document.forms.form1.textfield.value = whichVar;
return;
}
// -->
</script>
Then create a form:
<form name="form1" method="post" action="">
<input name="textfield" type="text" size="25">
</form>
Then in your flashfile write:
getURL("javascript:passFlashVar(" + testscore + ");");
either attached to a button or a frame.
Then do an HTML preview of yoru movie
--
----------------------------------------------------------------------------
-----------
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
----------------------------------------------------------------------------
-----------
"AndrewTexas" <webforumsuser@macromedia.com> wrote in message
news:bu1c4q$k8b$1@forums.macromedia.com...send it to an HTML page to be assigned to a variable. How do I send> I have a quiz in Flash. I want to take the quiz results (testscore) and
variables from a .swf to HTML?>
> Here is my Flash script to get the testscore variable:
>
> correctText = correctQuestion;
> numberQuestionText = questionsPerQuiz;
> testscore = 100* (correctQuestion / questionsPerQuiz);
> stop();
>
> Thanks in advance.
> Andrew
>
>
Laiverd.COM Guest



Reply With Quote

