Animation/lag

Advertisement


Question
QUESTION: Andre,

I am a beginner in Flash.  All I know how to do is tweens.  Right now I am using Flash 8.  I am making a stick figure do a popular dance called The Soulja Boy Dance.  When I run the video through flash everything is timed correctly with the music.  However when I export it useing "ctrl + enter."  The timing is off with the music and dance.  What is wrong?
~~Rob

ANSWER: Hey Rob,

Crank that Soulja Boy, Shawty! I don't know exactly what the problem could be.  Try checking FILE > PUBLISH SETTINGS...make sure on the flash tab, that you have "compress movie" checked.  Also reduce the jpeg quality, and the audio streaming quality (I use MP3 16 kbps, Mono...fast quality)

If you are primarily just using shapes and tweens, and not many raster images (i.e. bmp, jpg, png, etc) then the problem is likely that the music is taking a long time to load...and with this, I'm assuming that the animation is probably playing ahead of the music.

If that is the case, or at any rate, you probably will want to create a very simple "preloader" (do a yahoo search on Flash preloader). What that is is basically a scene that is put in place before the first action scene, and all that is happening in that scene is that it is loading some or all of the movie into memory.  You can basically set the preloader to keep loading until it has loaded a percentage or all of the movie scene, or a certain scene if there are more than one.

It does require a small bit of understanding actionscripting, but there are some preloader samples that you can download and customize the code on sites like flashkit.com

I hope this helps. I want you to be able to supersoak...
...

Keep crankin'! Your hard work will pay off.

Cheers,
Andre'


---------- FOLLOW-UP ----------

QUESTION: I am trying to make this pre loader.  Right now I have 2 new layers on the very top.  The first one is named preloader. It has 3 blank key frames on frame 1 2 3.  The codeing goes as followed

// frame 1
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
if (percent_done > 99) {
gotoAndPlay("Start");
}

// frame 2
gotoAndPlay(1);

// frame 3 - label Start

However I keep getting an error that says there is a syntax error on label Start

The second Layer I have us called bar.  It has just a single object in which I made into a movie called "bar" which consists of 100 frames.

Please help

ANSWER: Hmmmm...I am kind of puzzled. Is the label type set to be a name, comment, or anchor?  It seems as though you have everything correct for it to work properly.  

You do have frame 3 labelled "Start" in the frames properties, and not just typed in the actionscript area?

If you do, maybe there is a problem with the name...maybe it is a reserved word or something.  Try replacing the "Start" in frame one with the actual frame number that you want to go to, like it is in frame 2.  See if that works.

Let me know what you come up with, and what you try.

Cheers,
Andre'

---------- FOLLOW-UP ----------

QUESTION: I feel really bad to keep bothering you like this. As whatthe label type is set to be a name comment or anchor... I have no idea...I am a beginer.  I did change my code as you suggested so now it reads.

Frame 1
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
if (percent_done > 99){
gotoAndPlay(4);
}

Frame 2
gotoAndPlay(1);

Frame 3
Label 4

I still get an error message however after I click it the video does play.  However I never see the preloader, and the music is still off.  Please help and thanks again for your help.  
P.S. If you would like to see it when I am done send me your email address and I will send it to you.  Although it is just tweens I think it is pretty good.

Thanks again,
Rob

Answer
It's no problem at all. That's what I'm here for.

Take out the label entirely.  that gotoAndPlay(4) is going to go play frame #4 period.  You don't need a label for it.  

Also make sure that your music is anchored to a frame after frame 4. You don't want it caught in the preloader loop.

As a rule of thumb for the future, you want your preloader to be in a stand-alone scene of it's own. You want it to loop, then go to the next scene, as opposed to being part of the scene that you are animating.

I tell you what, send me the .fla file, and let me take a look at it.  Be sure to tell me what version of Flash you are using in the email, so I can make sure to save any changes to a version that you can open.

I will try to correct your problem, and then you can look through the new .fla file and learn from it.

andre@andrehickman.com or www.andrehickman.com

Cheers,
Andre

Animation

All Answers


Answers by Expert:


Ask Experts

Volunteer


Andre Hickman

Expertise

3d Studio Max beginner to expert levels...After Effects complex compositing techniques...Photoshop expert level...Illustrator intermediate level. I can also answer questions for general animation, motion graphics design, and video editing/composition.

Experience

Logo and simple character animation, motion graphics, video composition in After Effects, as well as Photoshop, and Illustrator techniques, and the use of all of the above in a workflow, to achieve a final design element or production.

Organizations
Freelancer--Turner Studios, Atlanta, GA Owner--Andre Hickman Creative, LLC

Education/Credentials
Turner Studios Govenor's Protege/Mentor Program Georgia Institute of Technology--B.S. Mechanical Engineering Morehouse College--B.S. General Science

©2012 About.com, a part of The New York Times Company. All rights reserved.