Web Design Forum: Button Issues - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Button Issues Actionscript 3 Rate Topic: -----

#1 User is offline   safety_ 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 28-September 11
  • Reputation: 0

Posted 28 September 2011 - 11:18 PM

I'm having problems with the buttons on this. As you can see the buttons won't make the menus slide the other way, almost like they're not recognisable. If you look, even the traces aren't showing up for them.

You can see the .swf file on this thread, let me know if you need me to post the .fla file.



I would really appreciate any help or advice.

Thanks

Here is the code:

//Variables for the position of the menu
var biopos:Boolean;
var webpos:Boolean;
var modpos:Boolean;

//Button listeners
Object(this).modAnim.webBtn.addEventListener(MouseEvent.MOUSE_DOWN, webbutton);
Object(this).illAnim.modBtn.addEventListener(MouseEvent.MOUSE_DOWN, modbutton);
Object(this).illBtn.addEventListener(MouseEvent.MOUSE_DOWN, illbutton);
Object(this).webAnim.bioBtn.addEventListener(MouseEvent.MOUSE_DOWN,biobutton);



//WEB BUTTON;
function webbutton(event:MouseEvent):void
{
	trace("Positions before clicked");
	trace("biopos = ", biopos);
	trace("webpos = ", webpos);
	trace("modpos = ", modpos);
	//If BIO is up;
	if (biopos == false && webpos == false && modpos == false)
	{
		webAnim.play();
		biopos = ! biopos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If MOD is up;
	if (biopos == true && webpos == true && modpos == false)
	{
		modAnim.play();
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If ILL is up;
	if (biopos == true && webpos == true && modpos == true)
	{
		illAnim.play();
		modAnim.play();
		modpos = ! modpos;
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
}
//MOD BUTTON
function modbutton(event:MouseEvent):void
{
	trace("Positions before clicked");
	trace("biopos = ", biopos);
	trace("webpos = ", webpos);
	trace("modpos = ", modpos);
	//If BIO is up
	if (biopos == false && webpos == false && modpos == false)
	{
		modAnim.play();
		webAnim.play();
		webpos = ! webpos;
		biopos = ! biopos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If WEB is up
	if (biopos == true && webpos == false && modpos == false)
	{
		modAnim.play();
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If ILL is up
	if (biopos == true && webpos == true && modpos == true)
	{
		illAnim.play();
		modpos = ! modpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
}
//ILL BUTTON
function illbutton(event:MouseEvent):void
{
	trace("Positions before clicked");
	trace("biopos = ", biopos);
	trace("webpos = ", webpos);
	trace("modpos = ", modpos);
	//If BIO is up
	if (biopos == false && webpos == false && modpos == false)
	{
		illAnim.play();
		modAnim.play();
		webAnim.play();
		modpos = ! modpos;
		webpos = ! webpos;
		biopos = ! biopos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If WEB is up
	if (biopos == true && webpos == false && modpos == false)
	{
		illAnim.play();
		modAnim.play();
		modpos = ! modpos;
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If MOD is up
	if (biopos == true && webpos == true && modpos == false)
	{
		illAnim.play();
		modpos = ! modpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
}
//BIO BUTTON
function biobutton(event:MouseEvent):void
{
	trace("Positions before clicked");
	trace("biopos = ", biopos);
	trace("webpos = ", webpos);
	trace("modpos = ", modpos);
	//If WEB is up;
	if (biopos == true && webpos == false && modpos == false)
	{
		webAnim.play();
		biopos = ! biopos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If MOD is up;
	if (biopos == true && webpos == true && modpos == false)
	{
		webAnim.play();
		modAnim.play();
		biopos = ! biopos;
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}
	//If ILL is up;
	if (biopos == true && webpos == true && modpos == true)
	{
		illAnim.play();
		webAnim.play();
		modAnim.play();
		modpos = ! modpos;
		biopos = ! biopos;
		webpos = ! webpos;
		trace("Positions AFTER clicked");
		trace("biopos = ", biopos);
		trace("webpos = ", webpos);
		trace("modpos = ", modpos);
	}

}

0

#2 User is offline   BEP 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 11-September 11
  • Reputation: 0
  • Gender:Male
  • Location:Ashford Kent England
  • Experience:Nothing
  • Area of Expertise:Web Developer

Posted 29 September 2011 - 01:55 PM

Saftey_

check out

http://www.ffiles.co...nu_v2_2140.html

May help.

Adam
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users