Archive for October, 2004

Flash Actionscript Slideshow Notes

Flash Slide Show

Flash can do a zillion cool things, but one easy one to setup and see is the online slide show. As an example, check out this online slideshow of a design study.

Actionscript links:

Open source Flash slideshow from whatdoiknow.org - this is the code that powers the slideshow mentioned above.

Flash mp3 Links

  • http://forums.devshed.com/t178264/s.html - very simple .as to add an mp3 to a swf
  • Actionscript loadMovie Notes

    In actionscript, you cannot reference a movie until it is loaded. Code to work around that (for loadmovienum):

    function preloadLevel() {
        if (_level5 != undefined) {
            trace("level 5 loaded");
            delete this.onEnterFrame;
        }
    }
    _root.onEnterFrame = preloadLevel;
    loadMovieNum("external.swf", 5); // load something into level 5
    

    Code for XML:

    // Create new XML object
    SP_XML = new XML();
    SP_XML.ignoreWhite = true;
    // load the XML data - the gate will take care of the
    // location_id, all that jazz.
    //SP_XML.load(”/acc/link/loc/view/sp/xml/”);
    SP_XML.load(”/main/swf/sample_space_plan.xml”);
    // Render the space plan - load the SWF movies and
    // arrange them as necessary.
    //SP_XML.onLoad = renderSpacePlan;
    SP_XML.onLoad = function(success:Boolean) {
    if (success) {
    space_plan_id = this.firstChild.attributes.id;
    trace(”id”+space_plan_id);
    // Set array SpEquipment to the equipment arrays.
    SpEquipment = this.firstChild.childNodes;
    //loadMovieNum(”/acc/link/loc/sp_server/&location_space_plan_id=”+space_plan_id, 0);
    //loadMovieNum(”/acc/link/types/symbol_server/&equipment_type_symbol_id=3″,2);
    for (var i = 0; i asset_x = SpEquipment[i].attributes.x;
    asset_y = SpEquipment[i].attributes.y;
    asset_type_id = SpEquipment[i].attributes.asset_type;
    j=i+2;
    //_root.createEmptyMovieClip("eqp"+j, j);
    _root.eqp.duplicateMovieClip("eqp"+j, j);
    _root["eqp"+j]._onClic
    _root["eqp"+j]._x = asset_x;
    _root["eqp"+j]._y = asset_y;
    _root["eqp"+j].loadMovie("/acc/link/types/symbol_server/&equipment_type_symbol_id=" + asset_type_id);
    //_root["eqp"+j].loadMovie("/main/swf/kiosk.swf");
    }
    } else {
    trace("xml failed to load.");
    }
    };
    _root.eqp.onLoad = function(success:Boolean) {
    if (success) {
    duplicateMovieClip(_root.eqp, "eqp2", 3);
    _root.eqp2._x = 65;
    }
    };
    // this sucks
    function preloadLevel() {
    //Assuming a loop needs to be run here to evaluate each level load status!
    //Definitely want a "Now constructing the space plan... please stand by screen."
    if (_level2 != undefined) {
    _level2._x = 150;
    _level2._y = 125;
    _level2._rotation = 45;
    newclip = duplicateMovieClip(_level2, blah, 33);
    newclip._x = 45;
    delete this.onEnterFrame;
    }
    }
    _root.onEnterFrame = preloadLevel;

    Sound Editing Notes




    Removing background noise:
    1. Create spectrum of sample
    2. identify frequency range of noise
    3. suppress frequency band − my first experience was 5653.39, so I set my range as 5631−5655, with a transition width of 250 (guessed on that).

    This was done in Amadeus II.