A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: order of events?

  1. #1
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127

    order of events?

    Hi,
    simple version of my problem code.
    PHP Code:
    function setup():void{
        
    tableWeigh_mc.gotoAndStop("Green");
        
    tableWeigh_mc.weighNum_mc.num_txt.text "5";
    }

    setup(); 
    weighNum_mc is a single frame containing num_txt textField.
    tableWeigh_mc has several frames, the first with a stop action does NOT contain the weighNum_mc.
    The frame "Green" does have that textfield.

    I thought by going to frame Green first I would then be able to set num_text.text.
    That makes sense but I get the old "Cannot access a property or method of a null object reference" error.

    This makes no sense to me, to test further I made a new movie, I copied the single frame with tableWeigh_mc from my main timeline and pasted it in the new movie.
    By copying the frame everything including the instance names etc must be exactly the same.
    I then coded the same function. It worked. I figured well I must have a typo I am not seeing, so I copied the code back to the original movie.
    It does not work!!!! It throws the same error

    I am absolutely baffled, any ideas?
    Thanks
    Mark
    Last edited by mgason; 03-12-2010 at 10:52 AM. Reason: more info

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    By copying you may have copied an object into other frames so that now it is not null any more.
    - The right of the People to create Flash movies shall not be infringed. -

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