Change the order of the children dragged onstage at the library in Flash HTML5 canvas

Hello

I'm under the latest version of Flash Pro CC and created a new file using the HTML5 canvas platform in an iMac OSX 10.11.2 running

I'm learning to code with createjs in a file of HTML5 canvas. I created two symbols (movieClips) and trained on the stage in different layers.

Now, I would like to change the order so as the background, we're going to the top and those at the top goes down, they put child 0 on index 1.

When I try to get the console.log index said that the index is - 1 for two children;

Console.log (this.getChildIndex (this. NomSymbole //Return))-1

Console.log (this.) GetChildIndex (this.stage.SymbolName)) / / also returns the value - 1

Children are added to the display list of the scene of the main movieClip?

It seems like createjs knows that the index of the things she said itself and shows-1 for everything you put in Flash Pro. You can work around this by an addChild. As:

this.addChild (this.instancename1);

this.addChild (this.instancename2);

Then you can get their index number.

Tags: Adobe Animate

Similar Questions

  • How to disable the cc button animate html5 canvas files?

    Hello!

    How to disable the cc button animate html5 canvas files?

    ex:

    this.mc.on('click',function(){alert('this')})
    this.mc.enabled=false
    

    question 1:

    When you click on the 'mc', it always run. How can I control the button of the deactivate and activate?

    question 2:

    The mc is not an image, it's a movieclip. How can I change the colors of the mc? example: default of the mc color red, I want to click change black!

    Thank you!

    use addEventListener instead of 'on '.  You can then use removeEventListener to disable.

    or you can intemperies to use 'on' using the mouseEnabled property to disable this.mc:

    this.mc.mouseEnabled = false;

  • Change the Encore CS4 flash player skin

    Hello

    Someone knows how to change the appearance of the flash drive on Encore CS4.  I flashDVD.swf I did go Encore CS4 and I would like the reader to have a scroll bar.  I have attached a default look of the player (thanks rudo_fr )

    Thank you

    Peter

    No, you can easily change this. If you wanted, you will need to create one from scratch in Flash, but then you must know all the internal ActionScript used by the player controls.

    Mylenium

  • Users can change the library items?

    Hello world. I have almost finished my first Contribute site and I had a question. My client has a small piece of text that is displayed in the header of each page, and this text is something they want to change regularly. I've added a library for this piece item in Dreamweaver thinking that it would be the right way to change it in one place in Contribute.

    I found where I can grant permissions to change different types of shared assets, but I don't see that they can edit the library item. Is there a way to do or what I need to configure differently (server-side include, etc.)?

    Thanks in advance,
    Jason

    I use PHP, so I ended up using a function call include() for the file I needed. I will give them a link to the included file that they can change it.

    Jason

  • How to create seekbar for the generation of animation in flash, html5 canvas

    Hello

    I've created an animation in html5 canvas option in flash CC. I want to control the animation by using the seek bar (progress bar). Can someone guide me how to create the same.

    Thanks in advance.

    var totalFrame;
    var unitFrame;
    var unitSlide;
    var playMode;
    var sliderInitX = 0;
    var currMovie = this.parent;
    var _this = this;
    var BarMc = this["barMc"];
    
    function setSlider()
    {
      totalFrame = currMovie.timeline.duration;
      unitFrame = (totalFrame / (BarMc.nominalBounds.width));
      unitSlide = (BarMc.nominalBounds.width) / totalFrame;
    
      _this.sliderBtn.x = sliderInitX;
    
      playMode = true;
      setInterval(function(){onEnter();}, 33);
    
      BarMc.addEventListener("click", onClick);
    
    }
    
    function onClick(evt)
    {
      var stageXpos = stage.mouseX-(58);
      _this.sliderBtn.x = stageXpos;
      var movFrame = Math.round((_this.sliderBtn.x - (BarMc.x-(BarMc.nominalBounds.width/2))) * unitFrame);
      if ((movFrame< currMovie.timeline.duration) && playMode && (currMovie.timeline.position != currMovie.timeline.duration)) {
      currMovie.gotoAndPlay(movFrame);
      } else if (movFrame > currMovie.timeline.duration) {
      currMovie.gotoAndStop(currMovie.timeline.duration);
      playMode = false;
      } else {
      currMovie.gotoAndStop(movFrame);
      playMode = false;
      }
    }
    
    setSlider();
    
    function onEnter(){
      if (playMode) {
      _this.sliderBtn.x = BarMc.x + (unitSlide * currMovie.timeline.position) - (BarMc.nominalBounds.width/2);
      if (_this.sliderBtn.x > (BarMc.x + (BarMc.nominalBounds.width))) {
      _this.sliderBtn.x = (BarMc.x + (BarMc.nominalBounds.width));
      }
      }
    }
    

    name = barMc bar

    and the handle = sliderBtn

  • Chronology of the break on a HTML5 canvas file

    Hello

    Someone at - he paused a code of create.js or something, that would allow me to put the timeline in flash for a specified time?

    I am struggling to find something that actually works, as part of a timeline.

    Thank you

    answer to the question in the message 5.

  • SoundJS with Flash HTML5 Canvas - break sound &amp; update the lib?

    I'm looking to do some basic audio control in the Flash timeline, exporting HTML5 canvas.

    On the frame of 10 I am loading/reading a file with:

    audio1 var is createjs. Sound.Play("Sounds/course3_mod1_2.mp3");

    Who plays, but then I can't figure out how to make a pause as the beep several frames later at a briefing of the animation to a timeline. I read that there is a method. pause() methods, as well as chassis 50 that I use:

    AUDIO1.pause ();

    This does not work for me - I must be missing something pretty obvious regarding variables references on the timeline...? In the console of Firefox, I see the JS error:

    ReferenceError: audio1 is undefined.

    If it's important, the process of publication included "0.5.2.min.js", although I do not have the latest version of CA is "0.6.0.min.js". I'm also very curious how I would update my CC Flash (version 20141) to use this latest version of the library compared with older he current attaches to the HTML code. I guess I can (in the publication settings) uncheck the option 'Hosted libraries', and then manually download new libraries and replace them in the folder. But not this crushed with each publication? And what happens if I still want a link to a hosted version the later?

    somascope wrote:

    On the frame of 10 I am loading/reading a file with:

    audio1 var is createjs. Sound.Play("Sounds/course3_mod1_2.mp3");

    Who plays, but then I can't figure out how to make a pause as the beep several frames later at a briefing of the animation to a timeline.

    That cannot possibly work. If it worked, it is no more. The SoundJS, the documentation is very clear that "before you can play a sound, it must be saved.» You need to do something like this:

    // create global alias to main timeline for event handler
    _main = this;
    // wait for sound to preload
    this.stop();
    // assign load event handler
    createjs.Sound.on("fileload", handleLoad);
    // load and register sound
    createjs.Sound.registerSound("mysound.mp3", "soundID");
    // play sound and start timeline playing
    function handleLoad(event) {
        _main.audio1 = createjs.Sound.play("soundID");
        _main.play();
    }
    

    Then, to put in pause/resume, follow these steps:

    this.audio1.paused = true; // pause
    
    this.audio1.paused = false; // resume
    

    Reference: is there a pause() method? · Number #200 · CreateJS/SoundJS · GitHub

    Note that var creates variables that have only the scope of the framework. To the current scope of timeline, you must use this..

    If it's important, the process of publication included "0.5.2.min.js", although I do not have the latest version of CA is "0.6.0.min.js". I'm also very curious how I would update my CC Flash (version 20141) to use this latest version of the library compared with older he current attaches to the HTML code.

    DO NOT do it. Each new version of Flash CC publishes the files that target a specific version of the CreateJS library, so try to cram in a different version will certainly break things. But why you are still using Flash CC 2014? You should be able to upgrade to CC animate.

  • Flash html5 canvas opens several tabs when the animation loop

    I started to do a little tests using HTML5 canvas and found a problem in a single process.

    I created See the animation 2 images and as a first step framework there is a button.
    then programmed for When you click on the button it opens a new tab in the browser and move to the next framework a loop animation.
    well.
    but when I come back click on the button it opens 2 tabs and do the loop again, even once, I click it it opens 4 tabs and New button and on.
    why this happens and what would a solution?
    Thank you

    Here is the code of the first framework :

    This.Stop ();

    This.button_1.addEventListener ("click", fl_ClickToGoToWebPage);

    function fl_ClickToGoToWebPage() {}
    window.open ("http://www.adobe.com", "_blank");
    }

    This.button_1.addEventListener ("click", fl_ClickToGoToAndPlayFromFrame.bind (this));

    function fl_ClickToGoToAndPlayFromFrame()
    {
    this.gotoAndPlay (2);
    }

    Instead of calling your tab, '_blank', give it a name, like "myTab". Then, when you run the same code again, it will make the link open in the same tab instead of opening a new.

  • Could not import the pdf file to the library in Flash CS4

    I need to import files of pdf text three in my Flash CS4 for use in a project that I am doing, but whenever I try to import these pdf files at the library I get an error that reads 'one or more files were not imported because he had problems reading of their.

    I use Adobe Reader X, which is the last available drive, Flash CS4 and Windows Vista Home Premium and I don't understand why I can't import PDFs in Flash. Any help would be greatly appreciated!

    Zlloyd

    PDF is not supported in flash file type.

  • Lightroom gel when changing the library to develop modules (or vice versa)

    I've upgraded LR to the latest version, a couple of weeks ago and my computer also made an update of Windows 10 at the same time. Since this date, during the change of library modules (or vice versa) or when you export a photo in another application for further treatment, LR freezes and I end up stop and restart. I can't do more than two photos max before it freezes. Someone at - it ideas? Thank you

    .. as described here: Adobe Lightroom GPU troubleshooting and FAQ

  • Cannot change the images in flash

    Hello

    I am new to creating flash files. I recently downloaded a template for my Web site. Thought it would be easy to manipulate changes. All right, except that one of the images needs to be changed. I followed the directions to "SWAP" files bmp. I can see the change in the Edit screen; However, when I save and preview the fle in web browser still shows the original photo. Please help, I am totally frustrated and desperately need to change this photo as soon as POSSIBLE.

    Thank you very much for the reply! I don't know even what cache is. But I tried again an hour before, ensured once more save the first file (even if I'd done it before), and published then, and it worked!

  • Cannot change the font output of HTML5

    Hello!

    I don't know what I did wrong. My renders in HTML5 form using the 'Myriad Pro' default despite the police police I specify in design. I have checked the source XML of the form and I saw that 'Myriad Pro' was never user. I would like to use Arial and not a myriad which is not present on the majority of client browsers.

    You have an idea?

    Thank you

    -Jaroslav

    Form HTML5 rendering requires that the police that you used at the time of the design should be present on the device or machine where you open the HTML5 form. If this font is missing from this device, a rescue police will be used by the client browser which could be Myriad Pro in your case.

    So, make sure that the font that you used in the design is present both on the server and client machine/machine of where HTML5 form is open.

    -Deepak

  • is it possible to change the toolkit cs6 flash for namespace createjs as adobe flash cc

    I added cc flash photography. Here we change namespace. But for flash cs6 for createjs toolkit. We can do box Toolbox for createjs?PAh9U.png

    I'm sorry. I don't understand this question, or how it relates to Dreamweaver.

    Nancy O.

  • Can I change the background color of a canvas on mouseOver

    ?

    Here it is:

  • Addressing the main timeline via the code on a HTML5 canvas file

    Of course you can target to _parent, _root etc. in Actionscript.

    and create.js using 'this' to the current timeline, but what happens if you want to target the root/parent?

    I have this 'this.stop ()' who of works, but also want a 'root.play ()' can do such a simple thing?

    Thanks in advance.

    The root of an application createjs is the window. I don't know if the window has a play() function. So, I think you mean how would you play at the level of the main scenario for something from deep inside the nested clips. Who could possibly be achieved by looking at the document and find the element with an ID which is "canvas", or you have your named.

    A simpler solution would be to put a variable somewhere. At the beginning of your main timeline you could say:

    Window.main = this;

    then, from any depth you could say:

    Window.main.Play ();

Maybe you are looking for

  • Boot Camp for Windows 7

    In order to install Windows 7 on my second MBA, I downloaded the ISO of Windows 7 files and copied on a 250 GB hard drive Tigo. Using Boot Camp assistant to participate my HD I clicked on the 1st and 3rd option, see the ISO of Windows 7 files and I i

  • JOINT-2 upgrade

    Hello I level JOINT-2 image from v5 to v6 (IPS - K9 - 6.0 - 4A - E1.pkg), after this upgrade should we go for the improvement of the recovery Partition? Thank you Dinesh

  • BlackBerry smartphone how to decompress?

    I downloaded some free games for my BB 8330 curver, but they are in zip format.  How do I unzip them and bring them to my phone? Thank you

  • How to configure IKE with RSA without this Protocol between 1760 and PIX501?

    Hello I have a question about authentication with RSA - SIG IKE between 1760 router and PIX501 without AC. . I found a URL between routers, but not for PIX. do I need third-party CA (public or internal) in the PIX? http://www.Cisco.com/warp/public/70

  • How to hide this odd grid and how is it made?

    How to hide this odd grid and how is it made?I have not found an option for this remove from the display tab , it's just stuck there