-
-
this is important for me
please help me
-
i try this code but it works all time
if ( _parent.circle.circle2.t3._x >= 1117 and _parent.circle.circle2.t3._x <= 1119) {
_parent.tex.text = 3 ;
please heeeeeeelp
-
-
if ( _parent.circle.circle2.t3._x >= 1117 and _parent.circle.circle2.t3._x <= 1119) {
_parent.tex.text = 3 ;
This won't work for a number of reasons. The main being that t3 is contained inside circle2. Because of this t3's x will be relative to circle2. There are other reasons that this would be a bad way but that's the main. A better way to handle this would be to use angles instead.
Code:
addEventListener (Event.ENTER_FRAME, onEnterFrame);
var r:int = 0;
var o:int = 1;
function onEnterFrame (e:Event):void {
if (r>=360) {
r = 0;
} else {
r++;
}
o=(r==0)?1:Math.ceil(r/18);
t.text=r+"\n"+o;
}
t.text is a textfield I used for output. Don't need it. You find the 18 by using 360 divide by number of numbers.
-
first
thanks swak
i used your code in my swishmax but do not work
can you please edit my file to work fine
excuse me for my bad English language
thanks again
-
Sorry, I don't have swishmax. I can explain it if you'd like but it'd be good to learn this kind of this.
-
yes
i want learn this
please
-
-
Here's you go.
Movie2.swi
I did two things with this.
I changed the rotation of the text to rotate counter clockwise.
I change the rotation to last from 15 to 20 frames.
I used this: _parent.tex.text = _parent.circle._currentFrame+1 ;
The code I was sharing earlier can be better but this should work fine.
-
thaaaaaaaaaaaaaaaaaaaaaaaaaaaaank yooooooooooooooooooooooooooooooou
veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery
mutchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
swaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaak
but if effect > 20 . it means move effect = 30
not work fine
what do i do if i want this
thaaaaaaaaaaaaaaaaaanke again
-
The reason I did it the way I did was it's the simplest. The problem with that is it's very inflexible. What I mean by that is if you want to make any changes, like the speed of rotation, then you don't have very many options for it to work very well. To do it properly I'd want to just remake the whole thing. I'm not too familiar with swishmax so I'd want to use flash instead.
Basically to do this right there's several changes you'd have to make. 1) change the rotation from a preanimation to using code to rotate it. 2) Change the code to run continuously instead of when you press the button. In the end you'll have to figure out what exactly you want out of this. The more you want, the more it'll be worth.
Not sure what you're asking with you're earlier post. What do you mean by effect?
Last edited by swak; 04-08-2017 at 05:38 PM.
.
-
-
I see. You'll have to make sure the number of frames the animation has is multiples of 20. Then just adjust the text code like this:
Code:
_parent.tex.text = Math.ceil((_parent.circle._currentFrame+1)/(_parent.circle._totalFrames/20));
The Math.ceil is for rounding the number up.
(_parent.circle._totalFrames/20) This will automatically account for when you adjust the length of the animation. Just make sure you keep it as multiples of 20. Otherwise you'll get wierd issues.
-
swak
from this time you are my teacher and i am your student
thank you swak
thank you very mutch
-
-
If everything's finished then change the title to this: "[Resolved](how do this ) dynamic text = number in around circle" This will show that the problem's finished.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|