FORUMS: list search recent posts

AS3 Submenu Buttons Not Working

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
sandra schmitt
AS3 Submenu Buttons Not Working
on Sep 30, 2009 at 3:42:30 pm

I am migrating from AS2 to AS3 and realize the button functionality is totally different. I have a website with buttons that have submenus. I have the first layer of buttons working. They have eventListeners attached that take them to a labeled frame on the timeline. When you get to that labeled frame there is a submenu of buttons there. I tried putting the code for those buttons in the same script on frame 1 but it messes up the movie.

I think it has something to do with the buttons not actually being there on frame 1 when the script is read. I cannot figure out where to put the script for the submenu buttons to make them work. I think I have to put a parent type script in there. Sorry I dont even know what to look up.

If anyone could please shed some light on this I would really appreciate. I am hoping this is not a difficult thing to do.

Here is the code on frame 1:

function goCollections(e:MouseEvent):void {
collections_btn.addEventListener(MouseEvent.CLICK, goCollections);

function goRaison(e:MouseEvent):void {
raison_btn.addEventListener(MouseEvent.CLICK, goRaison);

function goStores(e:MouseEvent):void {
stores_btn.addEventListener(MouseEvent.CLICK, goStores);

function goNews(e:MouseEvent):void {
var link:URLRequest = new URLRequest("");
news_btn.addEventListener(MouseEvent.CLICK, goNews);

function goShop(e:MouseEvent):void {
var link:URLRequest = new URLRequest("");
shop_btn.addEventListener(MouseEvent.CLICK, goShop);

function goContact(e:MouseEvent):void {
contact_btn.addEventListener(MouseEvent.CLICK, goContact);

function goSpring(e:MouseEvent):void {
spring_btn.addEventListener(MouseEvent.CLICK, goSpring);

function goEco(e:MouseEvent):void {
eco_btn.addEventListener(MouseEvent.CLICK, goEco);

Thanks to anyone who can shed some light on this or just give me a heads up if this is something really difficult and I may just go back to AS2.

Thanks! Sandra

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved