A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: debugging .as scripts

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    13

    debugging .as scripts

    I am trying to debug a .as script but I do not have the ability to use trace because I am using mdm zinc. Is there another way I can see the state of variables in the .as?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Use dynamic textfields? They can be updated via a loop, enterFrame or setInterval.

    gparis

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    I tried that but the problem is I don't seem to be able to get my dynamic text fields to update.



    In the .as file I put



    _root.txt_progressbar.text = "combo.selectedItem.label: "+combo.selectedItem.label;



    But nothing changes. Any ideas how to overcome this?

  4. #4
    Senior Member
    Join Date
    Apr 2009
    Posts
    138
    try _level0. i never use root >_<
    Sorry im a big newb, If you havent seen by any of my posts. (perhaps you could help with one hehe)

    also is the text on your main stage?
    Last edited by brickhouse420; 12-20-2010 at 11:24 PM.

  5. #5
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    That didn't seem to work either.

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    needs a loop, as i said earlier.

    gparis

  7. #7
    Senior Member
    Join Date
    Apr 2009
    Posts
    138
    but even with out a loop, wouldn't it update once?

  8. #8
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    I tried:

    OnEnterFrame = function() {
    _level0.txt_progressbar.text = "combo.selectedItem.label: "+combo.selectedItem.label;
    }

    and

    function wait() {
    _level0.txt_progressbar.text = "combo.selectedItem.label: "+combo.selectedItem.label;
    clearInterval(myTimer);
    }
    var myTimer = setInterval(wait, 1000);

    Not sure if I have the syntax right but neither worked.

  9. #9
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    if zinc allows for it, use http://demonsterdebugger.com/
    it's a great little tool.
    Please sign here

  10. #10
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    Should be ok, but it was coming back with an error saying that the MonsterDebugger could not be loaded. I put in the line

    import nl.demonsters.debugger.MonsterDebugger;

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