A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [F8] Why does the variable lose definition?

Hybrid View

  1. #1
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    or break it down even further to check the logic -
    PHP Code:
    downM.onRelease = function() {
    varInc _root.i++;  trace(varInc);
    _root.goalY _root.myYArray[varInc];  trace(_root.goalY); // 
    slideY(_root.goalY);
    };

    function 
    slideY(num) {
    trace(num);
    _root.dataFile.onEnterFrame = function() {
    _root.dataFile.diff Math.abs(_root.dataFile._y num);
    trace(_root.dataFile.diff);
    ....


  2. #2
    Instructional Designer
    Join Date
    Feb 2005
    Location
    Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
    Posts
    299
    dawsonk's tip was right-on. Adding _root to the u and i, made the difference. Now I need to fix the lack of limits. The scrolling worked initially and then erratcally, then not at all. Debug showed that the index was at a negative position.

    But this is progress!

    Dog, you are quite right to provide debug guidance. These tips are greatly appreciated (I want to catch my own fish).
    Tomas

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