header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
meoden8x
Points:110
Posts:0
Answered

8/25/2010 3:47:15 AM

Title: How to get flashvar value in AS3


Here is my HTML code:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>socnhimusic</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style type="text/css" media="screen">
		html, body { height:100%; background-color: #009933;}
		body { margin:0; padding:0; overflow:hidden; }
		#flashContent { width:100%; height:100%; }
		</style>
	</head>
	<body>
		<div id="flashContent">
			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1000" height="1000" id="socnhimusic" align="middle">
				<param name="movie" value="socnhimusic.swf" />
				<param name="quality" value="high" />
				<param name="bgcolor" value="#009933" />
				<param name="play" value="true" />
				<param name="loop" value="true" />
				<param name="wmode" value="window" />
				<param name="scale" value="showall" />
				<param name="menu" value="true" />
				<param name="devicefont" value="false" />
				<param name="salign" value="" />
                <param name="flashvars" value="id=327" />
				<param name="allowScriptAccess" value="sameDomain" />
				<!--[if !IE]>-->
				<object type="application/x-shockwave-flash" data="socnhimusic.swf" width="1000" height="1000">
					<param name="movie" value="socnhimusic.swf" />
					<param name="quality" value="high" />
					<param name="bgcolor" value="#009933" />
					<param name="play" value="true" />
					<param name="loop" value="true" />
					<param name="wmode" value="window" />
					<param name="scale" value="showall" />
					<param name="menu" value="true" />
					<param name="devicefont" value="false" />
					<param name="salign" value="" />
                    <param name="flashvars" value="id=327"
                     />
					<param name="allowScriptAccess" value="sameDomain" />
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflash">
						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>
	</body>
</html>

I want to get the id value by AS3, Please help me.



1
RedBull
Points: 930
Posts:0
Accepted Answer
8/25/2010 3:58:33 AM



to read flashvars you can use LoaderInfo Object ,
create a method

//this method returns the Object
private function readFlashVars():Object {
 return Object( LoaderInfo( this.loaderInfo ).parameters );
}
//to read "Id" varibale in your case use 
var myId = readFlashVars().id;



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+6 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions