A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Javascript Tgotolabel and Attached movies

  1. #1
    {float: left;}
    Join Date
    Jun 2006
    Location
    Midlands, UK
    Posts
    13

    Javascript Tgotolabel and Attached movies

    I have an attached MC - CatTopMC

    code:

    LoadCats = function ()
    {
    attachMovie("CatTopMC", "CatTopMC", 9);
    cCat = this["CatTopMC"];
    cCat._x = 0;
    cCat._y = 0;
    }



    Inside that MC is another MC - InnerMC. I'm trying to use javascript to send the timeline to scene label like so

    code:
    document.flashMovie.TGotoLabel("_level9.CatTopMC.I  nnerMC", "Disabled");



    But It doesn't seem to work. I think I have narrowed the problem down as if I don't attach the movie and just drag the movie CatTopMC out of the library on to the stage giving it an instance name of CatTopMC and use almost the same syntax for the javascript

    code:
    document.flashMovie.TGotoLabel("_level0.CatTopMC.InnerMC", "Disabled");



    It works! I'm thinking it is something to do with attaching movies and referencing instance names. Does anyone have any experience of this, who could help me? Even just a point to a document. I would be really thankful

    .mini

  2. #2
    {float: left;}
    Join Date
    Jun 2006
    Location
    Midlands, UK
    Posts
    13
    Have I posted this question in the right section of the forum? I thought as it is JavaScript related then this would be the right place. I have never had a reply on Flash Kit forum and I have posted quite a few times. Is there something I am missing? Cheers

  3. #3
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    Hello, I would suggest asking this question in the Flash forum that pertains to the flash version you are using. This is more of an actionscript question than it is a scripting and backend question.

    3P

  4. #4
    {float: left;}
    Join Date
    Jun 2006
    Location
    Midlands, UK
    Posts
    13
    Thanks 3Primates,

    Thanks for replying! apologies for posting in not quite the right place. I did resolve the isssue, so I'll post it here. This was resolved by shortening my instance names, I think in Javascript there is a limit to how many characters you can pass to flash. I also realised that regardless of what level in Flash you load an MC on, from JavaScript you call it by _level0.

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