School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,365 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,435 people online right now. Registration is fast and FREE... Join Now!




Button functionality/Animation flow issues

 

Button functionality/Animation flow issues, Button functionality/Animation flow issues

r0x0rcist

17 Jun, 2009 - 11:54 AM
Post #1

New D.I.C Head
*

Joined: 15 May, 2009
Posts: 47


My Contributions
Listing issues with buttons by labeled name and "menu" is referencing the menu that ascends/descends upon button click.
Issues are as follows:

• When going from Cap Mod to MS Office
Tools the MS Office Tools appears to be
on the stage in place already, not easing
in but already on the stage behind the
Cap Mod menu.

• Need menus to all descend behind the
ascending menu, showing as the one
coming up on top. Currently some drop
in front and others behind. It doesn’t look
very uniform. (This is my fault, I’m sure)

• Need to make it so that buttons cannot be
clicked and button appearance cannot be
changed after that button’s menu comes
up. Only other buttons should be clickable
to prevent menus to be able to ascend
repeatedly if the user clicks the button again.


If you have an ideas or suggestions please let me know... any help at all is appreciated. I'm getting fairly frustrated with these problems and can't seem to figure it out. The "cap mod" up version of the button and the menu are not vector graphics. I am already aware of this and replacing it. The main issues I am querying here are for the animation problems that keep it not looking right. Thanks for reading, btw!!!1


CODE


import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

var xMovement:Tween;
var yMovement:Tween;

function Start():void
{
    CapModBtn.addEventListener(MouseEvent.MOUSE_DOWN, moveCapMods);
    OfficeToolsBtn.addEventListener(MouseEvent.MOUSE_DOWN, moveOfficeTools);
    LOBBtn.addEventListener(MouseEvent.MOUSE_DOWN, moveLOB);
}

function moveCapMods(even:MouseEvent):void
{
    yMovement = new Tween(LOBInfo, "y", Back.easeIn, LOBInfo.y, 413, 1, true);
    yMovement = new Tween(OfficeToolsInfo, "y", Back.easeIn, OfficeToolsInfo.y, 413, 1, true);
    xMovement = new Tween(CapModuleInfo, "x", Back.easeIn, CapModuleInfo.x, 20, 1, true);
    yMovement = new Tween(CapModuleInfo, "y", Back.easeIn, CapModuleInfo.y, 138, 1, true);
}

function moveOfficeTools(even:MouseEvent):void
{
    yMovement = new Tween(LOBInfo, "y", Back.easeIn, LOBInfo.y, 413, 1, true);
    yMovement = new Tween(CapModuleInfo, "y", Back.easeIn, CapModuleInfo.y, 413, 1, true);
    xMovement = new Tween(OfficeToolsInfo, "x", Back.easeIn, CapModuleInfo.x, 20, 1, true);
    yMovement = new Tween(OfficeToolsInfo, "y", Back.easeIn, CapModuleInfo.y, 138, 1, true);
}

function moveLOB(even:MouseEvent):void
{
    yMovement = new Tween(OfficeToolsInfo, "y", Back.easeIn, OfficeToolsInfo.y, 413, 1, true);
    yMovement = new Tween(CapModuleInfo, "y", Back.easeIn, CapModuleInfo.y, 413, 1, true);
    xMovement = new Tween(LOBInfo, "x", Back.easeIn, LOBInfo.x, 20, 1, true);
    yMovement = new Tween(LOBInfo, "y", Back.easeIn, LOBInfo.y, 138, 1, true);
}

Start();



** Edit ** code.gif

User is offlineProfile CardPM
+Quote Post


sankar22222

RE: Button Functionality/Animation Flow Issues

20 Aug, 2009 - 01:09 AM
Post #2

New D.I.C Head
*

Joined: 20 Aug, 2009
Posts: 1


please send me the fla .U have the problem on ur fla so send me the fla also.let me check
User is offlineProfile CardPM
+Quote Post

BetaWar

RE: Button Functionality/Animation Flow Issues

20 Aug, 2009 - 10:01 PM
Post #3

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 4,729



Thanked: 269 times
Dream Kudos: 1400
My Contributions
Okay, I believe I got something like what you are trying to accomplish. Here is it:

CODE
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

var xMovementIn:Tween;
var yMovementIn:Tween;

var xMovementOut:Tween;
var yMovementOut:Tween;

var selectedMenu:MovieClip;


function Start():void
{
    Btn1.addEventListener(MouseEvent.MOUSE_DOWN, moveCapMods);
    Btn2.addEventListener(MouseEvent.MOUSE_DOWN, moveOfficeTools);
    selectedMenu = moveOfficeInfo;
}

function moveCapMods(even:MouseEvent):void
{
    if(selectedMenu == moveCapInfo){
        return;
    }
    yMovementOut = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 413, 1, true);
    selectedMenu = moveCapInfo;
    yMovementIn = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 0, 1, true);
}

function moveOfficeTools(even:MouseEvent):void
{
    if(selectedMenu == moveOfficeInfo){
        return;
    }
    yMovementOut = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 413, 1, true);
    selectedMenu = moveOfficeInfo;
    yMovementIn = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 0, 1, true);
}

Start();


Now, I simplified things where possible (MC names, lines, not using x movement, etc.).

Hope that helps.
User is offlineProfile CardPM
+Quote Post

r0x0rcist

RE: Button Functionality/Animation Flow Issues

6 Oct, 2009 - 05:10 AM
Post #4

New D.I.C Head
*

Joined: 15 May, 2009
Posts: 47


My Contributions
QUOTE(BetaWar @ 21 Aug, 2009 - 12:01 AM) *

Okay, I believe I got something like what you are trying to accomplish. Here is it:

CODE
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

var xMovementIn:Tween;
var yMovementIn:Tween;

var xMovementOut:Tween;
var yMovementOut:Tween;

var selectedMenu:MovieClip;


function Start():void
{
    Btn1.addEventListener(MouseEvent.MOUSE_DOWN, moveCapMods);
    Btn2.addEventListener(MouseEvent.MOUSE_DOWN, moveOfficeTools);
    selectedMenu = moveOfficeInfo;
}

function moveCapMods(even:MouseEvent):void
{
    if(selectedMenu == moveCapInfo){
        return;
    }
    yMovementOut = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 413, 1, true);
    selectedMenu = moveCapInfo;
    yMovementIn = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 0, 1, true);
}

function moveOfficeTools(even:MouseEvent):void
{
    if(selectedMenu == moveOfficeInfo){
        return;
    }
    yMovementOut = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 413, 1, true);
    selectedMenu = moveOfficeInfo;
    yMovementIn = new Tween(selectedMenu, "y", Back.easeIn, selectedMenu.y, 0, 1, true);
}

Start();


Now, I simplified things where possible (MC names, lines, not using x movement, etc.).

Hope that helps.



I'm sorry, I didn't get a notification that you replied to this post at all. I might need to set something up (?) that I haven't yet.

Thanks so much for your help. I get some errors with this code. -I know you took some out and the names don't match up. -However, I have something new I need help on. Can you see my recent posted question. -You seem to be helpful and I've yet to receive a reply from anyone. I'm flying blind, and I'm sorry, but I'd appreciate any (and I do mean any) help whatsoever ^_~

Thanks so much,

~R
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 08:43PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month