<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Flash: FlashVars in AS3</title>
	<atom:link href="http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.six4rty.ch</link>
	<description>Code &#38; Technology Aficionado - Come for the Flash, stay for more!</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:32:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Redjester</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-68042</link>
		<dc:creator>Redjester</dc:creator>
		<pubDate>Wed, 16 Jun 2010 23:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-68042</guid>
		<description>Oops, here is what I have to call if from the HTML:



FlashVars=&quot;username=Test%20Name&quot;  width=&quot;550&quot; height=&quot;400&quot;</description>
		<content:encoded><![CDATA[<p>Oops, here is what I have to call if from the HTML:</p>
<p>FlashVars=&#8221;username=Test%20Name&#8221;  width=&#8221;550&#8243; height=&#8221;400&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Redjester</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-68041</link>
		<dc:creator>Redjester</dc:creator>
		<pubDate>Wed, 16 Jun 2010 23:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-68041</guid>
		<description>Hi there,

I am trying to simply pass some information from the HTML to an existing text field in Flash. Soon it will be to pass a username, but for now it&#039;s just testing. For some reason it isn&#039;t working.
 
Here is what I have in Flash:

function loaderComplete(myEvent:Event)
{
  var flashVars=this.loaderInfo.parameters;
  user_txt.text=flashVars.username;
}

this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);


And my HTML has params set up like this:




    
Any help on this would be much appreciated!!!
Thank you,
Redjester</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I am trying to simply pass some information from the HTML to an existing text field in Flash. Soon it will be to pass a username, but for now it&#8217;s just testing. For some reason it isn&#8217;t working.</p>
<p>Here is what I have in Flash:</p>
<p>function loaderComplete(myEvent:Event)<br />
{<br />
  var flashVars=this.loaderInfo.parameters;<br />
  user_txt.text=flashVars.username;<br />
}</p>
<p>this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);</p>
<p>And my HTML has params set up like this:</p>
<p>Any help on this would be much appreciated!!!<br />
Thank you,<br />
Redjester</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harris Grant</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67725</link>
		<dc:creator>Harris Grant</dc:creator>
		<pubDate>Fri, 28 May 2010 14:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67725</guid>
		<description>Awesome post, Your blog is really nice. I’ve found lots of helpful info. Thanks!</description>
		<content:encoded><![CDATA[<p>Awesome post, Your blog is really nice. I’ve found lots of helpful info. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alis</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67263</link>
		<dc:creator>Alis</dc:creator>
		<pubDate>Wed, 05 May 2010 18:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67263</guid>
		<description>I publish my mp3player with html using flashCS4 publish setting but the source html file is so complex even to understand{318 lines of code}.I&#039;m not a HTML expert coder but my employer told me to set mp3player communicate with HTML in order to handle different users connecting at the same time to Website. 
The test.html was just a test for me to understand how the process to read the HTML source to apply into my mp3player AS3 and as u see i couldn&#039;t.

The track information is generated by another program at Embedded Object of HTML file So I want to force my embedded SWF file to read  and assign it to my track var script.

How to shoot u the fla file?

It is your kind to solve my problem.
Thank u so much.

Alis</description>
		<content:encoded><![CDATA[<p>I publish my mp3player with html using flashCS4 publish setting but the source html file is so complex even to understand{318 lines of code}.I&#8217;m not a HTML expert coder but my employer told me to set mp3player communicate with HTML in order to handle different users connecting at the same time to Website.<br />
The test.html was just a test for me to understand how the process to read the HTML source to apply into my mp3player AS3 and as u see i couldn&#8217;t.</p>
<p>The track information is generated by another program at Embedded Object of HTML file So I want to force my embedded SWF file to read  and assign it to my track var script.</p>
<p>How to shoot u the fla file?</p>
<p>It is your kind to solve my problem.<br />
Thank u so much.</p>
<p>Alis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67256</link>
		<dc:creator>Tiago</dc:creator>
		<pubDate>Wed, 05 May 2010 13:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67256</guid>
		<description>@Alis - is the mp3player embedded in the test.html file? If yes then you don&#039;t need to load anything with the HTMLLoader just use the stage.loaderInfo example above and you should get the parameters, have a look at the update I posted.

What I would do is this:
1. Create the mp3player swf and embed in the html file, there you put flashvars with the track information you need.
2. get flashvars with the method mentioned above and everything should work perfect..

If you can&#039;t make it, shoot me the .fla file containing your player and I will take a look at it.</description>
		<content:encoded><![CDATA[<p>@Alis &#8211; is the mp3player embedded in the test.html file? If yes then you don&#8217;t need to load anything with the HTMLLoader just use the stage.loaderInfo example above and you should get the parameters, have a look at the update I posted.</p>
<p>What I would do is this:<br />
1. Create the mp3player swf and embed in the html file, there you put flashvars with the track information you need.<br />
2. get flashvars with the method mentioned above and everything should work perfect..</p>
<p>If you can&#8217;t make it, shoot me the .fla file containing your player and I will take a look at it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alis</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67251</link>
		<dc:creator>Alis</dc:creator>
		<pubDate>Wed, 05 May 2010 11:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67251</guid>
		<description>Actually I created a mp3player.swf file for a site and the track number is generated at html so my mp3player should read the html content source{for example parameter name}and play the song.

Best regards
Alis</description>
		<content:encoded><![CDATA[<p>Actually I created a mp3player.swf file for a site and the track number is generated at html so my mp3player should read the html content source{for example parameter name}and play the song.</p>
<p>Best regards<br />
Alis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67249</link>
		<dc:creator>Tiago</dc:creator>
		<pubDate>Wed, 05 May 2010 09:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67249</guid>
		<description>@Alis why exactly do you want to load an HTML file into flash?? Is there a special reason for that?
You can easily load the variables from the HTML that hosts the SWF file.</description>
		<content:encoded><![CDATA[<p>@Alis why exactly do you want to load an HTML file into flash?? Is there a special reason for that?<br />
You can easily load the variables from the HTML that hosts the SWF file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alis</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67246</link>
		<dc:creator>Alis</dc:creator>
		<pubDate>Wed, 05 May 2010 08:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67246</guid>
		<description>Hi.here I used another code for a html document named ‘Test.html’ but unfortunately it didnt work:

import flash.text.TextField;

var Url:URLRequest = new URLRequest(“Test.html”);
var vars:HTMLLoader = new HTMLLoader();
vars.load(Url);
vars.addEventListener(Event.COMPLETE,onComplete);

function onComplete(evt:Event):void {

var tf:TextField = new TextField();
tf.x = 20;
tf.y = 20;
tf.width = 200;
tf.height = 200;
tf.border = true;
addChild(tf);
var key:String
var params:Object = loaderInfo.parameters;
for (key in params) {
tf.appendText(key + “: ” + params[key] + “\n”);

}
}
Could you please help me how to fix it?
best regards

Alis
Test.html:
param name=&quot;flashvars&quot; value=&quot;foo=bar&amp;name=peter&amp;site=actionscriptexamples.com&quot; /</description>
		<content:encoded><![CDATA[<p>Hi.here I used another code for a html document named ‘Test.html’ but unfortunately it didnt work:</p>
<p>import flash.text.TextField;</p>
<p>var Url:URLRequest = new URLRequest(“Test.html”);<br />
var vars:HTMLLoader = new HTMLLoader();<br />
vars.load(Url);<br />
vars.addEventListener(Event.COMPLETE,onComplete);</p>
<p>function onComplete(evt:Event):void {</p>
<p>var tf:TextField = new TextField();<br />
tf.x = 20;<br />
tf.y = 20;<br />
tf.width = 200;<br />
tf.height = 200;<br />
tf.border = true;<br />
addChild(tf);<br />
var key:String<br />
var params:Object = loaderInfo.parameters;<br />
for (key in params) {<br />
tf.appendText(key + “: ” + params[key] + “\n”);</p>
<p>}<br />
}<br />
Could you please help me how to fix it?<br />
best regards</p>
<p>Alis<br />
Test.html:<br />
param name=&#8221;flashvars&#8221; value=&#8221;foo=bar&amp;name=peter&amp;site=actionscriptexamples.com&#8221; /</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67245</link>
		<dc:creator>Tiago</dc:creator>
		<pubDate>Wed, 05 May 2010 07:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67245</guid>
		<description>@Clay, there are many ways of accomplishing this, I think this way is good for beginners so they understand how it works.</description>
		<content:encoded><![CDATA[<p>@Clay, there are many ways of accomplishing this, I think this way is good for beginners so they understand how it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67244</link>
		<dc:creator>Tiago</dc:creator>
		<pubDate>Wed, 05 May 2010 07:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67244</guid>
		<description>cal, the variables are being created not instantiated!! the init comment is meant as &quot;initial&quot;
works perfect..</description>
		<content:encoded><![CDATA[<p>cal, the variables are being created not instantiated!! the init comment is meant as &#8220;initial&#8221;<br />
works perfect..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cal</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-67241</link>
		<dc:creator>cal</dc:creator>
		<pubDate>Wed, 05 May 2010 05:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-67241</guid>
		<description>Why the hell are you init a var AFTER YOU USE IT??

//INIT VARIABLES
var myFlashVar:String;

Is AS3 really this shit?

And it still doesn&#039;t work. Damn I hate flash with a passion.</description>
		<content:encoded><![CDATA[<p>Why the hell are you init a var AFTER YOU USE IT??</p>
<p>//INIT VARIABLES<br />
var myFlashVar:String;</p>
<p>Is AS3 really this shit?</p>
<p>And it still doesn&#8217;t work. Damn I hate flash with a passion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erick - Brazil</title>
		<link>http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/comment-page-1/#comment-62483</link>
		<dc:creator>Erick - Brazil</dc:creator>
		<pubDate>Thu, 03 Dec 2009 19:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-flashvars-in-as3/#comment-62483</guid>
		<description>Brother! You saved my life!

It&#039;s the better exemple that I found and all World Wide Web!
Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Brother! You saved my life!</p>
<p>It&#8217;s the better exemple that I found and all World Wide Web!<br />
Thanks a lot!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
