Skip to main content
SiUsPlauTancat
Known Participant
May 12, 2020
Answered

Problem with a HTML5 canvas

  • May 12, 2020
  • 3 replies
  • 3283 views

Hello all,

I m trying to convert my old AS3 animation in html5.

But i have a problem when i try to access from one children movieclip to my root timeline.

In as3 i did in the past with MovieClip(parent or root).

So my question is: how can i navigate and moving between different nested movieclip? is there some kind of instruction that do same as MovieClip do in AS3?

 

Hope my question is clear enough

Thanks a lot

 

    This topic has been closed for replies.
    Correct answer kglad

    you can use exportRoot or this.parent

    3 replies

    Inspiring
    May 15, 2020

    Also I've tested with exportRoot and parent from the nested MovieClip symbol to the main timeline but it doesn't seem to work. There is a lot of wrong in the Adobe Animate program developing. It was much better before with Flash and Macromedia than Adobe.

    kglad
    Community Expert
    Community Expert
    May 15, 2020

    you're almost certainly doing something wrong (eg, trying to access a variable/object before it's defined).

    Inspiring
    May 15, 2020

    pic1.jpg 
    pic2.jpg 
    pic3.jpg 
    pic4.jpg 

    Above I enclose four pictures how I did in Animate
    as I've done in my slideshow that you see. Here is the description:
    In picture pic1.jpg I have put this.stop; as an action where i in picture pic2.jpg where put label pt in the same action.
    In picture pic3.jpg has in layer the name image1 where in frame 142 I have the Movieclip object inxs.
    In image pic4.jpg this is how Movieclip inxs looks where the last frame of the action codes says this.parent.gotoAndStop ("pt");
    This not works in either Chrome och Microsoft Edge browser.

    SiUsPlauTancat
    Known Participant
    May 12, 2020

    Thanks a lot!

    kglad
    Community Expert
    Community Expert
    May 12, 2020

    you're welcome.

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    May 12, 2020

    you can use exportRoot or this.parent

    SiUsPlauTancat
    Known Participant
    May 12, 2020

    So i want to read and check a variable that is on the "parent" moviclip but if i use 

    this.parent.VN is not working.

    i tried to print with console.log and return undefined.

     

    Thansk for your reply

     

    CodeDeveloperOM
    Inspiring
    May 12, 2020

    I had the same problem sometimes
    Add

    var root = this;

    this.parent..........


    And it works