hi friends,
Greetings! Actually iam doing an elearning application, while reading our flash screen, student has to pass their comments to the instructor, it will store in data base and continue reading same screen. if i use post it will navigate to another aspx screen this will last the student where they read. pls advice me...how can i do this? is there any way to store data in db back end direct..?
Thanks in advance..
Regards,
Syed
hi kglad,
thks for ur reply and advice, if i use urlLoader, should i use navigateToUrl? if i use navigate to url, it will open another new aspx page. i dont want that. Whatever is there in the screen it has to be there as it is. but i need to pass the variable/value to the server while reading the lessons. pls advice me.
Thanks in advance,
Syed
Dear Friends,
iam loading my swf file in aspx file on the browser, when i click a button i will pass 2 variables to database and close or unload. If the user close the browser withtout click on that button i want to post that values and save in the dtabase. how can i do that pls explain me.
find below the code i used to store data when i click a button.
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new URLRequest("lmsHome.aspx");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
frdbut.addEventListener(MouseEvent.CLICK,sendMessage);
function sendMessage(event:MouseEvent):void {
variables.elecode = lescode;
variables.eleduration = "2:0"
varLoader.load(varSend);
}
Thanks in advance,
Syed Abdul Rahim
Dear Mr.kglad,
Greetings! Thks for the reply, i tried, it is working as javascript, i mean when i close the browser it is working, but when i opend the file or refress, it is not working, i mean, i cannot pass any variale or run a function in flash.
pls tell me how to clear this problem, i want to run a function existing in flash while closing or refreshing the brower where the flash swf is loaded.
find below my code:
flash code:
import flash.external.ExternalInterface;
import flash.external.*;
ExternalInterface.call("show_alert","1234");
javascript code:
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script type="text/javascript" language="javascript">
function show_alert(s){
alert(s);
alert("This is a test..");
}
</script>
</head>
<body bgcolor="#ffffff" onUnload="show_alert('ind');">
Regards,
Syed Abdul rahim
North America
Europe, Middle East and Africa
Asia Pacific