Solved

creating an animated sine wave in flash

Posted on 2010-11-18
2
1,595 Views
Last Modified: 2012-05-10
I want to create an animated sine wave in flash where the spikes and valleys keep changing. Is it better to create a movie clip that goes across the stage or is it better to do this as a changing shape tween? Also, does anybody know of a good example of this where someone created this without action script?
0
Comment
Question by:BobHavertyComh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
tomaugerdotcom earned 500 total points
ID: 34173279
I've done exactly this for an audio simulator I created for a client. Like you, I wanted to take the easy way out and "fake" it, rather than actually have to figure out the math behind drawing a real-time sine wave.

My solution was simple: I grabbed an audio file and opened it up in a free audio editor like Audacity (http://audacity.sourceforge.net/). It shows a nice "wave" view of my audio file. I zoomed in to an interesting portion, where it looked more like a sine wave, and then exported the graphic (or took a screenshot - I can't remember which).

After that, the rest was trivial.

1. import the graphic into Flash
2. turn it into a Graphic symbol
3. throw it on a layer in flash (this image should be WAY wider than your SWF document width in order to work well)
4. on a layer above it, create a Mask, so you get a "window" to see a part of your sine wave in
5. now just create a motion tween where the sine wave moves from RIGHT to LEFT

things get a little trickier if you want it to go continuously. You have to do a little Photoshop magic to create a graphic that "loops" - in other words, it looks the same on its left edge as it does on its right edge.

Make sense?
0
 
LVL 9

Author Closing Comment

by:BobHavertyComh
ID: 34176209
OK, so use a larger motion tween that repeats rather than a shape tween. That's what i ended up doing before i saw your answer. I drew the curves and they came out ok, and then created a motion tween behind a mask, because it seemed to be too much of a hassle to have to reshape all of those point if I chose to do a shape tween instead. Thanks..
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Graphics - jpeg format 3 59
Adobe Acrobat Pro: chasing the white background wallpaper dimensions 3 240
Help with SimpleXML charts with PHP 4 111
Problem to file 13 87
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question