Index · Preferences · Help
Policy · Discussion · AI · Calculations · Engine · Graphics · Interface · Lists · Movement · Objects · Players · Samples · Saving · Sound · Text · Time · Turfs · Utility
Forum Search:

[Advanced Search]

[Messages in this Thread] [Show All (2)] [Return to Utility]

Author:GhostAnime [Posts]
Date:8/21/09 10:09 am
Topic:DM To Flash
Post ID:296
Next ID:298
An old snippet by Danial.Beta with Elation's help. Originally posted here

(I merely did a minor tweak that most people may not notice)

/* /////////////////////////////////////////////////////////////////
/////var2flash() proc for lib.
/////Created by Danial.Beta
/////With help by Elation
/////Description: The basic function of this is to allow communication 
/////             going from dreamseeker to a flash file. To be lib soon
///////////////////////////////////////////////////////////////// */
mob/Login()
    ..()
    var2flash('test.swf', "This is a test", src,550,400,"window=Test;size=600x500")

proc/var2flash(var/filename, var/V, var/mob/T, var/width=550, var/height=400, var/O)
    if(filename && V && T)
        var/filenameshort=copytext("[filename]",1,findtext("[filename]","."))
        T<<browse_rsc(filename)
        T<<browse({"
        <html>
            <head>
                <SCRIPT type=text/javascript>
                    var sendID
                    function var2flash() {
                        window.document.[filenameshort].SetVariable("sendvar", "[V]");
                        }
                </script> 
            </head>
            <body onLoad="var2flash()">
                   <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="[width]" height="[height]" id="[filenameshort]" align="middle">
                    <param name="allowScriptAccess" value="sameDomain" />
                    <param name="movie" value="[filename]" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="[filename]" quality="high" bgcolor="#ffffff" width="[width]" height="[height]" name="[filenameshort]" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                </object>
            </body>
            </html>
"},O)

Messages in this Thread: [Show All (2)]

  DM To Flash GhostAnime (8/21/09 10:09 am)
      DM and Flash AS3 Interaction GhostAnime (8/23/09 7:22 am)