LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


  #1  
Old 09-22-2004, 08:03 PM
LMarbles LMarbles is offline
Registered User
 
Join Date: Sep 2004
Location: UK
Posts: 2
Rep Power: 0
LMarbles is on a distinguished road
Button problem

Hi i have made a button using movies in the up down and over events. It works ok except for one little problem. When i click the button the DOWN movie is played.. but as soon as i release the mouse button it stops and goes back to the UP event. I dont want this i want the DOWN movie to keep playing even after the user lets go of the mouse button. Buuuut.. how do i do it?

Thanks.
__________________
Sam.
Reply With Quote
  #2  
Old 09-22-2004, 10:24 PM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
Guy Button Movie Clips

Welcome to FlashMove LMarbles. Try checking this out. Instead of using a button symbol, I used a movie clip symbol and gave it button events. This way I have more control of the different states of the button movie clip.
Attached Files
File Type: zip test.zip (2.5 KB, 6 views)
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius

Blog | Shared Items
Reply With Quote
  #3  
Old 09-23-2004, 04:57 PM
EmilyEliz EmilyEliz is offline
Registered User
 
Join Date: Jun 2004
Location: Burlington
Posts: 25
Rep Power: 0
EmilyEliz is on a distinguished road
LMarbles -- check out this post, it's exactly the problem you have. Just replace your clip names with mine...you need the function that is written out at the end of the post in order for your movie to tell if your button has been clicked or not.http://www.flashmove.com/forum/showt...threadid=15637 (fixed)
hope that helps!
liz
Reply With Quote
  #4  
Old 09-23-2004, 06:36 PM
LMarbles LMarbles is offline
Registered User
 
Join Date: Sep 2004
Location: UK
Posts: 2
Rep Power: 0
LMarbles is on a distinguished road
hey thanks for replying got your zip scottae will try it out thanks. And EmilyEliz the link you gave doesn't seem to work for me, get page not found
__________________
Sam.
Reply With Quote
  #5  
Old 09-23-2004, 07:32 PM
EmilyEliz EmilyEliz is offline
Registered User
 
Join Date: Jun 2004
Location: Burlington
Posts: 25
Rep Power: 0
EmilyEliz is on a distinguished road
this is the code from that post -- prisma actually hooked me up with this. i've just added some comments for you.

Actionscript:
var activeBtn;
// name your button instances "mcBtn0", "mcBtn1" etc etc respectively so that this function will apply to all.
for(var i:Number=0; i < 4; i++){
   
   this["mcBtn"+i].onRollOver = myOnRollOver; //<- no brackets here. Brackets mean a function is called, but here we only assign function reference to variable.
   this["mcBtn"+i].onRollOut = myOnRollOut;
   this["mcBtn"+i].onPress = myOnPress;
}

function myOnRollOver():Void {
   if (activeBtn != this) {
      this.gotoAndStop("over");
   }
}
function myOnRollOut():Void {
   if (activeBtn != this) {
      this.gotoAndStop("up");
   }
}
function myOnPress():Void {
   if (activeBtn != this) {
      activeBtn.gotoAndStop("up");
      activeBtn = this;
      this.gotoAndStop("down");
      this.btnAction(); //<- previously I used i here, but we're ouside of the loop already, d'oh.
   }
}

//now the functions are declared inside the buttons again...
//wherever these buttons are supposed to take you you need to put that frame number or label in the parenthesis...or if it's a URL simply apply the getURL("http://youraddresshere.com"); function in place of the "_root.gotoAndStop("..."); function you see underneath...
mcBtn0.btnAction = function():Void {
   _root.gotoAndStop("intro");
}
mcBtn1.btnAction = function():Void {
   _root.gotoAndStop("standards");
}
mcBtn2.btnAction = function():Void {
   _root.gotoAndStop("advice");
}
mcBtn3.btnAction = function():Void {
   _root.gotoAndStop("checklist");
}

mcBtn0.onPress();

hope that helps!
liz
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Button problem faculty1882 Flash 8 0 11-21-2007 12:52 PM
[F8] Roll Out Roll Over button problem maclover Flash 8 1 10-24-2007 06:52 PM
MovieClip overlap button problem db82 Flash MX 2 01-27-2005 03:41 PM
Button Navigation Problem rbgerman Newbies 0 08-02-2004 08:15 PM
big button problem, can anyone help? Robyn_h Newbies 2 04-01-2003 06:44 AM




All times are GMT. The time now is 10:38 PM.