1. Control Global Volume in Flash

    Posted by Rob CornishPostJune 18, 2009Date

    Control the global sound in flash (AS2).

    globalSound = new Sound( ); // Doesn't have a target, sets sound to main stage
    globalSound .setVolume(0); // Used to control volume…

    One I keep forgetting about!



  2. Inserting flash to webpage

    Posted by Rob CornishPostMarch 24, 2008Date

    Using the flash.js javascript file in the head of your document.

    <script language="JavaScript" type="text/JavaScript" src="flash.js"></script>
    

    In the body of your document use:

    <script type="text/javascript">
    	FlashMovie('flashfile.swf', '500', '300');
    </script>
    

    Set the dimensions to your current flash settings, where 500 is the width and 300 is the height.



  3. Flash pre-loader code

    Posted by Rob CornishPostDate

    Simple flash pre-loader actionscript 2 code

    //Pre-Loader
    myLoaded = Math.round(getBytesLoaded());
    myTotal = Math.round(getBytesTotal()); 
    
    if (myLoaded == myTotal) {
        gotoAndPlay(2);
    } else {
        gotoAndPlay(1);
    };
    


Tags
Flickr
SelfDSC_0207DSC_0206DSC_0205
© 2008 dlnqnt - Admin - Login