POLALA.COM
welcome to my space
X
Search:  
Welcome to:polala.com
 HOME   Change a variable value from an .as file

Change a variable value from an .as file

Published by: rose 2010-03-16
  • Hi everybody!

    I have this problem that I don't know how to resolve. I have a variable on .as file, that it has a value of 0 (i.e. rightanswered = 0). In the same .as file, I have another variable that adds that value to a piece of text (i.e. finalscore = "Your score is " + rightanswered). Then, on the main swf, I change the variable value, to, for example, 6. The problem is that when I trace the variable (rightanswered)the value does change, but when I display on an dynamic text field (i.e. displaytxt.text = _root.finalscore), it shows me the value that is stored on the .as file (in this case, it shows me "Your score is 0" instead of "Your score is 6"). What am I doing wrong? Please someone help me with this issue.
  • NetCDF User's Guide: Components of a NetCDF File::
    Variables are used to store the bulk of the data in a netCDF file. A variable represents an array of values of the same type. A scalar value is treated as a
    http://www.unidata.ucar.edu/software/netcdf/guide_4.html
    HOME


  • Thanks for the info. Based on your information I created a function on the .as file that uses a variable that I asign on the main swf.

    function changevariable(finalvalue):Void {
    The GNU Awk User's Guide::
    While you can change the value of ARGIND within your awk program, gawk automatically sets it to a new value when the next file is opened. This variable is a
    http://www.delorie.com/gnu/docs/gawk/gawk_117.html
    HOME
    RE: How to put a variable value into a text file::
    It goes through a file of arbitrary length asking the user to change xxx values for "ComputerID=xxx" and for "Address=xxx". I think the next-to-last line is
    http://www.mail-archive.com/beginners@perl.org/msg53014.html
    HOME
    q11text= "Your score is " + finalvalue
    }

    Then, on the main swf I called the function and give it a value

    changevariable(6)

    That was a solution for me. If someone want to post another... that would be great.

    Bye!


  • you can't update the var in a .as file because flash cannot write to that file. You .as file should only contain functions etc. You'll need to keep the var in your main timeline.





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market
    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Change a variable value from an .as file , Please add it free.
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 polala.com        Site made:CFZ