Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Thanked 0 Times in 0 Posts

    1119: Access of possibly undefined property myLoader through a reference with static

    Could someone please help me with my actionscript 3.0 code?

    I am creating a flash website and have follow the instructions in my book to a t, but they won't work. Only the home file loads. The menu will not navigate to different states in its timeline, nor will it load anything other than the home file.

    I keep getting this message:
    1119: Access of possibly undefined property myLoader through a reference with static type flash.displayisplayObjectContainer.

    I have this code in scene 1:
    var myLoader:Loader = new Loader();
    myLoader.load(new URLRequest("MAPC09_home.swf"));

    Then on my menu I have:
    function buttonClick(event:MouseEvent):void

    home.enabled = true;
    exhi.enabled = true;
    conf.enabled = true;
    jour.enabled = true;
    blog.enabled = true;
    memp.enabled = true;
    link.enabled = true;
    cont.enabled = true;
    abou.enabled = true;
    memb.enabled = true;

    event.target.enabled = true;
    this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));

    home.addEventListener(MouseEvent.CLICK, buttonClick);
    exhi.addEventListener(MouseEvent.CLICK, buttonClick);
    conf.addEventListener(MouseEvent.CLICK, buttonClick);
    jour.addEventListener(MouseEvent.CLICK, buttonClick);
    blog.addEventListener(MouseEvent.CLICK, buttonClick);
    memp.addEventListener(MouseEvent.CLICK, buttonClick);
    link.addEventListener(MouseEvent.CLICK, buttonClick);
    cont.addEventListener(MouseEvent.CLICK, buttonClick);
    abou.addEventListener(MouseEvent.CLICK, buttonClick);
    memb.addEventListener(MouseEvent.CLICK, buttonClick);

    Any ideas how I could edit this so that my code will allow the menu to navigate me to different pages?

    I'd really appreciate any help. I am losing my mind!

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Thanked 238 Times in 229 Posts
    Please do not double post.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


    Posting Permissions

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