Crazy disabling buttons

This is a discussion on "Crazy disabling buttons" within the Flash & Multimedia Forum section. This forum, and the thread "Crazy disabling buttons are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 1st, 2007, 21:05
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 19
Posts: 717
Thanks: 0
Thanked 0 Times in 0 Posts
Crazy disabling buttons

This is my code:

Code: Select all
play_Btn.addEventListener(MouseEvent.CLICK, play_Btn_Listener);
pause_Btn.addEventListener(MouseEvent.CLICK, pause_Btn_Listener);
who_Btn.addEventListener(MouseEvent.CLICK, who_Btn_Listener);
illus_Btn.addEventListener(MouseEvent.CLICK, illus_Btn_Listener);
sketch_Btn.addEventListener(MouseEvent.CLICK, sketch_Btn_Listener);
contact_Btn.addEventListener(MouseEvent.CLICK, contact_Btn_Listener);

play_Btn.enabled = false;

var request:URLRequest = new URLRequest("loop.mp3");
var sound:Sound = new Sound(request);
var soundChannel:SoundChannel = sound.play();
var soundPosition:Number;

function pause_Btn_Listener(event:MouseEvent):void {
    soundPosition = soundChannel.position;
    soundChannel.stop();
    play_Btn.enabled = true;
    pause_Btn.enabled = false;
}
    
function play_Btn_Listener(event:MouseEvent):void {
    soundChannel = sound.play(soundPosition);
    pause_Btn.enabled = true;
    play_Btn.enabled = false;
}

function who_Btn_Listener(event:MouseEvent):void {
    gotoAndPlay(32);
}
function illus_Btn_Listener(event:MouseEvent):void {
    gotoAndPlay(72);
}
function sketch_Btn_Listener(event:MouseEvent):void {
    gotoAndPlay(112);
}
function contact_Btn_Listener(event:MouseEvent):void {
    gotoAndPlay(52);
}
Four buttons are navigation, and the other two are for sound control.

They all work fine excpet once I've clicked either illus_Btn, contact_Btn or sketch_Btn then the sound buttons no longer work! They only work again when I click on who_Btn...any ideas why?

Im starting to dislike Flash a lot!

Mike
Reply With Quote

  #2 (permalink)  
Old Nov 1st, 2007, 22:46
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 398
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: Crazy disabling buttons

First of all dont dislike flash, its very powerful tool...
Second im not very familiar with AS3 usually work with AS2, but if you could post ur file maybe i could help you.
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling Dropdown based on value range Matc JavaScript Forum 0 Jun 26th, 2007 11:02
help with fwd/backwrd buttons affecting other buttons typeofdoug Flash & Multimedia Forum 5 Feb 4th, 2007 03:48
Disabling navigation buttons HalUK JavaScript Forum 4 Jan 17th, 2007 11:12
Disabling/Enabling form elements flamin_mongrel JavaScript Forum 1 Oct 18th, 2006 21:51
Disabling a dynamic drop-down with JavaScript gecastill JavaScript Forum 0 Mar 6th, 2006 13:23


All times are GMT. The time now is 12:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43