![]() ![]() fla's background color! I deeply appreciate your kindness and your prompt response to my questions. Lastly, thanks, JC, for the bonus code that changes the browser's background color to match the. So again, this is something I guess I'll have to be content with not understanding, since there really seems to be no place to go to get these type of "why" questions answered. For example, I sort of get how JC needed to make the code recognize the parent (var.root=this ), but "currentTarget" doesn't make much sense, other than "hey, it works, so shut up : ) "Īnd if anyone was taught (like me) that you had to use the words, "bind(this) " that obviously is not true-the moment I added it to JC's code in the spot it is supposed to be, the functionality broke. But it sure would be nice to understand better how HTML5 code refers to parents and children. ![]() I suspect that the words, "currentTarget" are HTML5's way of referring to a child, and "root" is referring to the parent, because it broke as soon as I changed those words. I also tried removing JC's "anim" (which was in the IF/ELSE part of the code, between the words "root" and "play", and "root" and "stop") to see if I could get a basic animation on the main timeline-NOT a MC on the main timeline, but a simple, non-symbol-based animation, to play. And "happy" (and any other nonsense word I put in there) worked, as long as I remembered to also add the same name after the word, "if". I also replaced JC's "e" with the word "happy", just in case "e" was nothing more than a function name. I don't understand, but I will happily accept not understanding, as long as the code works. ![]() when the first tick occurs do the followingĬlip = clip.I was always told I needed to use "addEventListener" in the space where JC used "on". set the attributes that say this clip is in the beginning stateĬlip._prevPos = clip._previousPosition = -1, Note this is a hack and is likely to fail in future. This function rewinds a movie clip to the start and prevents a bug from moving the clip forward. It works for me on my version it may not work for you. For future readers be aware that this function uses core features which may change on new version numbers. I managed to create a function that would reset the movie clip so it no longer looped. Thanks guys you got me on the right track. But rather than stop the animation when it is loaded for the first time it plays through every frame (the entire animation) ignoring the stop call. Many frames with this.stop() on each frame (intended to stop the animation on the given frame). I also have a problem with a flower animation among others which is set up as above. ![]() However this popup box when I call (0) plays both frame 0 and frame 1 even though there is a stop on frame 0. To explain a little more, we have a popupbox animation (among many others), that in each frame has a new messsge (this is expected behaviour), contained in each frame is a this.stop() that is supposed to stop the animation so it only displays the current message. I don't know why this is happening, as I have a this.stop() in each frame. The problem I have is that movies which are on the main time line loop once when displaying for the first time. I have been supplied a flash move which I am converting to html5 canvas. I am fairly new to Animate so forgive me if i use the wrong lingo. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |