Copy link to clipboard
Copied
Hello,
I have some questions. I am creating a meter that I would update to put a number or percent of votes for a category collected on my website. I've made a flash document (http://wlqtdb.com/meter.swf), but what I am wanting to do is after it does one loop.. stop at a certain point.. We created a timeline where if you go slow, you can see it goes every certain amount of points.
I am wanting to create a function called Jolly.. with a number.. let's say 52.. 50 is at the edge of HO HO HO on this graphic. the meter arrow is actually called arrow in action script. I am new to action script, and would love to figure out how to go about doing this. Is there a way after it goes to HO HO HO and back to Bah Humbug, then go to the stop point? It can either begin to go forward until it gets there or just go there.. How would I go about doing this?
Thanks,
Mike
Copy link to clipboard
Copied
the easiest way would be to use actionscript to tween your arrows rotation property.
Copy link to clipboard
Copied
Would you be willing to help me? I'd love to figure this out. I'd like to simply put a value at the top of the action script, and however the tween is set it will stop based on where the value is.
Thanks.
Copy link to clipboard
Copied
it would be easier to use a third party tween like tweenlite.
google greensock's tweenlite.
Copy link to clipboard
Copied
Can I use the background I have designed??
Copy link to clipboard
Copied
yes.
it's only the code that would change if you use the TweenLite class instead of the Tween class.
Copy link to clipboard
Copied
I was looking and didn't see anything.. Wouldn't even be probable using ActionScript in flash??
Copy link to clipboard
Copied
you can use actionscript, but you may not get the exact effect you want:
//import the needed classes
var tween:Tween;
var endRotation:int = 260; // or whatever
tween=new Tween(arrow,'rotation',youreasing,arrow.rotation,315,2,true);
tween.addEventListener(TweenEvent.MOTION_FINISH,finishF);
function finishF(e:TweenEvent):void{
tween.continueTo(260,2);
}
Copy link to clipboard
Copied
Depending on the number I type.. I actually have 52 keyframes.. It goes forward to HO HO HO then backwards to Bah Humbug.. After that I wanted it to go to a certain category depending on the value.. I didn't know if that was writing cases, etc.. I'm new to flash, but am eager to learn
Copy link to clipboard
Copied
eliminate all the frames except the first that has your arrow and the background.
Copy link to clipboard
Copied
Wouldn't that stop the arrow from moving??? The only two elements are the arrow and the bg. There are 52 keyframes which actually make it move from one side to the other and backwards.
Copy link to clipboard
Copied
again, the easiest way would be to use actionscript to tween your arrows rotation property.
Copy link to clipboard
Copied
This is where I can use some help. I'm not very good at the actionscript aspect. I've got the keyframes figured out though.
Copy link to clipboard
Copied
you just need your first keyframe and the code is in message 7.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now