dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [Help] Control an MC inside another MC

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    12

    [Help] Control an MC inside another MC

    I was working in a file and now I'm having problem with it :S. It is a very lard file with a lot of MC on it.
    I got to the point where I need to control a MC from main timeline. The problem is that this MC is INSIDE another MC and I don't know how to control it :S.

    I am using this line:

    Code:
    this.personel_mc.text_mc.gotoAndStop(1);
    inside a click function. but the problem is that first time I click the button it gives me an error :S.

    Code:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    	at FlashWeb_fla::MainTimeline/klick16_19()
    Gent

  2. #2
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,131
    Did you name the instance of text_mc and the instance of personel_mc? Also personnel is misspelled -- could it be a typo?

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    12
    Yes, both of them are named (instance name). And personel is same in instance name. It is typed wrong, but since I'm not english I use words I can remember easier, not everything on english :P.

    A little more explanation:

    Code:
    img_4_7_btn.addEventListener(MouseEvent.CLICK, klick4_7);
    
    function klick4_7(event:MouseEvent):void {
    	personel_mc.gotoAndStop(3);
    	this.personel_mc.text_mc.gotoAndStop(1);
    }
    I have 5 buttons that do almost the same thing on CLICK. they control personel_mc but stop on diffrent frame, as for text_mc they all should stop in frame one. When I test it, the error appear only once, only the first time when I click one of these buttons, than does not appear anymore.
    I hope I made my self clear.

    Gent

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