Slope Detection Help

I’m working on a platformer, aiming for movement similar to that in Fancy Pants Adventures.

Here’s what I got so far: http://www.truploader.com/view/953680

Anyone have any tips for improving the engine (i.e. more like FPA’s: http://armorgames.com/play/553/the-fancy-pants-adventure-world-2)? Right now, the speed on the slopes isn’t right, it seems kinda inefficient with the while loops every frame, and it’s not really how I want it as the char goes of a ramp/ledge.

I can’t find any decent platformer tutorials - anyone have a good slope detection method, or a .fla I can look at with the two point system?

Thanks.