How could I have done these better?

Posted by mikes02 
How could I have done these better?
April 02, 2009 11:11PM
I am relatively new to FlashEFF and I am looking for ways to improve my ability to work with it along with speeding up the process. I have uploaded to of my files for anyone to download and take a peak at.

Download Source File 1

Problem: Huge timeline and a whole bunch of guessing, basically I just messed with this thing for hours until the timeline basically did what I wanted it to, but I am guessing there has to be a better way of doing this and still achieving the effects I want and the delays I want, etc.

Download Source File 2

Problem: Basically the same problem, except this time I am using an AS3 timer to go from frame to frame to achieve an effect like each image is transitioning into the next one. Is there a better way to set this up than how I am doing it?

Another problem I have is if I want to add a button to one of the images, there is a huge delay before it becomes clickable and then the button state is carrying over into the next frame, why is it doing that? I have removed it in my source file because it was driving me crazy but hopefully I explained that well enough that it makes sense.

Another issue I have is that the animation seems to be starting before the flash is even done loading on the webpage, so the first animation is nearly over by the time it loads, is there a way to prevent this somehow so that the timed transitions from frame to frame are the same? I think I had read somewhere in the past that the FlashEff animations start playing right away even if the page hasn't finished loading yet?

Anyhow, I know I typed a lot, hopefully it was clear, any help is greatly appreciated.

Thanks!



Edited 1 time(s). Last edit at 04/02/2009 11:12PM by mikes02.
Re: How could I have done these better?
April 05, 2009 04:02PM
just to clarify, i am not asking anybody to redo these for me, just asking for someone to look them over and give me some pointers please. there has to be someone on here that has more experience than me....at least i hope so :)
Re: How could I have done these better?
April 06, 2009 11:37AM
Hi mikes02,

I looked over your files and the banners look really nice, but I've noticed your concern about the need for improvement...having 620 frames for 4 sliding images is to much. Here are a few tips:
First of all you really don't need more than one frame, all you have to do is listen to the on end event of the component and start the next effect. Here is a small example:
Create from code a new function for each slide. Name them like firstSlide(), secondSlide(), etc. In that function you will attach the FlashEff component(you can use only one or you can use separate components for each slide, it does not matter) over an image and set the pattern and the parameters.
If you load the Images from Xml you will have to listen to the onComplete event of the loader, and when that happens call the function that you have created for the first slide( in my example that would be firstSlide()). Jumpeyecomponents has an awesome loader that you should take a look at, but the regular loader from Adobe works fine too.
When the first slide has completed it's transition listen to the end Event of FlashEff and then load the image from xml. When that image is completely loaded call the second function and so on so forth.
This really is more easy than it looks. You just have to be familiar with events and listeners. Here are the events of FlashEff [www.flasheff.com]

Hope this helps, if you have any more questions just ask.
Re: How could I have done these better?
April 07, 2009 08:27AM
Thanks for the pointers, I really appreciate it, do you have any examples of the function codes that I could look over?
Re: How could I have done these better?
April 23, 2009 05:52AM
Further explanation would be greatly appreciated i don't know what the on end event thing is???
Re: How could I have done these better?
April 24, 2009 07:36AM
Here is an example of this event we are all talking about:
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;
import com.jumpeye.Events.FLASHEFFEvents;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents. TRANSITION_START, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);

function transitionStartHandler(evtObj: FLASHEFFEvents):void {
trace("The transition has started.");
}

function transitionEndHandler(evtObj:FLASHEFFEvents): void {
trace("The transition has ended.");
}
What this does is, it tells us when the animation has finished. It will work only on FES and FET patterns.
The transitionEndHandler function is triggered when the animation is done playing so it will give you a good opportunity to either loop the effect( this is going to work if you have a simple animation that uses one frame) or it can be used to chain animation ( when one is done, the next one will start).
For further information just ask.
Re: How could I have done these better?
April 29, 2009 12:13AM
This doesn't make any sense to me, I don't understand why FlashEFF would be developed in an effort to make Flash easier but then you have to know all this Actionscript just to get it to work properly........
Re: How could I have done these better?
April 29, 2009 08:01AM
To do the same things that you've done in the first post without FlashEff you would have needed to be an Flash expert. FlashEff provided an easy way to do them without spending years learning action script. Your question was how could have I done this better, I provided an answer for that question.

To get you to understand what and event listener is I'll try to provide a simple explination. Think of the eventListener as a man who has the job to yell whenever a action is done. The action is defined differently on each component ( some may have onComplete or Start, or Load) FlashEff has the END action named TRANSITION_END. When the transition has ended that guys yells END. In Flash, instead of yelling END it calls a function(ie: transitionEndHandler).

myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);

I know the listeners are hard to understand, I had a lot of trouble figuring them out when I started using Action Script.
Sorry, you do not have permission to post/reply in this forum.