Skip to content

Instantly share code, notes, and snippets.

@itoz
Created April 27, 2011 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itoz/943928 to your computer and use it in GitHub Desktop.
Save itoz/943928 to your computer and use it in GitHub Desktop.
URLからflashversをswfに渡す
var flashvars={};
if( location.search != "" ){
var str = location.search.substring( 1 );
var params = str.split( "&" );
for( var i = 0; i < params.length; i++ )
{
var values = params[ i ].split( "=" );
flashvars[ values[ 0 ] ] = values[ 1 ];
}
}
var params = {};
var attributes = {};
swfobject.embedSWF("index.swf", "content", "100%", "650", "10.0.0","", flashvars, params, attributes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment