[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.3

Flash CS4 Logic for rollovers

Asked by stkoontz in ActionScript

Tags: Flash CS4 Actionscript

I'm trying to make a Flash page that enlarges as banners are rolled over.  The example page is here...

http://cenational.org/index-new.asp

I'm using functions that call the fl.transitions.tween and .easing methods.  To put banner #1 (Called News) back to it's original size, I'm calling a function within the code that's called when the user rolls over banner #2 (Called Ministries).  (I tried using the Mouse_Out function, but when the text that's a hyperlink was rolled over, the resize function was called and the banner went back to it's original size.)

There are a few funny things that happen that make me wonder if my logic is correct.

1) Sometimes when I roll over the "Ministries" banner it stops expanding until I move the mouse again.
2) If you hit a certain spot, there's a funny white box that shows on the "Ministries" banner.  This stops when I take out the the Alpha Tween in the MinistriesBack function
3) There are times that the animation jumps when I roll over it or stops resizing when it shouldn't.

So my question is, is there a better way to setup the logic in the actionscript that would make this less buggy?  If not, can anyone help me with the funny problems?

Thanks for all the help.

Steve
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
this.mcNewsLinks.alpha=0;
this.mcMinistriesLinks.alpha=0;
 
import fl.transitions.Tween;
import fl.transitions.easing.*;
 
mcNewsBanner.addEventListener(MouseEvent.MOUSE_OVER,gotoNews);
mcMinistriesHitBox.addEventListener(MouseEvent.MOUSE_OVER,gotoMinistries);
 
function gotoNews(event:MouseEvent):void {
	ministriesBack();
	var newsBWidth:Tween=new Tween(mcNewsBanner,"width",Strong.easeOut,mcNewsBanner.width,mcNewsBanner.width=800,3,true);
	var newsBHeight:Tween=new Tween(mcNewsBanner,"height",Strong.easeOut,mcNewsBanner.height,mcNewsBanner.height=100,3,true);
 
	var newsLAlpha:Tween=new Tween(mcNewsLinks,"alpha",Strong.easeIn,mcNewsLinks.alpha,mcNewsLinks.alpha=100,3,true);
}
 
function gotoMinistries(event:MouseEvent):void {
	newsBack();
	//Banner
 
    var ministriesBWidth:Tween=new Tween(mcMinistriesBanner,"width",Strong.easeOut,mcMinistriesBanner.width,mcMinistriesBanner.width=800,3,true);
	var ministriesBHeight:Tween=new Tween(mcMinistriesBanner,"height",Strong.easeOut,mcMinistriesBanner.height,mcMinistriesBanner.height=100,3,true);
 
	//Picture
	var ministriesPWidth:Tween=new Tween(mcMinistriesPictures,"width",Strong.easeOut,mcMinistriesPictures.width,mcMinistriesPictures.width=435,3,true);
	var ministriesPHeight:Tween=new Tween(mcMinistriesPictures,"height",Strong.easeOut,mcMinistriesPictures.height,mcMinistriesPictures.height=96,3,true);
	var ministriesPAlpha:Tween=new Tween(mcMinistriesPictures,"alpha",Strong.easeOut,mcMinistriesPictures.alpha,mcMinistriesPictures.alpha=.3,3,true);
	var ministriesPPosition:Tween=new Tween(mcMinistriesPictures,"x",Strong.easeOut,mcMinistriesPictures.x,mcMinistriesPictures.x=580,3,true);
 
	//Links
	var ministriesLAlpha:Tween=new Tween(mcMinistriesLinks,"alpha",Strong.easeIn,mcMinistriesLinks.alpha,mcMinistriesLinks.alpha=100,3,true);
}
 
//Put banners back
function newsBack():void {
	//Banner
	var newsBWidth:Tween=new Tween(mcNewsBanner,"width",Strong.easeOut,mcNewsBanner.width,mcNewsBanner.width=672,3,true);
	var newsBHeight:Tween=new Tween(mcNewsBanner,"height",Strong.easeOut,mcNewsBanner.height,mcNewsBanner.height=80,3,true);
 
	//Links
	var newsLAlpha:Tween=new Tween(mcNewsLinks,"alpha",Strong.easeOut,mcNewsLinks.alpha,mcNewsLinks.alpha=0,3,true);
}
 
function ministriesBack():void {
	//Banners
	var ministriesBWidth:Tween=new Tween(mcMinistriesBanner,"width",Strong.easeOut,mcMinistriesBanner.width,mcMinistriesBanner.width=672,3,true);
	var ministriesBHeight:Tween=new Tween(mcMinistriesBanner,"height",Strong.easeOut,mcMinistriesBanner.height,mcMinistriesBanner.height=80,3,true);
	//Links
	var MinistriesLAlpha:Tween=new Tween(mcMinistriesLinks,"alpha",Strong.easeOut,mcMinistriesLinks.alpha,mcMinistriesLinks.alpha=0,3,true);
	//Pictures
	var ministriesPWidth:Tween=new Tween(mcMinistriesPictures,"width",Strong.easeOut,mcMinistriesPictures.width,mcMinistriesPictures.width=343.2,3,true);
	var ministriesPHeight:Tween=new Tween(mcMinistriesPictures,"height",Strong.easeOut,mcMinistriesPictures.height,mcMinistriesPictures.height=80,3,true);
	var ministriesPAlpha:Tween=new Tween(mcMinistriesPictures,"alpha",Strong.easeOut,mcMinistriesPictures.alpha,mcMinistriesPictures.alpha=100,3,true);
	var ministriesPPosition:Tween=new Tween(mcMinistriesPictures,"x",Strong.easeOut,mcMinistriesPictures.x,mcMinistriesPictures.x=565,3,true);
}
[+][-]08/06/09 03:01 PM, ID: 25038534Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ActionScript
Tags: Flash CS4 Actionscript
Sign Up Now!
Solution Provided By: Sci-Fi-Si
Participating Experts: 1
Solution Grade: B
 
[+][-]08/07/09 05:28 AM, ID: 25041940Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625