A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Linking text fields to external spreadsheet file

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Location
    Orchard Park, NY
    Posts
    9

    Linking text fields to external spreadsheet file

    Hi, I'm new to the forum. I know basic actionscripting, but I've come across a problem that I'm struggling with, and haven't found much specific information about it in my searches.

    I'm making a slideshow in flash mx 2004. It includes 100 images, each accompanied by a text description. Each image and description text field is in its own movie clip. The flash movie is split up into 5 scenes of 20 images each. I'm hoping to be able to dynamically link each of the text fields to a specific cell within a Microsoft Excel spreadsheet, so that all of the text can be written externally.

    I read the previous post about dynamic text fields, but I'm still not sure how my code should look, especially since it involves links to cells within the spreadsheet, instead of to a whole file.

    In the "Flash Help," it gives this code for using the "LoadVars" action to link a text file to a dynamic text field:

    Features_lv = new LoadVars();
    Features_lv.onLoad = onText;
    Features_lv.load("safetyfeatures.txt");
    function onText() {



    newFeatures_txt.text = Features_lv.safetyFeatures


    I tried substituting my file name and text field instance name into the code, and it doesn't display anything. I'm pretty inexperienced with this kind of actionscripting, so any kind of help or suggestions that anyone has to get me going in the right direction would be a huge help. Thanks to anyone who looked at my post or tries to help.
    Last edited by murph402; 12-22-2005 at 05:58 PM.

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    as far as I know you cant use a spreadsheet. Excel (.xls) files can NOT be imported or read by the FLASHPLAYER that I know of.

    You might be able to save your spreadsheet in a text file format..and have flash read that. but any "data" you are trying to receive will need to be in the format of:

    &varName=value

    (varName is what FLASH will look for as the "name of the variable" to read. & value is the data that will be displayed back in flash.

  3. #3
    Junior Member
    Join Date
    Dec 2005
    Location
    Orchard Park, NY
    Posts
    9

    thanks

    Okay, thanks a lot whispers. That should work for what I need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center