Animate CC/Createjs properties of the clips/instances/bitmaps are null

Hey!

I was wondering how I can set/get properties (including the name property) of my items, on my scene. Whenever I get a null value on my properties. I have a passage of the mouse and you want to get the name of via stage.getObjectsUnderPoint(stage.mouseX,stage.mouseY).  And here, I get a null / undefined / whatever...

I already tried exportRoot.myMovieClip.name, event.target.name or stage.getChildByName... Now I'm out of ideas, why I still can't set/get properties.

To clarify:

I have a Movieclip(called: mc_myMovieClip) and the instance is named ins_myInstance, already placed on the stage. Inside the MovieClip, I have a Bitmap with the instance of ins_myInstance. Although I put all the names in animate CC, after having exported them its not directly accessible. The images are exported in their own folder. No Spritesheet. When I try with stage.getObjectsUnderPoint(stage.mouseX,stage.mouseY) my console says:

Bildschirmfoto 2016-02-23 um 12.06.17.png

My final goal is to have 2 objects, where I check whether or not the names match. If it is not possible in this way, I have to do with hitareas... Something like that: Connections Drag - JSFiddle

There is another topic of 2013 Toolkit for CreateJS after that export instance names are not available in .name property of objects , but it was not a solution for me, or I do not see this right now

I hope it's a bit understandable. Thanks for asking! I hope that there is a way, or maybe it's a limitation of createjs?

Thank you for the advice

What? It is true that intellectual .name for movieclips by default to null, but has no bearing on the possibility of the objects named address. If you have a clip on the stage that you named "bob" and then something like (this.bob.x); console.log works very well.

If for any reason, you need to extract an object is called when executing, then first name all your objects: this.bob.name = "bob"; works perfectly well. Change the JavaScript code that is published is a terrible solution, because then you must manually update each time something changes.

Now, if you don't know advance which objects should be named, it is possible to do it automatically, thanks to the way in which CreateJS implements its data structures:

First, each element (including the level of the root timeline) has a raw list of members/properties you can browse with a for... loop. This gets you the key names, but it gets you everything in the video. Dozens of irrelevant properties. Even if filter you by type - movieclips are represented internally in the form of a container of CreateJS object instances - not every container object is guaranteed to be a real child of the clip.

Second, there is a range of children for each movieclip that stores a list of the children of all the clips, but it stores all by reference. No names.

So, for complete names for children of all of the clip, we scanned raw properties from the clamp, then for each one found is a container object, analyze the table of children to see if it is also in this list. If this is the case, assign the value of the key as the name of the element. As follows:

var i, key;
var clip = this; // movieclip content to be processed
var clipch = clip.children; // movieclip's children
// iterate over every property name in the clip
for (key in clip) {
    // is this a CreateJS container object?
    if (clip[key] instanceof createjs.Container) {
        // scan the clip's list of children
        for (i = 0; i < clipch.length; i++) {
            // are they both pointing to the same object?
            if (clip[key] === clipch[i]) {
                // assign key value to "name" property
                clip[key].name = key;
                break;
            }
        }
    }
}

Voila.

Tags: Adobe Animate

Similar Questions

  • Change the properties of the clip seems to do nothing... (pro 2.0)

    Specifically, I want to set the properties of the query, as scaling. It allows me to change the numbers associated with the clip, but the display shows no change in the video itself.

    Ugh... I almost want to go back to my old version if 2.0 is going to be like that for me.

    PP2 is supposed to run on XP.

  • Remove the black bars on the sides of the clip?

    Hello

    I am changing a clip in Prime Minister 11 elements. It is a file of 25 frames per second. I haven't shot the clip, but I was told that it was a normal life (not widescreen) video PAL. The clip looks like this when I'm editing (screenshot).

    What concerns me are the two thick black bars on both sides of the clip. What are the causes, please? What is the clip was really wide and I am editing in normal mode and the best way to remove because I imagine they will be visible when the final product is show on a DVD or TV.

    blackbars.png

    Thank you very much.

    Steve

    Steve

    Summary

    Thanks for the great information that points to how you create your video source.

    You seem to have no correspondence between the video properties and pre-defined description of the project and still have black borders.

    Solution: To scale the video in the box monitor Edit just at the point where the black borders have disappeared.

    Details

    If you have a PAL DV Standard or PAL hard drive Flash memory/Standard 48 kHz project screening and have

    an import of video files with properties, then you should not see black borders on the video screen, in the

    Change the monitor in the region.

    The only explanation I think is likely is that the person that you gave the video intentionally or not

    exported without the right scale, in the edit box, before exporting it.

    At this stage, then you the intensification of the video to remove black borders is the answer. Click on one of the handles

    the bounding box and make hanging them just to the point where the black borders have disappeared. Depending on the export destination

    more attention needs to be addressed with the dealer of securities video creation with regard to the safety limits for

    text.

    Please see the bulletin and review, and then let us know if what I suspect is likely.

    Thank you.

    RTA

  • With the help of the volume envelope of the clip to amplify rather than mitigate them

    Hello world

    I tried to modify the envelope of volume of a clip in multitrack view, and I realized that the envelope volume really only allows of * mitigate * the volume of a clip throughout its duration, not * amplify * it. In other words, you can only add points on the envelope that are * sub * la + 0 dB line, which reduces the volume of so - many dB.

    Is there a way also vary the volume of a clip in the other direction, that is to amplify, in multitrack view?

    Thanks a lot for your suggestions!

    Probably because it's the limit defined by Adobe for this operation. If you need more than that, then probably you increase permanently the level of the file in the editing view.

    It seems, however, a workaround solution. If you have resized the clip to the maximum envelope, you right click and open the properties of the Clip, you will see that hearing has set the Volume of the Clip on the max of + 15dB. If you reset the fader on the 0 level, you can then go and resize the envelopes again. This can allow you to get the gain, you need. But, as mentioned above, if your levels are too low, in the first place, I would increase the level of the file permanently in the edit view.

  • iMovie 10.1.2 adjust the size of the clip in the timeline

    When I move a clip in the timeline, the size is reduced to a point where I can't move titles correctly.  I tried the setting of the slider, but it does not affect the components of the package.

    Hi, David,.

    You use the scroll bar that you get when you click the gear in the top middle of your screen.  This bar only works on clips in the clips pane, not in the time line.

    The slider beside the button settings in the middle right side of your screen expands the time line so that the clips in it are spread out more.

    Also, if you click on the settings button, a dialog box appears that contains a scroll bar to adjust the size of the clip in the timeline.

    Hope this helps,

    -Rich

  • Can't cut the clips in Windows Movie Maker

    When I try to cut a clip in Movie Maker, the option greyed out and unavailable

    Is the symptom simillar to all the clips that you edit on movie maker or only special on the clip you are now editing? You can also try the box-click + sign to the left of the tie bar, then right-click on the Audio bar for the 'secret' and other options. If the options are also grayed out, it could be an incompatible codec used to produce the video, especially if the symptom is specific to the clip that you are editing now and not to all the other clips. I hope I could help

  • How the clip markers can be promoted in chronological markers?  I cut a clip and rearranged the order of the pieces in the timeline panel, so now I want a set of benchmarks that reflect their position in the timeline panel.

    Clip markers have as their frame of reference of the timeline, they came.  If you create a new brand of element in a new timeline, the marker in time is measured from his original script, not the new timeline where he is.  Currently in CC 2015 organization there is no way to translate the clip marker references 'Local' in the 'World calendar"in which they now live.  I captured on video a 8mm film that is chronologically jumble of short scenes.  I placed the chronology of chapter for each scene markers, export the list of markers and finally understood the rearrangement of pieces of scenes he needed to put everything in chronological order.  Thank God for the ability to export the list of markers, just as I needed!  So the whole sequence has 85 chronological markers, dividing the sequence into 5 pieces and rearranging puts them all in chronological order.  Obviously, I don't want to have to restore the scene boundries 85 times, I did as a necessary step to solve the puzzle.  I think you might meet one day some of these problems:

    1. the most obvious thing is located in the calendar for a piece, lift it and 'paste insert' where it belongs on the timeline.  Problem: Lift or excerpt from don't lift or extract chronological markers with it, so when "Insert you a block", the piece inserted in the timeline has lost its bearings, they were left.

    2. How about you make a sous-suite of the segment to move?  Yes, it carries all the tracks, but not the chronological markers whence he came.

    3. ok, I'll export the calendar together with chronological markers and reimport - ah, Yes, success, the chronology of the markers are now item, marks on the imported clip (the entire chronology).  That's great, because the clip markers are sticky with the clip, I can it chop, rearrange to put markers in chronological order without returning any info title marker.  Feeling beat with the reorganization completed five segments of the original timeline, everything is in order, nothing was reinstated, the timeline with its clip of chapter markers is ready to export to still make the DVD!  Yes, you guessed it, element chapter marks are not exported in yet.  The chronology of imports still with a marker, Chapter 1, at the beginning.

    4. There must be a way, stacked the timeline with the time markers on it on the icon for "New"... ', it is the same as #3 above, but simpler.  Historical markers are now the clip markers that don't export in yet.

    From my experiences, it is therefore impossible to solve my problem without completely restoring scene boundries and type chapter titles.  There are two repositories coordinated, clip) 1 local and 2) global chronology; and there is no way to go from one to the other 'mass'.   There is the glove, I'm sure someone has a way to do this without returning the title of chapter 85 markers.

    I have not found an automatic way to do this, but here is an efficient manual method that requires no titles of chapters Overtype.

    Either drop your timeline that has mounted the icon "Create New" brands, or export the timeline and import it back.  You now have a new timeline and markers are now on the video clip.  Now, chop and reorganize this video clip, it is in the best new order, and the clip markers stick with the sections of the clamp.  Now this procedure migrates the markers of the clips to the timeline (promotion):

    Start at the beginning of the timeline, select the video clip. (The video clip must be selected for M to open the marker editing window)

    1. type change M to find the first element brand, type M to open the editing window of clip marker, select the marker title and copy (control-C), hit Cancel

    2 hit the icon of reference in the program monitor pane, which puts a green marker on the timeline at the same time as the brand of element,

    3. double-click on the Green marker, paste the title of marker by control V, select the radio button of chapter markers, click OK.

    Repeat steps 1-3 to promote all the markers of clip of historical markers with the same marker titles.  Since we cut the timeline to reorganize, there are several video clips.  As you progress, make sure that the clip that you are working on is selected, otherwise M will not open the editing window, instead, it will place a chronological marker.  In short, follow this procedure exactly, it works.  It's a stupid job, but it does the job with without having to retype marker titles.  The chronology chapter titles now think time on the new timeline and they will export in yet.  Hope someone finds it useful at some point in the future.

    Perhaps team first see the usefulness of this and add a command 'Promote the clip for mounting marks markers' and "retrograde chronological markers for the clip markers" (conservation type, title and comments).  It would be a powerful addition.

  • File &gt; properties: all the gray fields / inaccessible

    I use Acrobat Pro 11. I want to change the properties of the document, but they are greyed out. What I am doing wrong?

    document properties.png

    I see that the application that created the PDF file is FormsCentral, if the document has probably been activated drive. You can select: file > save a copy

    Open the new file to change things and then reactivate the file: file > save as other > Reader Extended PDF > activate tools more

  • Text properties in the pages of title - not showing the real values

    Hello world

    When I opened a title page in first Pro CS5 and then select the text, the following properties of the text in question are the following:

    Position x = 100

    Position Y = 100

    Width = 100

    Height = 100

    When I use the selection tool to select an area outside the area of text and then select the text box once again, the properties of the text above show their "real value".  For example, the above text for a specific text box properties will change to:

    Position x = 437

    Position Y = 134,6

    Width = 401

    Height = 170

    Please can someone explain why this happens?  In first Pro CS2, when I selected a text box in a page title, true values were displayed immediately.

    Thank you very much

    Angela

    It's not not clear to me what would be the purpose of design for the properties of an element title does not display the actual properties, so I let go my curiosity and played around a bit.

    I tested in CS4 (then to CS3), and observed what I think are the same questions.  I think I would call it a "bug", although one whose effects are easily circumvented.

    Create a title.  Type a text box (or any other object, such as a form).  The x pos, pos, width and height are all 'accurate '.  Close and reopen (you don't have to put the title in a sequence).

    I think the text box (and the first text box if more than one parameter is created) are selected by default, but the properties are those of 'bad' Angela: 100, 100, 100, 100.  Click in another area of text or shape etc (and no matter with what tool), the properties are then "correct".

    Is the 100 x 4 a default value for something?  (I don't see any of these default values).  The titration module, select a design object (I don't think I like that, but I see as a design choice), but not bad set the properties of the selected object?  But then why put the 100 x 4?

    I also ran the test in CS3; same thing.

    I'm not bothered by it, but I think it's a bug, so I filed a bug report.  You can choose a previous version to the report, and since I have not yet installed cs5, I reported for CS4 (and said I have demonstrated for CS3 and CS4 and that a forum user has reported for CS5).  Angela, you can also report so there is at least one report for CS5.

  • Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    code on the last frame of your movieclip instance:

    _root.gotoAndStop ('whatever_frame');  will work unless this swf is loaded into another swf.  in this case, you must use a relative path to the main timeline (for example, _parent or _parent._parent etc.).

  • 1 - How can I animate a layer? and how do I add the clips that I have edited in the entire video?

    I'm super new to this. I need some simple instructions to these questions are: 1 How can I animate a layer? and how do I add the clips that I have edited in the entire video? I know there is probably something on the Adobe Web site telling me these things, but I prefer this kind of thing.

    How to add effects, motion graphics in After Effects | Tutorials Adobe after effects CC

  • Update all instances of the clip bin

    I'm new to Premiere Pro, so forgive my novice question.

    I placed several instances of an audio clip in my calendar for a project. Now, I want to apply the same change to each of them. I would have thought that I could just apply this change to the item in the bin, but none of my clips in the timeline refresh, when I do that.

    Is there a way to tie bars in use to the clip in the tray for easy modification after placing them in the timeline? It of a pain to have to go through and select them all individually whenever I wanted to apply a change.

    Thank you!

    You can do what you want in the Source element (save it with the same file name), and all the instances in the timleline reflects the change.

    First make a copy of the Original.

    or... more flexible.

    Place all occurrences of the element on the same audio track and make all levels and FX in the Mixer Panel.  Fairly common.

  • How can I make the &lt; Instance name &gt; the same as the name of the clip in an animation.

    Hi, I'm a moderator for a small game project and I have a very big problem. Even if I used flash for animation for a long time, I am a newbie when it comes to something technical. I just got a request to make of each video clip I use to have a uniform < Instance name > in each frame of the animation. Only if they have told me that earlier... Y at - it an easier way to do the < Instance name > the same as the name of the clip another that you enter manually. I have 16 characters with 12 parts of the body with 20 animations each with approximately 6-7 frames for each part of the body, it will take me months and nightmares evey night enter everything by hand. Please help me keep my sanity!

    I don't know if I explain properly, so here's a picture:

    Instance.jpg

    Thank you!

    I don't know a easy way to do it.

    you could do a file jsfl to do, but it is not for beginners.

  • How to change the time of departure for the clips in the properties?

    Hello there ,.
    I have tested the Audition CS5 right now and he find much except for one thing:

    In the properties for each clip, there is a departure time. But it can not simply be edited!

    I can change the start time of the entire session - Yes.

    But not those of individual clips. Only by moving around and is not very accurate.

    Is there a a way to change this from time for clips by typing in numbers?

    Thank you :).

    It seems to me that this feature has been removed...

    Pourrait this really true? !!

    Please help someone.

  • Applying the addEventListener method to the Clips using a variable for example appoints

    This project is in HTML5 Canvas using Javascript in Adobe animate.

    I have a lot of movie clip symbols of film, all with a single instance (for example name ('arms', 'head', 'leg', 'foot', etc.). I also have a display of graphics and text clip ("text") which has a keyframe labeled corresponding to each of these symbols instance names. When a symbol is clicked, I want the clip "displayText" to access the appropriate section.

    There are a large number of these clickable symbols in each of several animations, so I definitely want to be able to do this in a way auto-tableau, it is too many to write code for each.

    What I have is this:

    var objects = ['arms', 'head', 'leg', 'foot'];

    var clickObject = null;

    for (i = 0; i < objects.length; i ++) {}

    clickObject = (objects [i]);

    clickObject.addEventListener ("click", displayText.bind (this));

    }

    function displayText() {}

    this.displayAndSound.gotoAndStop (clickObject);

    }

    Console says "clickObject.addEventListener is not a function", and I have tried many variations of the scope, using onClick rather than a listener events, etc, etc. What I am doing wrong - something to do with the scope? Something to variables vs channels? Something to do with how javascript regarding instance names? Legally binding?

    I can get it works fine outside of the loop, using names of the current instance, fixed, so hopefully it's a clue to what goes wrong...

    Any help much appreciated.

    Look at what you do in the loop. You do not clickObject for an object reference, configure that you just want it set to a string value.

    Assuming that the objects are at the same level as the code, you should do instead:

    clickObject = this [object [i]];

    Property accessors - JavaScript | DND

    In addition, your event handler probably don't do what you hope, that he will, because the value of clickObject will be just what you set to last in the main code. You may need to use the event object.

    EaselJS tutorial: Mouse Interaction

    EaselJS v0.8.2 API Documentation: MouseEvent

Maybe you are looking for