- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI'm looking for sample code or at least a rough idea of how to implement the following in Flash. Basically I want to be able to tie numeric values to either sides of an animated balance, and be able to show a transition when the values in each side are shifted.
For example, say the total value fielded by the balance is 100, with 50 on the left and 50 on the right. At equilibrium, there will be 50 on each side. If the left is heavier, it might show 70 left, 30 right. If the right is heavier, it might show 20 on the left, 80 on the right. In either case the total adds up to 100.
I'd want to have the animation be fluid so that if a value on either side is changed, the transition can be seen once the user clicks a button or otherwise triggers an event to apply the change. As far as the values themselves, I have no clue how Flash would grab such values outside of itself. Could I have it look at the DOM and watch the values of a couple of textbox controls? Could I tie it to a database and execute a scalar function when I need to grab the values?
If I don't need to use Flash and could instead do something like this from Javascript or some weird CSS tricks, that would be cool too, but I'm suggesting Flash at the outset because I have it handy and am just new at it.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: blue-geniePosted on 2009-04-20 at 23:48:54ID: 24191457
you'd need to break up your graphic and move the registration point to the center of the bits that move.
then if you want to get the values from a db you need to use a server side script such as asp/php to retrieve those values and send them back to flash.
then based on the values you have you need to work out the degree of tilt and apply that as a rotation on your movieclip.