I am experimenting with drawing methods in flash mx and I am trying to use the code below to draw a rectangle and then adjust the coordinates of each duplicated mc.
Your are duplicating your mc clip, which is an EMPTY movie clip.
Therefore you won’t see anything.
You used the drawing API on the empty movie clip, but that is just on that empty movie clip, not the duplicated ones. You will have to redraw your block for each empty movie clip.
And if you have to do that, why duplicate your clip? Just dynamically recreate an empty movie clip and redraw your lines.
Nope, haven’t tried it out. I see no reason why it shouldn’t work as to how I want it to.
I wonder if the overall effect would be easier to create in swift 3d rather than messing with the api drawing tools. Swift 3d seems to easy for me, I like it a little testing.
I wanted to create a scene with a small box that gradually moves centre stage as it gets larger, a sort of 3d effect, with the previous boxes having an increasingly larger alpha value to give the impression of a box sort of flying in.
I hate using tweening for some reason. I’ll stick with api.
Well your example didn’t work for me, I did come up with this partial method using setInterval(), but I can’t get it to stop duplicating! grrr. I tried clearInterval() but it didn’t work, I don’t get it! (I was never good with that setInterval and clearInterval stuff to begin with)
Well if you want to mess around with what I have so far, just put this in Frame 1.
I’m not getting anything with that script of yours, Lost. And if I may say so, you’re not using setInterval properly (or maybe you are but I’m misunderstanding the code).
*Originally posted by ilyaslamasse *
**And if I may say so, you’re not using setInterval properly (or maybe you are but I’m misunderstanding the code). **
Well I did say I was never good with that whole setInterval clearInterval thing…
And… 'DOH! I see what I did wrong.
BTW: you forgot to remove the myClip from the _yscale.
Not sure where any of this is going, probably nowhere. Thankyou for the help to date. After a little tweaking I have got the effect I need, although I am having trouble with repositioning the start point of the effect, besides altering the co-ordinates of the original box, which has little overall effect.
Also, I would like to address the last box of the animation, I assume it would be Mc9. I would like to set the box’s rotation property. One definate problem I think I will have is removing the box from the loop so that additional properties can be altered. On a previous experiment the loop always tried to pull the box back into its original location, thus producing a shaking box.
I’ll give it thought today but any suggestions would be great.
As you are both, in my opinion at least, vastly more knowledgeable than I, would it be appropriate to discuss whether a tweened animation would be better to produce (file size effects notwithstanding) or using something like swift 3d??
Thankyou very much for your help. The only question I have is the matter of the anchor point. Was it only the co-ordinates of the box that you’ve changed. I can’t discern anything else in the script that would alter this anchor.
Yeah that is all I did… I edited the coordinates for which the lines were drawn too because in your original script you had the anchor point in the upper left, so when you rotated it it made a HUGE rotation around, kind of like twirling a yo-yo, so I redrew the shape so the anchor point would be in the middle and it could spin like it was on an axis (sorta like a basketball spinning on a finger).
OK, but how does simply changing the co-ordinates of the mc adjust the anchor point. Surely by making the adjustment to the co-ordinates you would end up with the same problem as before.
The methodology of creating the clip and then moving it to a desired location is the same, right??
100,100 and -50,-50 would surely have the same effect. Why does your method alter the anchor point whereas mine does not.
I can take this at face value but it is better for me if I try to understand.
And the center point it at (0,0) If you make it (-50, -50) you are starting the clip in the (-x,-y) zone, but if you start from (100,100) you are starting in the (+x,+y) zone which is off center from the clip.
I believe Flash is backwards with how the _y works, so -y is up top and +y is down below.
I am in a rush so I might be confusing myself, or not explaining good, if you don’t understand I will come back when I have more time. Just let me know.