Condition on button action

This is a discussion on "Condition on button action" within the Flash & Multimedia Forum section. This forum, and the thread "Condition on button action 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 Sep 14th, 2006, 09:14
Junior Member
Join Date: Feb 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Condition on button action

Hopefully I will be able to explain this so someone can understand.

I am using a button to tell a movie clip to goto and play from a labelled frame.
I only want this button to do this if that movie clip is currently at a particular frame, otherwise I don't want the button to anything.

I am thinking that I can set a variable when the movie clip gets to that frame and set a condition on the button if the variable is 0 the button will not work. I have no idea how to write this in action script though.

I realize this will probably need a long explanation but after reading through quite a bit of actionscript documentation, I still can't figure out how to write this.
Reply With Quote

  #2 (permalink)  
Old Sep 14th, 2006, 19:45
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Cool Re: Condition on button action

You could try the "if" statement. If the frame number is between 5-12 the button would function normally. Get URL billybob.com. If the frame is after 12 then you would use the else code. Else do nothing. Just leave it blank. Or change the hit state of the button.

Or like you said you could use the variable statement. This would work, but will be very difficult to do if you don't have a good understanding of action script. I have uploaded a sample variable file. Take a look at it. Hope this helped. Let me know if you need any more help. Thanks
Attached Files
File Type: zip Sample.zip (35.0 KB, 36 views)
Reply With Quote
Reply

Tags
script, frame, flash, condition, button

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
Image button triggers <form> action rcflyer2005 JavaScript Forum 1 Apr 18th, 2008 07:21
preserve the back button action when doing AJAX calls pesho318i JavaScript Forum 2 Nov 28th, 2007 12:37
how to change button action into a movieclip button action cjrollo Flash & Multimedia Forum 7 Nov 21st, 2007 17:07
BUTTON will not take an action script griffonwing Flash & Multimedia Forum 2 Jun 8th, 2007 12:33
agree the terms and condition script csun PHP Forum 10 Apr 18th, 2007 17:21


All times are GMT. The time now is 02:08.


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