PDA

View Full Version : Help me debug my portfolio!



exid
May 20th, 2008, 04:50 PM
Hi guys,

Here is a rough version of my portfolio. Be gentle.

http://dma.sjsu.edu/~art101b/jbernardo/portfolio/

I'm trying to figure out how to fix my menu, which is expanded and closed by if else statements. That is, if _xmouse reaches a certain point it expands (and the menu instance jumps to frame 30), if _xmouse leaves that region and the menu instance is at frame 30, then the menu instance jumps to a segment of the timeline in which the menu closes. At the end of this segment menu instance timeline returns to frame 1.

Here is the AS for the menu's expanding and closing functionality, which is embedded on the menu instance itself:


onClipEvent (enterFrame) {
if (this._currentframe == 1) {
if (_xmouse<30) {
this.gotoAndPlay(2);
} else {
null;
}
} else {
null;
}
if (this._currentframe == 30) {
if (_xmouse>185) {
this.gotoAndPlay("menuClose");
} else {
null;
}
} else {
null;
}
}

The problem is when you scroll out of the menu too fast when it is expanded and roll over another button, the menu gets stuck!

I don't wanna bog this thread down with all of my AS so I'll only post it if it's going to be necessary. What do you guys think could be causing this problem?

Digitalosophy
May 20th, 2008, 05:38 PM
A far better and more simplistic approach would be using something like this



import mx.transitions.Tween;
import mx.transitions.easing.*;

menuMC.onRollOver = function () {
var openTween:Tween = new Tween (menuMC, "_x", Strong.easeOut, -75.0, 0, .75, true);
};

menuMC.onRollOut = function () {
var closeTween:Tween = new Tween (menuMC, "_x", Strong.easeOut, 0, -75, .75, true);
};


Obviously that's just 3 minutes of coding so you can spice it up a bit but I think you'll be better off that way. One thing you'll want to do is only allow the rollout effect once the open motion is completed so you don't get a jerky effect. Or something along those lines.

exid
May 22nd, 2008, 09:17 PM
A far better and more simplistic approach would be using something like this

ActionScript Code:

import mx.transitions.Tween;
import mx.transitions.easing.*;

menuMC.onRollOver = function () {
&nbsp;&nbsp;&nbsp;&nbsp;var openTween:Tween = new Tween (menuMC, "_x", Strong.easeOut, -75.0, 0, .75, true);
};

menuMC.onRollOut = function () {
&nbsp;&nbsp;&nbsp;&nbsp;var closeTween:Tween = new Tween (menuMC, "_x", Strong.easeOut, 0, -75, .75, true);
};




Obviously that's just 3 minutes of coding so you can spice it up a bit but I think you'll be better off that way. One thing you'll want to do is only allow the rollout effect once the open motion is completed so you don't get a jerky effect. Or something along those lines.

thanks for your help. i've never heard of these classes, i will have to read up on them to understand them more.

Anogar
May 22nd, 2008, 09:21 PM
While you're learning - the Adobe Tween class is awful; it's slow, unoptimized, and just generally not good. You should check out TweenLite (http://www.tweenlite.com).

randomagain
May 23rd, 2008, 04:49 AM
the arrow seems to flip when its running around, plus that is generally a bit naff

the zippy stuff is good though

exid
June 3rd, 2008, 07:20 PM
While you're learning - the Adobe Tween class is awful; it's slow, unoptimized, and just generally not good. You should check out TweenLite (http://www.tweenlite.com).

hmmm, i'll take a look at what you suggested. i'd rather stick to what's already available to me though. is there a place i can read about the adobe tween class? it's not coming up in the CS3 help directory.

Anogar
June 3rd, 2008, 07:29 PM
I can understand feeling a little hesitant to use custom classes, but I promise you - TweenLite is basically an industry standard tool, everyone uses it instead of the Adobe classes.

rondog
June 3rd, 2008, 08:08 PM
He's right. Use a tweening class! and TweenLite (or max) is very good. I just made the switch from fuse to tweenmax

Fidodo
June 3rd, 2008, 08:09 PM
Trust us on this. I tried using the tween class on a game I was hired to make and it regularly failed. Stopping in the middle of the tween, or not executing at all. I ended up writing one from scratch since it is a really simple class in the first place. The one I wrote pretty much implemented the same exact thing as the Flash class but mine actually worked. Go figure.

mattrock23
June 3rd, 2008, 09:05 PM
If you can make something available without a click. Why make the user click? At first, when it just shows your name and the user has to click to enter, and in the portfolio when you display thumbnails. When using thumbnails it is a good practice to show the large version of the first thumbnail by default. For a couple reasons: web users are lazy and a good portion of your stage is empty without it.

Transitions are a little too long.

It's somewhat annoying to click on a link, wait for a page to load (or for the transition to complete) and then find out there is nothing there. You could make a "tooltip" that says under construction that appears when the user mouses over the incomplete sections menu item. I know the site is incomplete; I figure you will probably fill that section in before the official launch, but just for future reference. Same principle as the first paragraph.

What's up with the "I" on the header of the portfolio section?

Digitalosophy
June 3rd, 2008, 09:16 PM
Anogar is correct, he's a smart guy listen to him.

I make examples like that because it doesn't require you to download class files. The example was merely a logical example of how I feel you should go about it.

snickelfritz
June 4th, 2008, 01:25 AM
I think you'd have a lot of fun coding that navigation triangle with Tweenmax "orient to bezier". (just download the class and learn it; you'll be glad you did)

BTW, I like your site.
I found the triangle to be very interesting and functional; it's a great idea.