<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3739363887179139906</id><updated>2010-05-12T00:50:16.418-07:00</updated><title type='text'>2. InetSupervisor GUI</title><subtitle type='html'>A blog to help with Inetsupervisor and it's GUI development</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/blogger2.html'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.inetsupervisor.com/blogger2/InetBlog2.xml'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-9160755005007375972</id><published>2010-02-20T06:16:00.000-08:00</published><updated>2010-02-20T06:18:11.136-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='inetsupervisor'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Doing Math with Strings in Actionscript, General Type Casting</title><content type='html'>&amp;nbsp; &amp;nbsp;&amp;nbsp; I have been getting some calls about addition not working with point values from Inetsupervisor. I have no way of knowing what type of value that will be sent to the connector so I assign conn.output as a string type so I can handle all form of data values. In AS2.0 most all values that are generic objects or just are not explicitly typed are implicitly cast to string. So if you need to do addition, and 1 or more object is a string then, explicitly type cast them to the Number.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Example:&lt;br /&gt;a = status_txt.text + 15; //add the values of text box and 15. If the text is 1 but the all text is cast as string so a string concatenation will happen&lt;br /&gt;trace(a);// value is 115. Bad&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;a = Number(status_txt.text) + 15; //add the values of text box and 15. The text value is still 1 but I have cast it to a number. 2 numbers will do math operations&lt;br /&gt;trace(a);// value is 16. Good &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is most common casting you will have to work with, but sometimes you need to insert a number to a string:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;var num:Number = 5;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;a = "Hello all " + String(num) + " of you"; //num is a typed as a number with the value of 5 so it needs a cast to do string concatenation &lt;br /&gt;trace(a);// Hello all 5 of you. Good&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; So since all values in AS are based as generic objects they all can be cast to some other type when needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-9160755005007375972?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/9160755005007375972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=9160755005007375972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/9160755005007375972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/9160755005007375972'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2010/02/doing-math-with-strings-in-actionscript.html' title='Doing Math with Strings in Actionscript, General Type Casting'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-5850678090669704426</id><published>2009-11-26T06:27:00.000-08:00</published><updated>2010-02-20T05:57:07.069-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Debugging flash movies with trace()</title><content type='html'>When we start making custom flash for Inetsupervisor they tend to be small and relatively easy, but as we become more comfortable with flash we start to test our programming chops and want our little movies to behave more like apps with all the bells, whistles, functionality and bugs that go along with that. I have been using a plugin for firefox called Flash Tracer for a while and have found it very useful. Flash Tracer works with the trace function in flash, some of you may not know what the trace function is so here is an explanation straight from Adobes website:&lt;br /&gt;&lt;br /&gt;&lt;span class="heading1"&gt;trace&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Availability&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;Flash Player 4.&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Usage&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;trace(&lt;/code&gt;  &lt;code&gt;&lt;span style="color: #666666;"&gt;expression&lt;/span&gt;&lt;/code&gt;  &lt;code&gt;)&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Parameters&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: #666666;"&gt;expression&lt;/span&gt;&lt;/code&gt; &lt;span class="mmbody"&gt; An expression to evaluate. W&lt;/span&gt;&lt;span class="mmbody"&gt;hen a SWF file is opened in the Flash authoring tool (via the Test Movie command), the value of the &lt;/span&gt; &lt;code&gt;&lt;span style="color: #666666;"&gt;expression&lt;/span&gt;&lt;/code&gt; &lt;span class="mmbody"&gt; parameter is displayed in the Output window. &lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Returns&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;Nothing.&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;Action; evaluates the &lt;/span&gt; &lt;code&gt;&lt;span style="color: #666666;"&gt;expression&lt;/span&gt;&lt;/code&gt; &lt;span class="mmbody"&gt; and displays the result in the Output window in test mode.&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;Use &lt;/span&gt; &lt;code&gt;trace&lt;/code&gt; &lt;span class="mmbody"&gt; to record prog&lt;/span&gt;&lt;span class="mmbody"&gt;ramming notes or to display messages in the Output window while testing a movie. Use the &lt;/span&gt; &lt;code&gt;&lt;span style="color: #666666;"&gt;expression&lt;/span&gt;&lt;/code&gt; &lt;span class="mmbody"&gt; parameter to check if a condition exists, or to display values in the Output window. The &lt;/span&gt; &lt;code&gt;trace&lt;/code&gt; &lt;span class="mmbody"&gt; action is similar to the &lt;/span&gt; &lt;code&gt;alert&lt;/code&gt; &lt;span class="mmbody"&gt; function in JavaScript.&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;You can use the Omit Trace actions command in Publish Settings to remove &lt;/span&gt; &lt;code&gt;trace&lt;/code&gt; &lt;span class="mmbody"&gt; actions from the exported SWF file. &lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="mmbody"&gt;This example is from a game in which a draggable movie clip instance named &lt;/span&gt; &lt;code&gt;rabbi&lt;/code&gt; &lt;span class="mmbody"&gt; must be released on a specific target. A conditional statement evaluates the &lt;/span&gt; &lt;code&gt;_droptarget&lt;/code&gt; &lt;span class="mmbody"&gt; property and executes different actions depending on where &lt;/span&gt; &lt;code&gt;rabbi&lt;/code&gt; &lt;span class="mmbody"&gt; is released. The &lt;/span&gt; &lt;code&gt;trace&lt;/code&gt; &lt;span class="mmbody"&gt; action is used at the end of the script to evaluate the location of the &lt;/span&gt; &lt;code&gt;rabbi&lt;/code&gt; &lt;span class="mmbody"&gt; movie clip, and display the result in the Output window. If &lt;/span&gt; &lt;code&gt;rabbi&lt;/code&gt; &lt;span class="mmbody"&gt; doesn't behave as expected (for example, if it snaps to the wrong target), the values sent &lt;/span&gt;&lt;span class="mmbody"&gt;to the Output window by the &lt;/span&gt; &lt;code&gt;trace&lt;/code&gt; &lt;span class="mmbody"&gt; action will help you determine the problem in the script.&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;on(press) {&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; rabbi.startDrag();&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;}&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;on(release) {&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; if(eval(_droptarget) != target) {&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;    rabbi._x = rabb&lt;/code&gt;&lt;code&gt;i_x;&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;    rabbi._y = rabbi_y;&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; } else {&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;  rabbi_x = rabbi._x;&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;  rabbi_y = rabbi._y;&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;  target = "_root.pasture";&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; }&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; trace("rabbi_y = " + rabbi_y);&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; trace("rabbi_x = " + rabbi_x);&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt; stopDrag();&lt;/code&gt; &lt;span class="mmbody"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;as you can see the trace function will take an object value and then write it as text. In this case Adobe is talking about displaying the text in the output window of the flash program during a debugging session, but what about when you are vieing it on a webpage. This is where Flash Tracer comes to the rescue. Flash Tracer will capture the text coming out of the trace() and display it on a window in your browser.&lt;br /&gt;&lt;br /&gt;Before I begin to show you how to use trace() and the Tracer you will need to setup your machine. First and foremost &lt;a href="http://www.mozilla.com/en-US/firefox/personal.html"&gt;Firefox &lt;/a&gt;will have to be on the machine, second get &lt;a href="http://www.sephiroth.it/firefox/flashtracer/"&gt;Flash Tracer&lt;/a&gt; plugin for Firefox, then third you'll need a &lt;a href="http://www.adobe.com/support/flashplayer/downloads.html"&gt;debugging version of flash player&lt;/a&gt;. Once you have all that downloaded and installed then we need to setup Flash Tracer.&lt;br /&gt;&lt;pre&gt;&lt;a href="http://www.inetsupervisor.com/blogger2/uploaded_images/prefs-749869.bmp" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://www.inetsupervisor.com/blogger2/uploaded_images/prefs-749831.bmp" style="cursor: pointer; float: left; height: 177px; margin: 0pt 10px 10px 0pt; width: 320px;" /&gt;&lt;/a&gt;&lt;/pre&gt;Start Firefox and then Tracer by   going to Tools --&amp;gt; Flash Tracer when it is running click on the wrench icon on the lower right for preferences. At the top you will see Select File Output depending on you operating system this file will be located in different locations, just follow the defaults for you OS and you should be fine. The rest of the preferences you can leave as the defaults as they are mostly styling.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next lets write some code to show how this works. Make a movie then add the following code:&lt;br /&gt;&lt;br /&gt;setInterval(funct,1000);//repeating timer to run a function set at 1 second&lt;br /&gt;var inc:Number = 0;//conting variable&lt;br /&gt;function funct()//function that is called by the repeating interval&lt;br /&gt;{&lt;br /&gt;trace(inc++);//increase the value of inc and output the value to the trace&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;a href="http://www.inetsupervisor.com/blogger2/uploaded_images/test1-724755.bmp" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://www.inetsupervisor.com/blogger2/uploaded_images/test1-724737.bmp" style="cursor: pointer; float: left; height: 175px; margin: 0pt 10px 10px 0pt; width: 320px;" /&gt;&lt;/a&gt;&lt;/pre&gt;Build the movie, insert into a webpage, and as you can see now when we run the movie with Flash Tracer every second the value of inc gets updated and ported to the text. You can forward the value of anything to the trace() strings, numbers, names or you can use it to confirm actions have happened like when a button is clicked. I hope this helps/encourages more and better flash development&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-5850678090669704426?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/5850678090669704426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=5850678090669704426' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/5850678090669704426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/5850678090669704426'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2009/11/debugging-flash-movies-with-trace.html' title='Debugging flash movies with trace()'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-1077954303399109374</id><published>2009-04-09T14:08:00.000-07:00</published><updated>2009-04-09T15:41:37.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='inetsupervisor'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Flash Movie to send multiple, user defined values</title><content type='html'>Most of the time everybody works with the standard override values, ON - OFF or some setpoint value, but what if we need something more. What do you do if you made you own variable that does 3 or more functions. Plus what if we need to change the output based on the type of equipment. We will focus on a movie that has 3 buttons and will send a different user defined value depending on which button is clicked. In addition I will show you how to add and use EventListener's.&lt;br /&gt;&lt;br /&gt;  First start a new movie, drop a connector component and 3 buttons. Give everybody an instance name and assign the ID to the connector.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;con.ID = PointID; // Assign the point ID to work with&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Then we will add some code to change the button labels just incase the defaults don't jive with what we are tring to do.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;                 //This runs to find if any params called names exist if it does then use it to change the names of the buttons&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;               //names must be a comma delimited string of names&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;              if (names != undefined){//param names exist&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;                     var button_names:Array = names.split(',');//split the string by comma's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;                     button1.label = button_names[0];//assign first object &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;                     button2.label = button_names[1];//assign second object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;                     button3.label = button_names[2];//assign third object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we need to make a variable to hold our output values then fill it up with some values&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;var output_values:Array = new Array();//create an array to hold the output values&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the prameter &lt;span style="font-style: italic;"&gt;outputvalue &lt;/span&gt;exist then parse it and fill the array&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;if (outputvalue != undefined){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    var outputValuesTmpArray:Array = outputvalue.split(',');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[0] = outputValuesTmpArray[0];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[1] = outputValuesTmpArray[1];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[2] = outputValuesTmpArray[2];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;else{//no user defined output values so assign some default values&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[0] = "0";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[1] = "1";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;    output_values[2] = "2";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Your default values can be anything I would suggest your most common used values, so you don't have to override them as much.&lt;br /&gt;Next all that is need is the code to send the value when the button is clicked.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;button1.addEventListener("click",button1_listener);//create a listening function for the click event of button 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;function button1_listener(evt){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;  con.sendOverride(PointID,output_values[0]);//when button 1 is clicked send the 1st value of the output_value array&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;button2.addEventListener("click",button2_listener);//create a listening function for the click event of button 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;function button2_listener(evt){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;  con.sendOverride(PointID,output_values[1]);//when button 2 is clicked send the 2nd value of the output_value array&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;button3.addEventListener("click",button3_listener);//create a listening function for the click event of button 3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;function button3_listener(evt){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;  con.sendOverride(PointID,output_values[2]);//when button 3 is clicked send the 3rd value of the output_value array&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;stop();//stop at this frame&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   Normally I would have you place the con.sendOverride function inside the button using the &lt;span style="font-style: italic;"&gt;on(click)&lt;/span&gt; method and use the &lt;span style="font-style: italic;"&gt;_parent&lt;/span&gt; scope, but I thought this would be a good opertunity to show you EventListeners. All objects(buttons, text, graphics...) fire events when they do things (mouse click|up|down|over, change,resize...) and if you what to do something when this happens you can attach a listener function to fire when the event happens. In the case of button1, we attached the function &lt;span style="font-style: italic;"&gt;button1_listener&lt;/span&gt; to the &lt;span style="font-style: italic;"&gt;"click"&lt;/span&gt; event, so when the &lt;span style="font-style: italic;"&gt;"click"&lt;/span&gt; event fires &lt;span style="font-style: italic;"&gt;button1_listener&lt;/span&gt; will "hear" it and then run. When the &lt;span style="font-style: italic;"&gt;button1_listener&lt;/span&gt; function runs we send out the value of &lt;span style="font-style: italic;"&gt;output_value[instance 0]&lt;/span&gt;. This can be used to make graphics into buttons or do something while typing...&lt;br /&gt;&lt;br /&gt;  Next just place the movie on your web page and set the PointID then names value with a comma delimited string (ie names=hand,off,auto) if you need, and do the same with outputvalue (ie outputvalue=ST_LOW,ST_MED,ST_HIGH or outputvalue=100.0 1,0.0 0,0.0 -1). If you need more then 3 options you can just add more buttons and use the next array value instance or maybe use a combobox or different type of UI to scale it up.&lt;br /&gt;&lt;br /&gt;You can download the source and compiled here.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.inetsupervisor.com/blogger2/3_Button.rar"&gt;3_Button.rar&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-1077954303399109374?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/1077954303399109374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=1077954303399109374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1077954303399109374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1077954303399109374'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2009/04/flash-movie-to-send-multiple-user.html' title='Flash Movie to send multiple, user defined values'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-3095713890915696910</id><published>2009-01-02T06:55:00.000-08:00</published><updated>2009-04-09T14:24:23.967-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='inetsupervisor'/><category scheme='http://www.blogger.com/atom/ns#' term='dreamweaver'/><title type='text'>DreamweaverCS4 AC_FL_RunContent Script Compatibility</title><content type='html'>The CS4 version of DW does not support or use AC_FL_RunActiveContent script for flash movies anymore. If you remember This script was used to stop the ActiveX hash box in Internet Explorer 6 and 7. This had not been nessisary for IE since an update in the first part of 2008.&lt;br /&gt;&lt;br /&gt;If you have made pages with DW8.02 or CS3 and have the "Insert Browser Safe Script" option check then you have seen this script generated. When (or if) you transfer to the CS4 version of Dreamweaver and you work with the older web pages the flash movies will not update any changes you will make. This is caused by the fact that the  AC_FL_RunActiveContent script actually creates and loads the flash movie for you from javascript and CS4 does not update the information in the script as it does in the object, so when you load the movie only the old information is loaded. There are 2 options to fix this issue:&lt;ol&gt;&lt;li&gt;Remove the script by hand&lt;/li&gt;&lt;li&gt;Modify Dreamweaver to update the scripting&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;We will start with option 1. &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.inetsupervisor.com/blogger2/uploaded_images/code-703624.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 650px; height: 208px;" src="http://www.inetsupervisor.com/blogger2/uploaded_images/code-702457.png" alt="" border="0" /&gt;&lt;/a&gt;When looking at the flash movie in "code" design you will notice the object is wrapped in noscript tags. This is used to tell the browser not to generate the information inside of these tag's. So the only thing generated by the browser is the content created by the AC_FL_RunActiveContent script above it. When you modify the object tag, dreamweaver use to automatically match the script above it. This is no longer done. To remove the javascript you must delete everything inside and including the script tag's al well as the noscript tag's so the browser will generate the movie content. This can be done on a site wide basis easily using dreamweavers find and replace utility. Once the scripting has been removed the object will be generated on it's own with all of the new or modified options applied.&lt;br /&gt;&lt;br /&gt;Option 2 is much easier. If you shutdown dreamweaver first then take the files from:&lt;br /&gt;%windir%:\Program Files\Macromedia\Dreamweaver 8\Configuration\ActiveContent\Converters&lt;br /&gt;if you were working with DW8, or&lt;br /&gt;%windir%:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\ActiveContent\Converters&lt;br /&gt;if you were working with CS3 and put them in&lt;br /&gt;%windir%:\Program Files\Adobe\Adobe Dreamweaver CS4\configuration\ActiveContent\Converters&lt;br /&gt;When you start up dreamweaver and modify a flash movie the RunActiveContent script will be updated just like CS3 or DW8.02. There should be 6 files in the old DW folder:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;ActiveContent.js&lt;/li&gt;&lt;li&gt;ActiveContent.xml&lt;/li&gt;&lt;li&gt;ActiveX.htm&lt;/li&gt;&lt;li&gt;ActiveX.js&lt;/li&gt;&lt;li&gt;Adobe.htm&lt;/li&gt;&lt;li&gt;Adobe.js&lt;/li&gt;&lt;/ol&gt;all 6 need to be moved and if the new folder has the file ActiveContent.xml already in it just override the new one.&lt;br /&gt;&lt;br /&gt;This is only needed if you are making changes to pages originally made from older DW's with the browser safe script option enabled, it is not necessary for new aspx pages made because the RunActiveContent script is not generated. I have included a copy of the missing files.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.inetsupervisor.com/blogger2/Converters.rar"&gt;Converters.rar&lt;/a&gt; The missing files&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;a title="blocked::http://www.inetsupervisor.com/Support/default.htm" href="http://www.inetsupervisor.com/Support/default.htm"&gt;http://www.inetsupervisor.com/Support/default.htm&lt;/a&gt;    “InetSupervisor SUPPORT”&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;a title="blocked::http://www.inetsupervisor.com/Products/Default.htm" href="http://www.inetsupervisor.com/Products/Default.htm"&gt;http://www.inetsupervisor.com/Products/Default.htm&lt;/a&gt;    “Quark Communications PRODUCTS”&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a title="blocked::http://www.inetsupervisor.com/" href="http://www.inetsupervisor.com/"&gt;http://www.inetsupervisor.com&lt;/a&gt;       “InetSupervisor  HOME”&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-3095713890915696910?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/3095713890915696910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=3095713890915696910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/3095713890915696910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/3095713890915696910'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2009/01/dreamweavercs4-acflruncontent-script.html' title='DreamweaverCS4 AC_FL_RunContent Script Compatibility'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-1557823914740050599</id><published>2008-09-03T16:25:00.000-07:00</published><updated>2009-04-09T14:26:11.949-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inetsupervisor'/><category scheme='http://www.blogger.com/atom/ns#' term='URLparameters'/><title type='text'>Passing URLconfiguration  parameters to the Trend Viewer</title><content type='html'>&lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt; &lt;p style="margin-bottom: 0in;"&gt; &lt;span style=""&gt;If you are using the latest version of our &lt;a href="http://www.inetsupervisor.com/public/InetSupervisor/"&gt;TrendViewer &lt;/a&gt;(as of this writing in the beta download folder with August 15&lt;/span&gt;&lt;sup&gt;&lt;span style=""&gt;th&lt;/span&gt;&lt;/sup&gt;&lt;span style=""&gt; date or later), the ability to pass URL parameters to configure the trend viewer is available. This can be useful for users that view or want to view the same information on a regular bases. A link can be made to set up the viewer on load so the user does not have to choose the same points and set the date range each time they want to see a specific report. The long time Inetsupervisor users should know about setting up URL parameters to web pages, but I will go over it again for newer user. &lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; URL parameters are a string of ampersand(&amp;amp;) delimited variables, and there associated values, that can be added to the end of a web page address(link). These vars, if the web page knows what to do with them, can configure or modify the web page when it loads. Also as in our case the web page can  pass it to an object in the web page such as a flash movie. The start of the string of vars is always a question mark symbol(?) this will tell the web page that variables are coming. The next is to put the parameter name (remember case sensitive) followed by an equal sign(=) then the value of the parameter. If there are more then 1 parameters then an ampersand(&amp;amp;) needs to follow the value and before the next parameter's name, then complete as the first. Do the same for any additional parameter's.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; The Trend Viewer will accept 13 configuration parameters:&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;ids   &lt;/span&gt;This is a comma delimited string of Inetsupervisor point id's. When  this parameter is passed the viewer will automatically choose the  points in the string on load.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;rids  &lt;/span&gt;This is the same as ids but it will assign the point id's to the  right side Y axis. This can be used to overlay trend graphs with  different value ranges.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;startoffset  &lt;/span&gt;This is an number used to specify an amount of days to start the  viewer prior to the current date. For instance if you wish to start  the selected view for the last 7 days you would enter 7.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt; &lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;pen1  – pen10&lt;/span&gt; These are comma delimited strings used to define the  color, type, and form of the individual pen lines of data. The  string must contain the color, in RGB format, then the pen type  (available pen types: line(default) , plot, area or column) typed  out (case sensitive), then the pen form (available pen forms:  curve(default), segment, step, reverseStep, vertical or horizontal)  typed out (case sensitive).&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Some examples:&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; When  the viewer opens I want to load point 23. &lt;/span&gt;  &lt;/p&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Open  the tree editor&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Drag  over the QTrendsById.aspx web page from the sysapp folder.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Double  click to open the properties.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;At  the bottom property URL add ?ids=23 to the end of the string&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Save  and refresh tree&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;When  you click the link the viewer will open to point 23 loaded with  todays data&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;/p&gt;&lt;/ol&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Add    points 24 and 67&lt;/span&gt;&lt;/p&gt;&lt;/ol&gt;&lt;/ol&gt;  &lt;/li&gt;&lt;li value="1"&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Open  the tree editor&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Double  click to open the properties of the above node.&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Change  ?ids=23 to ?ids=23,24,67&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Save  and refresh&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Now  it loads points 23, 24 and 67&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Move point 67 to the right Y axis and load 5 days of data. Same as above, but change ?ids=23,24,67 to ?ids=23,24&amp;amp;rids=67&amp;amp;startoffset=5 Now point 67is attached to the right Y axis and 5 days of data shows&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Show point 67 as a blue column type grid, change to  ?ids=23,24&amp;amp;rids=67&amp;amp;startoffset=5&amp;amp;pen3=0x0000FF,column,curve Notice that the last parameter is pen3 not pen1 that is because when the points are loaded the viewer loads all the points from ids first then the points from rids, so 67 would be the 3&lt;/span&gt;&lt;sup&gt;&lt;span style=""&gt;rd&lt;/span&gt;&lt;/sup&gt;&lt;span style=""&gt; series in the line. Not all the parameter's have to be used and they do not need to be in any order, but remember if you are specifying a pen then it has to be color,type,form and all parts of the string need to be there, even if you are using a chart type that requires no information from the form like a plot. These reports can also be linked not only from the tree but also buttons, text, browser favorites, custom flash or any place a web link can be placed.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; You can also view a tutorial on using the Trend Viewer on the web at &lt;a href="http://www.inetsupervisor.com/Support/Multimedia/default.htm"&gt;http://www.inetsupervisor.com/Support/Multimedia/default.htm&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-1557823914740050599?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/1557823914740050599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=1557823914740050599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1557823914740050599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1557823914740050599'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2008/09/passing-urlconfiguration-parameters-to.html' title='Passing URLconfiguration  parameters to the Trend Viewer'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-1766230161265726970</id><published>2008-08-28T21:27:00.000-07:00</published><updated>2009-04-09T14:26:58.922-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lonworks'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='inetsupervisor'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Enumerated variables</title><content type='html'>&lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt; &lt;p style="margin-bottom: 0in;"&gt; Enumerated variables or types are data multiple data “chunks” grouped together into one piece of information. The 2 main reasons for enumerated data are&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Controllers that are limited in  the amount of variables they are allowed to expose to the network.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Network commands that require more  then a simple ON|OFF or analog value.&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;The data is delimited in some way to recognize the individual parts, like a comma or carrot. This delimiter is what we will use to parse out some data, work with the individual parts, then reassemble the data and send it back to the controller.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; In this example we will be working with a LonWorks UNVT made by the Distech company. The process would hold true for any enumerated data from any protocol once it has been imported into the Atlas database. This variable is used to modify or override the internal vars and physical input and output values in the controller. The variable has 4 parts separated by white space(aka empty char). The first is the type field, this is a string that specifies what type of var to override. Second is the index of the  type field, this is a unsigned short. Third is the mode, another string specifying manual or automatic operation. The last is the value to be applied to the overriding var it is a signed long.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;//////////////////////////////////Code//////////////////////////////////////////////////////////////////////////////////////////////////&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;_global.style.setStyle("themeColor", "haloBlue");//change the style&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;/*********************Initilize the local vars************************************/&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;con.ID = PointID;// Assign the point ID to work with&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var output_timer:Number = setInterval(evaluateOutput, 3000);// Set timer to display updated values&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var type:String = "";&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var index:Number = 0;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var md:String = "";&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var val:Number = 0;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var overrideVal:String = "";&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;var sentOverride:Boolean = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;/******************Start the UI not edible until a good value comes in***********/&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;IntValType.enabled = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Index.enabled = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Mode.enabled = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Value.enabled = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Send.enabled = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; The first bit of code just sets up the “theme” for the movie, internal variables to handle the parsed data, and disables the UI for now. By the way I am using 2 number steppers for the index and value, 2 combo-boxes for the type and mode and a button for sending the override value for my UI.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;//********************* Main body functions ***************&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;function evaluateOutput(){&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; if (!sentOverride){//make sure we are not sending an override or making one&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  if ((String(con.output).indexOf("?") == -1) &amp;amp;&amp;amp; (con.output != undefined)){//check for a good connection to the controller and a valid value  &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   type = String(con.output).split(" ")[0];//load the public var&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   IntValType.text = type;//update the ui&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   index = Number(String(con.output).split(" ")[1]);&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Index.value = index;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   md = String(con.output).split(" ")[2];&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Mode.text = md;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   val = Number(String(con.output).split(" ")[3]);&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Value.value = val;//update the ui&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  }&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  else if (String(con.output).indexOf("?") &gt; -1){//updat ethat the controller is not communicating&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   IntValType.text = "Error";&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Index.value = 0;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Mode.text = "Error";&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Value.value = 0;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  }&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  if (con.isNew == "1"){//if the val is new then allow the ui to work&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   IntValType.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Index.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Mode.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Value.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;   Send.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  }&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; else if(con.output == overrideVal){&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  sentOverride = false;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  type = String(con.output).split(" ")[0];//load the public var&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  IntValType.text = type;//update the ui&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  index = Number(String(con.output).split(" ")[1]);&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  Index.value = index;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  md = String(con.output).split(" ")[2];&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  Mode.text = md;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  val = Number(String(con.output).split(" ")[3]);&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  Value.value = val;//update the ui&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  IntValType.enabled = true;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;}&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;stop();//stops the continuation of frames&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; In my main function I first check to see if I should pause the updating of the UI because we are in the process of making or sending an override and that the connector has a value and the value is not ??? because the drive cannot connect with the controller. If that is good then we get to the meat of this lesson. Since we know the delimiter and how many parts to expect we can now parse the data and put it into our individual vars created above. First we take the output and cast it into a string type &lt;b&gt;String(con.output) &lt;/b&gt;&lt;span style=""&gt;then split that string with our delimiter String(con.output)&lt;/span&gt;&lt;b&gt;.split(“ “)&lt;/b&gt;&lt;span style=""&gt;. The data will now be in an array of parts and we can then choose the piece to grab and assign to the internal var type = String(con.output)&lt;/span&gt;&lt;b&gt;.&lt;/b&gt;&lt;span style=""&gt;split(“ “)&lt;/span&gt;&lt;b&gt;[0]. &lt;/b&gt;&lt;span style=""&gt;Do this 3 more times assigning the appropriate piece to all of the internal vars and now you can adjust them , display them or do what ever you want with them as individuals. &lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;//////////////////////////////////Code//////////////////////////////////////////////////////////////////////////////////////////////////&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;on (click){//when button is mouse clicked:&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; _parent.overrideVal = _parent.type+" "+String(_parent.index)+" "+_parent.md+" "+String(_parent.val);&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; _parent.con.sendOverride(_parent.PointID,_parent.overrideVal);//send and override with the current point ID and the override value&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; When you are done adjusting the individual vars you will need to send them back to the controller for processing. To do this you need to assemble the individuals back into the form that the controller will accept. This is done by assembling a string with the values and appropriate delimiter, and sending thru the connector. &lt;/span&gt;&lt;b&gt;_parent.overrideVal = _parent.type+" "+String(_parent.index)+" "+_parent.md+" "+String(_parent.val); &lt;/b&gt;&lt;span style=""&gt;assembles the string with a “ ”(white space) between each. &lt;/span&gt;&lt;b&gt;_parent.con.sendOverride(_parent.PointID,_parent.overrideVal); &lt;/b&gt;&lt;span style=""&gt;sends the override.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt; This could also be done without assigning the array to the individual vars and then reassembling with a for loop, but if you go that route remember that each index of the array will be a string type and other types will need to be cast before they work as expected, also keep a list of what index holds what information because tempArray[7] is not as descriptive as mode, or value, or alarm.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;You can download the source and compiled here&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://www.inetsupervisor.com/blogger2/Fx-UNVT-modify_internal_val.zip"&gt;Fx-UNVT-modify_internal_val.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-1766230161265726970?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/1766230161265726970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=1766230161265726970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1766230161265726970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/1766230161265726970'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2008/08/enumerated-variables.html' title='Enumerated variables'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-5484521164553458710</id><published>2008-04-23T06:24:00.001-07:00</published><updated>2009-04-09T14:27:58.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Using Multiple Points in a Flash Movie</title><content type='html'>&lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt; &lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;For the most part a single point id is all that is needed to run a flash component, but what if you want to make a more complex component that say compares 2 point values to change a background- color. This can be done by adding more then 1 connector to you flash movie. A connector can only have 1 point id associated with it, but there is no limit to amount of connectors you have in the movie.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt; To add more connectors is easy it is the same steps as the first connector, just need to add a unique instance name and pass the point id with a unique POST variable. For example I will show how to compare a space temperature to a space setpoint and change the text box background color based on the difference. For simplicity I will assume the reader has done the exercises in the flash SDK and has a working knowledge of flash and the connector component. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="color: rgb(255, 255, 255);"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Setup  a flash movie with a Text Input box and give the box the name of  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;status_txt&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Drag  and drop 2 instances of the connector component on to the movie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Name  the first connector &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;conn&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Name  the second connector &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;conn2&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Add  the following code to the movie to pass the point id's from the POST  variables to the connector's &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;  &lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;conn.ID = PointID; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; conn2.ID = PointID2;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="color: rgb(255, 255, 255);" start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Then  add a timer and point it to a function &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;  &lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Add  this code inside of the timed function. This code will compare the 2  values and update the&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;ol style="color: rgb(255, 255, 255);"&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;background  color of &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;status_txt&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; var pointValue = Number(conn.output);//assign the space temperature&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; var pointValue2 = Number(conn2.output);//assign the space setpoint&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;if (((pointValue-pointValue2)&lt;=1) || ((pointValue2-pointValue)&lt;=1)){&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.98in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;status_txt.setStyle('backgroundColor',"0xFFFFFF");//even&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;}&lt;/a&gt;&lt;a&gt; &lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;if ((pointValue-pointValue2)&gt;1){&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; status_txt.setStyle('backgroundColor',"0xFF66CC");//1deg hot&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;}&lt;/a&gt;&lt;a&gt; &lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;if ((pointValue2-pointValue)&gt;1){&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; status_txt.setStyle('backgroundColor',"0x00FFFF");//1deg cool&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;}&lt;/a&gt;&lt;a&gt; &lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;if ((pointValue-pointValue2)&gt;2){&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; status_txt.setStyle('backgroundColor',"0xFF0000");//2deg hot&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;if ((pointValue2-pointValue)&gt;2){&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt; status_txt.setStyle('backgroundColor',"0x0066FF");//2deg cool&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-left: 0.49in; margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol style="color: rgb(255, 255, 255);" start="7"&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="font-family:Arial;"&gt;&lt;i&gt;&lt;span style="text-decoration: none;"&gt;status_txt.text  = pointValue;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;Publish  the flash and drop it on a web page&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;Assign  the POST variables PointID=the space temperature PointID and  PointID2=space setpoint PointID. The above code is functional but  not finished. Proper coding should be added for error checking and  null values.&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;  &lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(255, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;a&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt; Now you have a movie that can assign more then 1 point id for any number of reasons. At this point you can see a trend happening. If you need a 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;sup&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt;rd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/code&gt;&lt;code&gt;&lt;a&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style=""&gt;&lt;span style="text-decoration: none;"&gt; point just add a new connector give it a unique name and assign the point id to it, and so on for as many point id's needed for your movie. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-5484521164553458710?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/5484521164553458710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=5484521164553458710' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/5484521164553458710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/5484521164553458710'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2008/04/for-most-part-single-point-id-is-all.html' title='Using Multiple Points in a Flash Movie'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3739363887179139906.post-2495925062421303284</id><published>2008-03-03T20:30:00.000-08:00</published><updated>2009-04-09T14:28:29.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Using the flash setStyle() function</title><content type='html'>&lt;span&gt;I have been asked a from time to time about how to personalize individual text area's or input boxes by developers. The answer as always is that it depends. If you have worked with flash before then you are use to the IntelliSense giving you hints as to what options are available for each UI component. This works well if you are customizing a textfield, however if you are working with a textinput or textarea box's (as most people do) the same _txt.backgroundColor and _txt.textColor show up in IntelliSense but make no change to the desired UI. Frustrating I know. The difference is the textfield is a simple display box and the textarea and textinput are pre-compiled, skinned components. That is where the setStyle function comes into play. This same function is used to modify any number of parts in just about all pre-compiled UI, but we will stick with the text for now.&lt;br /&gt;&lt;br /&gt;SetStyle is a simple function consisting of 2 passed parameters:&lt;br /&gt;1.The style name to be modified, as a string.&lt;br /&gt;2.The value to change the style to, as an object.&lt;br /&gt;The only hard part I have heard from people using this function is knowing what to send because there is no IntlleSence for this function, but with a little google searching and common sense you should be able to figure out what to send for each style name. For starters here is a link to help the searching &lt;/span&gt;&lt;a href="http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;amp;file=00004041.html"&gt;&lt;span&gt;http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;amp;file=00004041.html&lt;/span&gt;&lt;/a&gt;&lt;span&gt;. To use the function start with the instanceName of your UI we will call it ui then just call the function ui.setStyle(“backgroundColor”, 0xFF0000) this will change the backgroundColor of the UI text to turn red, or ui.setStyle(“fontSize”, 20) will give a you a 20 sized text. The link above will list the rest of the style names but they are all used the same way. One last quick code hint, if you have a style you want all of you UI's to follow use _global.style instead of the UI instance name for the setStyle() function and have the function run up front this will affect all the UI's so there is no need to type the code in for every UI.&lt;br /&gt;&lt;br /&gt;Happy Coding&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3739363887179139906-2495925062421303284?l=www.inetsupervisor.com%2Fblogger2%2Fblogger2.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/2495925062421303284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3739363887179139906&amp;postID=2495925062421303284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/2495925062421303284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3739363887179139906/posts/default/2495925062421303284'/><link rel='alternate' type='text/html' href='http://www.inetsupervisor.com/blogger2/2008/03/using-flash-setstyle-function.html' title='Using the flash setStyle() function'/><author><name>Quark Comm. dev. team</name><uri>http://www.blogger.com/profile/14937656627203240384</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17464728258006944881'/></author><thr:total>0</thr:total></entry></feed>
