Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7550673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:16:27+00:00 2026-05-30T10:16:27+00:00

when pressing on a button that error comes up in the OUTPUT tab the

  • 0

when pressing on a button that error comes up in the OUTPUT tab

the file is in the link

Error #1006.rar

This is the navigation_actions code where are the codes of the navigation bar (the buttons)

var buttonArray:Array = new Array( );
var currentButton:Object = new Object;

var navContainer:Sprite=new Sprite  ;
addChild(navContainer);

var navArray:Array=["من نحن","المحتوى","المراجع","التواصل", "خريطة الموقع"];

for (var i:Number=0; i<5; i++) {

var navItem:NavItem = new NavItem;
navItem.x = navItem.width*i;
navItem.nav_name.text = navArray[i];
buttonArray.push(navItem);
navItem.addListeners();
navContainer.addChild(navItem);

navItem.name = String(i);

navItem.addEventListener(MouseEvent.CLICK, onNavClick);
}

function onNavClick(evt:MouseEvent):void {

currentButton.y = 0;
currentButton.addListeners();
currentButton.addEventListener(MouseEvent.CLICK, onNavClick);

currentButton = evt.target;
currentButton.removeListeners();
currentButton.removeEventListener(MouseEvent.CLICK, onNavClick);

}

initialNavigation();

function initialNavigation():void {

buttonArray[0].y = -10;
currentButton = buttonArray[0];
currentButton.removeListeners();
currentButton.removeEventListener(MouseEvent.CLICK, onNavClick);
}

var navSide:NavSide = new NavSide;
navSide.x = navContainer.width;
navSide.width = stage.stageWidth - navContainer.width;
navSide.alpha = 0.7;
navContainer.addChild(navSide);

navContainer.y = stage.stageHeight-67; }

and this is the navItem actions (the buttons it self)

import com.greensock.TweenLite;

nav_name.autoSize=TextFieldAutoSize.LEFT;
nav_name.selectable=false;

nav_name.x=170-nav_name.width+25;


function onOver(evt:MouseEvent):void {

TweenLite.to(this, 0.4, { y:-10});
}

function onOut(evt:MouseEvent):void {

TweenLite.to(this, 0.4, { y:0});
}

function addListeners():void {

this.addEventListener(MouseEvent.ROLL_OVER, onOver);
this.addEventListener(MouseEvent.ROLL_OUT, onOut);
}

function removeListeners():void {

this.removeEventListener(MouseEvent.ROLL_OVER, onOver);
this.removeEventListener(MouseEvent.ROLL_OUT, onOut);

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:16:29+00:00Added an answer on May 30, 2026 at 10:16 am

    I downloaded your file and from what I can tell you added a listener to your NavItem instance but the actual event comes from its child. That’s why event.target is not equal to a NavItem.

    Either use event.currentTarget or add navItem.mouseChildren = false; so NavItem’s children will not grab clicks.

    Next time please post code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in an HTM page that, after pressing the submit button,
I have a Google Chrome extension that upon pressing a button executes an xmlhttp
I can't get this straight: I have one button that I want one action
How can you open windows program by pressing a button on web page I
I'm developing an Eclipse plug-in where upon pressing a button, the plug-in takes the
My application hangs. Pressing the home button doesn't return to the springboard anymore. Additionally
Under visual studio if you run a web project by pressing the Go button
Does anyone know of a way to simulate pressing a detail disclosure button?
I want to do a custom action when pressing on the Menu button on
I find myself constantly pressing ctrl-z to undo the automatic formatting that happens in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.