Retrieving a value from an embedded SWF file from ASP .net

D

damian

I'm developing a quiz, and making some fancy controls, sliders and the
like in Flash. I now want to be able to get the value of the slider
control from my ASP . NET page. All I can find on the web are exmaples
of how to use an ASP .net page as the service, but i need it the other
way around, i.e. when the slider moves in my Flash file, I want the
asp .net page to be notified so i can store the value as a local
variable, for scoring..

i thought i posted this message but couldnt see it so apologies if
this ges asked twice.
does anyone have an example/ pointer in the right direction?
much appreciated
 
N

nothingsoriginalontheinternet

From ActionScript, you can do something that works like AJAX.

Do whatever you need to do in your Flash's ActionScript to fill in
this sample or otherwise modify it to get your data across (maybe in a
button's on click handler):
//ActionScript
objLV = new LoadVars();
objLV.sliderVal = 50; // eh?
objLV.send("myUpdSrvce.aspx", "", "post");

And we'll create a web service of sorts with myUpdSrvce.aspx for
simplicity. Here the page's Load event handler:
'VB
Sub Page_Load(s As Sender, e As EventArgs) _
Handles Me.Load
Dim sliderVal As String
sliderVal = Form("sliderVal")

'Do stuff!
End Sub

I do something like that with Actionscript/PHP, should work this way
too although I haven't tried it.

-Mike Placentra II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top