PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
AS2 How can I use text as number?
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS2 How can I use text as number?

  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    73

    AS2 How can I use text as number?

    Here is my line of code im working with.

    Actionscript Code:
    if (_root.currCateg == undefined || _root.currCateg == "") {
               
                    this.currCateg = Number("0")
               
            }

    This works just fine. but when I send the var to the var holder location it changes to different numbers using text dynamic holder.

    Actionscript Code:
    _level0.WiiOnline.Layout.VarHolder.Myvideo_txt.text = this.settingsManager.getCategoryTitle(pNo);

    so in short when a user clicks a button it sends the number to the var holder as a dynamic text and changes each time a user clicks different buttons.

    then it reloads the player from where the var holder dynamic text is to change this line to a new number

    Actionscript Code:
    if (_root.currCateg == undefined || _root.currCateg == "") {
               
                    this.currCateg = Number("2")
               
            }

    when I try to do this to solve my problem it never works

    Actionscript Code:
    if (_root.currCateg == undefined || _root.currCateg == "") {
               
                    this.currCateg = Number(_level0.WiiOnline.Layout.VarHolder.Myvideo_txt.text)
               
            }

    how can I do what im trying to do? any one know
    WiiStream A Social Movie Network Version 0.1.1 Demo Testers Aproved http://wiistream.net/WiiStream.exe

  2. #2
    Member
    Join Date
    Sep 2010
    Posts
    73
    Solved the problem was i needed to add a var of the var name with a default num. Example in code:

    Actionscript Code:
    var Myvideo_txt.text = "0";
    //Location:
    _level0.WiiOnline.Layout.VarHolder.Myvideo_txt.text
    and it solved my problem.
    WiiStream A Social Movie Network Version 0.1.1 Demo Testers Aproved http://wiistream.net/WiiStream.exe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center