Saving content using Flash AS 3.0

Posted on 2011-04-26
Last Modified: 2013-11-11
Hi, All

I have an issue please help me. I need to create an application in Flash, and launch it in LMS.  In my application , i have a textarea component, in which the user will enter text alteast 250 words. and then he will click the submit button. I need to find a way to save the content, for the SME to review the content entered by the user. The application is launched in an LMS,

Please give me solutions or ideas on how to go about this! This is a urgent requirement from the client.

I am using Flash CS3 and html

Question by:kittupeters
    LVL 30

    Expert Comment

    well it will need to go into a database for the sme to review it

    Author Comment

    Can i connect to the database when the course is launched in the LMS?
    LVL 18

    Accepted Solution

    If it's SCORM content you could easily save it to one of the variables of the data model, preferably cmi.comments or cmi.suspend_data since both these variables can hold a 4096 length string.

    //you should add something like this, preferably checking if the API is initialized before setting the value.
    function saveComments(txt) {
       api.LMSSetValue("cmi.comments", txt);


    import flash.external.ExternalInterface;
    //after you click save or whatever, assuming the name of the text field where they type the text is named "textFieldName""saveComments", textFieldName.text);

    The JavaScript code should be on the same HTML page that loads the Flash file...

    In any case, this is all assuming you're using SCORM, if you aren't this won't be that useful, but still is the best bet to save data to your LMS, unless you know exactly the tables you need to use and call some webservices or AJAX pages that save the data directly.

    Good luck.


    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
    CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
    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 what frame rate is, how to control it and what effect it has on the video.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now