Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Button With Three Actions On Fails One Of Them



button with three actions on fails one of them
__________________________________________________ _
on (rollOver) {
setProperty ("_root.carfurnbusmc", _alpha, "40");
}
on (rollOut) {
setProperty ("_root.carfurnbusmc", _alpha, "100");
}
on (release) {
tellTarget ("_root.infomovieclip") {
gotoAndPlay (101);
}
}

__________________________________________________ _
A button is assigned with code above ;
it happens sometimes the condition on release fails ; that means
with only one click it does not cause the gotoAndPlay condition but
the two setProperty conditions works perfectly ;
I think too many actions on a button is not healthy ;
Is there a way to improve the code to perform safely the same actions ??

MMKT
nov 11th 2002




<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="250" height="50">
<param name=movie value="http://sites.uol.com.br/vazzola/mmktxtdance.swf">
<param name=quality value=high>
<embed src="http://sites.uol.com.br/vazzola/mmktxtdance.swf"
quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="50">
</embed>
</object>



KirupaForum > Flash > Flash 8 (and earlier) > Flash 5
Posted on: 11-11-2002, 10:30 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Button Fails In Flash 8
I have created a booking form in Flash8.
The SUBMIT button has the following action script


on (release){

submitAttendees();

}


It calls a function "submitattendees" defined in an actionscript file booking.as which follows

The SUBMIT button fails to work however. Can anyone advise ?

My calendar doesn't work either but that's another story.

















Attach Code

var startDate : Date = new Date(2007, 6, 16);
var now_date:Date = new Date();
if (startDate < now_date) {
startDate = now_date;
}

var summaryArray:Array = [];
var dateArray: Array = [];
var allowAdd : Boolean = true;
var noSportMsg : String = "You haven't selected any sports or dates from the calenders! Please add at least one date for at least one sport and then try again.";
var noNameMsg : String = "You must enter all the details for the child before you can continue. Please add the information and try again."
this.allowAdd = true;
_global.attendeeCount = 0;

// define loaders
var bookingParamsR:LoadVars = new LoadVars();
var bookingParamsC:LoadVars = new LoadVars();
var bookingParamsF:LoadVars = new LoadVars();
var submitBooking:LoadVars = new LoadVars();
calCricket.onDateClick = function(mc,eobj,robj){
//trace(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getCricketersPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"));
trace("day state=" + eobj.state);
if(eobj.state=="booked"){
theInfo="This date has been booked for another sport!"
return;
}
if(eobj.state=="full"){
theInfo="This date is fully booked!";
return;
}
if(eobj.value=="selected"){

if(getDayCount()>_global.mMaxNumberOfDays){

eobj.value="default";
eobj.setDayValue(mc.date, "");
theInfo = "You have booked the maximum number of days per child.";
return;
}
disableDate("football", mc.date);
disableDate("rugby", mc.date);
}
else{
enableDate("football", mc.date);
enableDate("rugby", mc.date);
}
bookingParamsC.load(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getCricketersPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"), this);
}

//rugby calander

calRugby.onDateClick = function(mc,eobj,robj){
//trace(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getCricketersPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"));
trace("day state=" + eobj.state);
if(eobj.state=="booked"){
theInfo="This date has been booked for another sport!"
return;
}
if(eobj.state=="full"){
theInfo="This date is fully booked!";
return;
}
if(eobj.value=="selected"){

if(getDayCount()>_global.mMaxNumberOfDays){

eobj.value="default";
eobj.setDayValue(mc.date, "");
theInfo = "You have booked the maximum number of days per child.";
return;
}
disableDate("cricket", mc.date);
disableDate("football", mc.date);
}
else{
enableDate("cricket", mc.date);
enableDate("football", mc.date);
}
trace(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getRugbyPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"));
bookingParamsR.load(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getRugbyPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"), this);
}
// football caladner
calFootball.onDateClick = function(mc,eobj,robj){
//trace(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getCricketersPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"));
trace("football day state=" + eobj.state);
if(eobj.state=="booked"){
theInfo="This date has been booked for another sport!"
return;
}
if(eobj.state=="full"){
theInfo="This date is fully booked!";
return;
}
if(eobj.value=="selected"){

if(getDayCount()>_global.mMaxNumberOfDays){

eobj.value="default";
eobj.setDayValue(mc.date, "");
theInfo = "You have booked the maximum number of days per child.";
return;
}
disableDate("cricket", mc.date);
disableDate("rugby", mc.date);
}
else{
enableDate("cricket", mc.date);
enableDate("rugby", mc.date);
}
bookingParamsF.load(_global.mServerURL + "?sysFlashAction=getTotalPerDay,getFootballersPerDay&queryDates=" + this.formatDate(mc.date, "YYYY-mm-dd"), this);
}


bookingParamsC.onLoad = function(success:Boolean) {
if (success) {

if (this.refresh) {
//calCricket.setXML("CBookingDates.xml");
}
if(this.totals<_global.mChildrenPerDay+1){
// not over subscribed so date ok

}
else{
disableDate("all", this.selectedDate);
}
trace((this.countCricket<_global.mCricketersPerDay+1));
if (this.countCricket<_global.mCricketersPerDay+1){
// ok add to attendee.
_global.currentAttendee.sportDetail = addSportSummary();
_global.currentAttendee.sportData = addSportData();
if(_global.currentAttendee.sportData){
allowAdd = true;
}
}
else{
disableDate("cricket", this.selectedDate);
}
}
else {
trace("Error loading/parsing LoadVars.");
}
};

bookingParamsF.onLoad = function(success:Boolean) {
if (success) {

if (this.refresh) {
//calFootball.setXML("FBookingDates.xml");
}
if(this.totals<_global.mChildrenPerDay+1){
// not over subscribed so date ok

}
else{
disableDate("all", this.selectedDate);
}
trace((this.countFootball<_global.mFootballersPerDay+1));
if (this.countFootball<_global.mFootballersPerDay+1){
// ok add to attendee.
_global.currentAttendee.sportDetail = addSportSummary();
_global.currentAttendee.sportData = addSportData();
if(_global.currentAttendee.sportData){
allowAdd = true;
}
}
else{
disableDate("football", this.selectedDate);
}
}
else {
trace("Error loading/parsing LoadVars.");
}
};

bookingParamsR.onLoad = function(success:Boolean) {
if (success) {
trace("rugby loaded " + success);
if (this.refresh) {
//calRugby.setXML("RBookingDates.xml");
}
if(this.totals<_global.mChildrenPerDay+1){
// not over subscribed so date ok

}
else{
disableDate("all", this.selectedDate);
}
trace((this.countRugby<_global.mRugbyPersPerDay+1));
if (this.countRugby<_global.mRugbyPerDay+1){
// ok add to attendee.
_global.currentAttendee.sportDetail = addSportSummary();
_global.currentAttendee.sportData = addSportData();
if(_global.currentAttendee.sportData){
allowAdd = true;
}
}
else{
disableDate("rugby", this.selectedDate);
}
}
else {
trace("Error loading/parsing LoadVars.");
}
};

// init calanders

bookingParamsC.load(_global.mServerURL + "?sysFlashAction=loadxml&ctype=C", this);
bookingParamsF.load(_global.mServerURL + "?sysFlashAction=loadxml&ctype=F", this);
bookingParamsR.load(_global.mServerURL + "?sysFlashAction=loadxml&ctype=R", this);
// functions



function getNiceDate(theDate:Date):String {
return theDate.getDate() + "-" + getMonthAsString(theDate.getMonth()) + "-" + theDate.getFullYear();
}

function getMonthAsString(month:Number):String {
var monthNames_array:Array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
return monthNames_array[month];
}

disableDate = function(theType, theDate){
trace("disbableDate");
if(theType=="all"){
calCricket.setDayState(theDate, "booked");
calFootball.setDayState(theDate, "booked");
calRugby.setDayState(theDate, "booked");
}
if(theType=="cricket"){

trace(calCricket.setDayState(theDate, "booked"));

}
if(theType=="football"){

calFootball.setDayState(theDate, "booked");
}
if(theType=="rugby"){
calRugby.setDayState(theDate, "booked");
}
}
enableDate = function(theType, theDate){

var cricketEvents = calCricket.getEvent(theDate);
var rugbyEvents = calRugby.getEvent(theDate);
var footballEvents = calFootball.getEvent(theDate);
trace("football state=" + footballEvents.state);

if(theType=="all"){
calCricket.setDayState(theDate, "");
calFootball.setDayState(theDate, "");
calRugby.setDayState(theDate, "");
}
if(theType=="cricket"){
calCricket.setDayState(theDate, "");
}
if(theType=="football"){
calFootball.setDayState(theDate, "");
}
if(theType=="rugby"){
calRugby.setDayState(theDate, "");
}
}
addSportSummary = function(){
var s = "";

if (calCricket.getSelected().length>0){
s = "Cricket - " + calCricket.getSelected("dd/mm").join(", ") + "
";
}
if (calRugby.getSelected().length){
s = s + "Rugby - " + calRugby.getSelected("dd/mm").join(", ")+ "
";
}
if (calFootball.getSelected().length){
s = s + "Football - " + calFootball.getSelected("dd/mm").join(", ")+ "
";
}
return s;
}
getDayCount = function(){
trace("getDayCount");
trace(calCricket.getSelected().length + calRugby.getSelected().length + calFootball.getSelected().length);
return calCricket.getSelected().length + calRugby.getSelected().length + calFootball.getSelected().length;

}
addSportData = function(){
var s = "";

if (calCricket.getSelected().length>0){
s = "Cricket:" + calCricket.getSelected("YYYY-mm-dd").join(",") + ";" ;
}
if (calRugby.getSelected().length){
s = s + "Rugby:" + calRugby.getSelected("YYYY-mm-dd").join(",") + ";" ;
}
if (calFootball.getSelected().length){
s = s + "Football:" + calFootball.getSelected("YYYY-mm-dd").join(",") + ";" ;
}
return s;
}

addNewAttendee=function(){

// clear fields
//this.currentAttendee = eval("this.summaryPanel.attendee" + _global.attendeeCount );
//_global.attendeeCount++
//return
if(_global.attendee.length==_global.mMaxChildrenPerBooking){
theInfo = "You have reached the maximum number of children for this booking."
allowAdd = false;
btnAddChild._visible=false;
return;
}

tblAttendee_FirstName.text ="" ;
tblAttendee_Surname.text ="";
tblAttendee_Age.selectedIndex=0;
tblAttendee_Gender.selectedIndex=0;
calFootball.setXML("Fbookingdates.xml");
calCricket.setXML("Cbookingdates.xml");
calRugby.setXML("Rbookingdates.xml");

summary = this.summaryPanel.attachMovie("movAttendee", "summary" + _global.attendeeCount, this.summaryPanel.getNextHighestDepth(),{firstName:"", Surname:"", Age:"", Gender:"",editing:true,index:_global.attendeeCount})
summary.attendeeDetail = summary.firstName + " " + summary.Surname;
summary.click=function(){
trace(this);
this.editing=true;
this.borderColor=0xCC3333;
}
if(_global.attendeeCount ==0 ){
//summary.btnDelete._visible=false;
}
summary._x = this.summaryPanel._x;
summary._y = _global.attendee.length * summary._height ;
//summary.sportDetail = this.addSportSummary();
_global.attendee.push(summary);
trace("add new and now attendee is " + _global.attendee.length);
_global.currentAttendee=summary;

_global.attendeeCount++

allowAdd = true;
}
makeEditable=function(obj){
trace (obj);
}
setAttendeeDetail = function(){

return tblAttendee_FirstName.text + " " + tblAttendee_Surname.text;

}
reposSummary = function(){
trace("respositioning");
for(var i=0;i<_global.attendee.length;i++){
trace("move " + _global.attendee[i] + " to " + (i * _global.attendee[i]._height) );
_global.attendee[i]._y = i * _global.attendee[i]._height ;
}
}
isComplete = function(){
for(i=0;i<_global.attendee.length;i++){
trace(i + "firstname=" + _global.attendee[i].Age);
if((_global.attendee[i].firstName!="") && (_global.attendee[i].Surname!="") && (_global.attendee[i].Age!="") && (_global.attendee[i].Gender!="") && (_global.attendee[i].sportData) ){

}
else{
trace(i + " is not complete");
return false;
}
}
return true;
}
getBookingData = function(){
var s = '';
for(i=0;i<_global.attendee.length;i++){
if(_global.attendee[i].sportData){
s = s + "FirstName:" + _global.attendee[i].firstName + ";Surname:" + _global.attendee[i].Surname + ";Age:" + _global.attendee[i].Age + ";Gender:" + _global.attendee[i].Gender + ";" + _global.attendee[i].sportData + "|";
}
}
return s;
}
submitAttendees = function(){
if(chkTOC.selected){
if (isComplete()){
/// submit dates
trace(getBookingData() );
submitBooking.load(_global.mServerURL + "?sysFlashAction=commitbookings&sysID=" + _global.parentId + "&thedata=" + getBookingData(), this);
}
else{
theInfo = "Please make sure all the attendee details are correct."
}
}
else{
theInfo = "Please aggree to the Terms and Conditions by ticking the box."
chkTOC.setFocus();
}

}

submitBooking.onLoad = function(success:Boolean) {
if (success) {
trace("rstatus " + this.rstatus);
if(this.rstatus && this.cstatus && this.fstatus){
_parent.gotoAndPlay("book_stage4");
theInfo = "Order Complete Booking Ref = BSC" + _global.parentId
}
}
else {
trace("Error loading/parsing LoadVars.");
}
};

























Edited: 06/25/2007 at 06:50:23 AM by GOBIMONEY

Button Fails In Test Mode
My buttons are simple rollovers. They seem to work fine on the stage and the "goTo" actions also work on the stage when the buttons are enabled, however when the movie is tested the buttons are not recognized by the cursor nor do they execute their goTo actions?
I know it must be something simple and I'm going nuts trying to find it.
Could it be there is no "hit" area recognized since they are text only? but they are outlined(boxed) in blue on the stage and rollover fine?

This is the Output window in Test Mode:

Level #0: Frame=50
Button: Target="_level0.goto45"
Shape:
Movie Clip: Frame=14 Target="_level0.instance18"
Text: Value = "<"
Text: Value = "<"
Button: Target="_level0.goto58"
Movie Clip: Frame=0 Target="_level0.goto58.instance19"
Text: Value = "A"
Text:
Button: Target="_level0.goto64"
Movie Clip: Frame=0 Target="_level0.goto64.instance20"
Text: Value = "P"
Text:
Button: Target="_level0.goto70"
Movie Clip: Frame=0 Target="_level0.goto70.instance21"
Text: Value = "A"
Text:


Thanks for any ideas.

Button Fails To Trigger The Get URL Action
hi,

i have done a horizontal menu. thoug hter other links trigger the get url action the link that has the submenu wont trigge rthe action...

can some one help me why is it so?

i have attached the file

thanks
Arie

GetURL Fails On Runtime Library Button
After years of estrangement, I'm embracing Flash once again. I have a little project I'm working on, but have faltered right out of the gate...

I created a shared library with a single, relatively simple button with a clip in the over frame. For the button symbol, in Linkage I chose:
Export for runtime sharing
Export in first frame
URL: shared_lib.swf

I published the library, then closed the .fla. I created a new test.fla and chose "Open External Library" and surfed to the shared_lib.swf.

The shared library opened as it should, with my simple button available. I dragged the button to the stage of the new test.fla, then checked its properties. Sure enough, "import for runtime sharing" was selected. I tested the movie, and the button (and its rollover clip) worked perfectly.

Here's where it fails. I assigned an action to the button
on (release) {
getURL("

[F8] Rewriting Button Actions To This.on Actions
Evening! I could do with a little help if possible - basically I need to combine a number of different button commands into script for a movieclip button.

I want these actions

PHP Code:




on (rollOver) {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}on (rollOver) {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }}on (rollOut) {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }}on (release) {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }}on (release) {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }}on (release) {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }}on (release) {    unloadMovieNum(1);}on (release) {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }}







to work like this in a movieclip:

PHP Code:




this.onRollover = function() {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}this.onRollover = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }this.onRollout = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }this.onRelease = function() {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }this.onRelease = function() {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }this.onRelease = function() {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }this.onRelease = function() {    unloadMovieNum(1);}this.onRelease = function() {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }







but it doesn't work!!! period! am I supposed to be keeping all of the functions together after I call the action? ie; all of the onrelease functions run on after a single this.onrelease call?
or have I took the wrong approach altogether on this?

Any pointers welcome!

Button Fails To Function Yet I Recieve No Error Messages... Wtf?
So I made a puzzle game and everything works completely all the way down until you get to the simple button that is supposed to start the movie back off at frame 1. It rolls over, it clicks, the actionscript is correct, it's in the right place but when you run the game and try to click the final button to play again, nothing happens. I'm guessing it has something to do with removing a child or something. At any rate it's silly for sure. I have thought about writing code that would just reboot the whole animation on the mouse click but I wouldn't know how to do that.

The eventlistener for the play again button is on my DragGame.as class at the bottom and I commented it. If you could help me out that would be amazing! All of the files are loaded in this zip that's on my own personal server space. Thanks.

http://basementsunrise.com/it/port/PuzzleGame.zip

Button On Top Of A Button... Still Retain The Base Button Actions?
Hi there.... is it possible to still use the rollover / rollout buttons when a underneath another button??

I have been trying to have a slide in menu that basically slides away on rollout, but of course when you have buttons on this slide in menu, this triggers the rollout on the underlying movie or button and makes the menu dissapear.

Is there someway to avoid this or should I be using a different approach? Maybe a hit test on the mouse cursor perhaps?

Appreciate any help in advance,

Scott

Duplicating A Button And Making Each Button Have Different Actions
I have a movie where I have duplicated the button with a script to duplicate the button and when i put any code on the button that is getting duplicated all the code is all the same on the buttons. I tried the code below but it not working its making all the buttons act the same.

*The examples below and code is simpified of what I have, I hope it help you understand what I'm trying to do.

button1
duplicated button2
duplicated button3

*I want to target a different MC for each one of the
buttons above but I can't seem to do it?

*I tried using something like this but its not working

//----------code for my arrays
buttons=new Array("news","contact","products")


//----------code on the duplicated button
//on button1
on(release){
_root.movieclip1.gotoAndPlay(2)(buttons[0])
}

//on button2
on(release){
_root.movieclip2.gotoAndPlay(2)(buttons[1])
}

//on button3
on(release){
_root.movieclip3.gotoAndPlay(2)(buttons[2])
}

Button No Actions + Make Button Invisible
Hi all!
So right now I'm working on this website and realized I've been running into some button problems.

First one, why is it that every time I right click on the 'Actions' of the button it either just gives me the action of the current frame I'm in or it says the current selection cannot have any actions?

Secondly, I'm trying to work on a button so that when it is rollover, everything on the flash document is replaced. The problem I'm having is that some layers are on top of the rollover button in the main timeframe and so when the cursor is on the button, some layers are not replaced. How do I fix it so that when the button is rollovered the layers on top of it cannot be seen?

More specifically:
Main Timeframe -> 'Y' Button -> on it's Rollover it has a movie clip -> in the movie clip there is a modified 'X' button that is suppose to overlap the existing 'X' button in the main timeframe

How do I do it? I would really appreciate any help!!!

Thanks!

(PS I am currently using CS3 Professional if that matters)

Button Actions
is there anyway to remove the actions from a button without making a new keyframe with no actions

Button Actions
is there anyway to remove the actions from a button without making a new keyframe with no actions

Button Actions
Hey,

I'll try and explain this as well as i can!

K, i have a button and when it is clicked i want it to play an MC but when it is clicked again i want it to play a different MC, is this do-able?

L8

Button Actions
Hi guys,

What am I doing wrong? I select a button instance on the stage, open the actions window, select "Basic Actions" (or any other) and the actions are all grayed out. I've tried it from several different ways, but I can't seem to get past this.

Can anyone help?

Thanks,

Rose

Button Actions?
Hey !!!
describtion of my problem : OK (Scene1)Insert-> New Symbol -> MovieClip(Name:test1): Make two timelines, in the first any Tweening and in the second a Button (Name:test2)!
back to the Scene1 -> open the library and drag the MovieClip(test1) in the first Frame (FrameAction [Stop])!
Ok right make Scene2 and in the first Frame (FrameAction [Stop]) a simple Button (Name:test3) with the action [on(press)gotoandstop ("Scene1",1)]!!!
My Button test2 in the Scene1 must be change to the Scene2 !! (test2Action ????????????????????????????)

One Button - Two Actions
Hi,
I am new to actionscript-
I have made a linear animation with back/stop/play buttons -when the movie is stopped I would like the play button to go to the next frame and play but if the movie is already playing the play button should go to the next scene and play.
Is this possible?
Thanks in advance for any help with this one!

Tania

Two Actions Button
i vanna ask you how to go "fullscreen" and "fullscreen-off" with one button. so i need button with two actions. first - fullscreen/on, and second - fullscreen/off, but if it is possible that button be visible in fullscreen mode.

Button Actions
Okay, I have a Map of the city I live in. There are 188 listings, all of which I've turned into 188 movie instances. within each instance is button. Now, the listings are divided into four categories: restaurants, bar/venue, services, and shops. the naming convention I've used for each button based on the section it is in, i.e. restbutton1, restbutton2, service1, service2, you get the picture.

When you rollover each button, as it stands right now, on each button I have a roll over action to set alpha to zero, insert dynamic text into a label box on the main template, as well as set the alpha of an arrow pointing to this description to 100.

On rollout, it resets those settings. alpha to button = 100, the arrow goes back to zero, and the dynamic text box goes blank.

Here is the link if you're wondering what the heck i'm talking about. http://www.uga.edu/island

Here's the question: Is there a way to set a standard function of

on (rollOver){
this._alpha=o
downarrow._alpha=100
}

and do the corresponding function for roll out, but set this action up only in the first frame of the movie. instead of changing the actions of each instance 188 times.

2 Actions On 1 Button
Hi all-
can some one tell me if its possible to have two of the same mouse events on one button. Such as "on click play" then "on click stop"

Thanks

Button Actions
Is it possible to assign more than one action to a button so they are carried out one after the other. Eg Click on a button, it plays a certain frame until the end of the timeline, then when it gets to the end, it loads another movie.

Help With Button Actions
Hello,

I have asked for help many times on this subject, but still haven't gotten it to work. I have a flash navagation bar for my site. What I want to know how to do is, how to make it so when the mouse scrolls over the button, It will jump to a different scene and play it. So that I can make appearing buttons when the button is scrolled over.



I would appreciate the help.

Button Actions In MC's -
hi, i had a problem loading a swish swf into a flash movie so i canned that idea . i made a button in a movie clip so it would jazz up the button a bit .. i have a rollOver & rollOut action on the button in the movie clip . i placed this button (actually 4 of them ) on the main timeleine but when i roll over them they go back to a frame in the main timeline and not the frame i want IN the clip ????? does this make sense ?? hope someone can offer a bit of hope this way !!
cheers

BUTTON ACTIONS IN A MC
gday, i think i should have posted this in the newbies section ::

http://board.flashkit.com/board/show...hreadid=309975

can someone talk a look perhaps
cheers

Button Actions
I have a nav bar set up in my movie. The nav bar is a movie symbol that contains 5 buttons. I am trying to link the buttons to frames in the main movie. I edited the nav bar movie and added an action to each button. The code looks like this:

on (release) {
gotoAndStop ("Scene 1", 120);
}

I also tried:

on (release){
_level0.gotoAndPlay ("Scene 1", 120);
}


I published the movie to test it out. When I press the buttons nothing happens.

On/off Button With Actions
I'd like to create an on/off button with actions within it.

I have no problem creating an on off button that after you click on it turns to off and on after you click off (dunno if that makes sense), but I would like to add actions to that that when they click it on, it makes another movie invisible and when you click it again it will make the movie visible again.

I have the code to make it visible/invisible fine, I have a on/off button but when I add the visibility code into it it won't work, any advise?

One Button, Two Actions...
I have a button (A) that when pressed, plays one clip displaying something. There are other buttons that when pressed will change what is displayed by (A)... Now, if (A) is currently displaying something and (A) is pressed again, it should play a different clip.

I've tried creating flags with different if cases, but either way, I run into a loop that plays both the first and second clip. I also tried putting the button on another frame and doing a goto if the criteria is satisfied... but no luck.

In short, how would one assign 2 different button mouseEvent behaviours to the same button?

Button Actions
i created the button, but now i want to make it have an action like making it go to frame 20 or something. how do i do it? please help




-n00b-

Actions For A Button
I just started using MX and have difficulty figuring out how to attach an action to a button. I had no problem with 5, it was easy.

I want to go to a specific frame(ie.90) on release.
I use the onRelease(button)and get

<not set yet>.onRelease = function() {
};

Not sure what to do with the <not set yet> object.???##

With Flash 5 I would then get the "goto frame" action, type in frame 90 and it's done.

Could anyone help please?

2 Actions On A Button
I have a button that should perform 2 actions.
The first action is to start a movie clip (small animation) and then (when the movie clip is over) go to a frame on my main timeline.

The first works perfectly, when I try to include the second code, the movie clip doesn't play anymore !

That should be a simple thread but I'm losing my hair to do it !

Could somebody help me, PLEEEEEEAAAAAAASSSSSSEEEE !

Thanks so much

2 Actions For 1 Button
this is my situation:
i have a time line say...20 frames
on frame 10 i have a stop function with a few buttons which link to different scenes.

how do you script each button to play the rest of the timeline (i.e to frame 20) then when it reaches frame 20 goto the specified scene.

thanks

Button Actions
I have a problem with the buttons being used to animate an graphic symbol in a motion tween. The top button plays the clip so that the graphic symbol moves up, when the cursor rolls over the button. Then when the graphic symbol is to be moved back down the button on the bottom is pressed and the graphic moves appropriately. However, when I need to scroll the graphic back up the button on the top seems to be corrupt or doesn't work in the same manner as before.

Please help,
Jean

Button Actions...HELP
I'm getting a error message:

"Mouse events are permitted only for Button instances"


The problem is, they ARE button instances. Help!

The test file is at: (it's also attached)

http://www.qwurk.com/Equalizer_Test 2

Feel free to email me directly at:

metzdesign@aol.com

Thanks!!!!!

Button Actions - HELP
Should be an easy one for many.

When a user clicks a button a movie clip called main_mc is played.
However what i want is for the movie main_mc to play on release of the button and then the user to be diverted to a labelled frame within my main scene.

the first part of my code would be -


Code:
on (release) {
gotoAndPlay("main");
}
but how do i then get it to move to a labelled frame?

Button Actions
Is there a way to make a button play until the end of a scene, then go to another scene without assigning a Go To action to the final frame of the scene?

Thanks for your help.

2 Actions -- 1 Button
Can one OnRelease command trigger 2 different things to happen?
ie. Load movie and load external swf?

Two Actions On One Button?
Action newbie here... What am I doing wrong? I want an "on rollOver"-"goto a frame#" action and a "on press"-"get URL" action on the same button.

Click-picking actions here's what I get:

on (rollOver) {gotoAndPlay(35);

}on (press) {getURL(http://www.nameofsite.com);

}

But the check syntax gives me this error:

Scene=Scene 1, Layer=button 1, Frame=1: Line 3: ')' or ',' expected
}on (press) {getURL(http://www.nameofsite.com);

Thx in advance
Doug

Button Actions
i am having a bit of a brain fart -- to go to a certain frame within a seperate swf file from a button action (on the root) it is as simple as

on release{
getURL("name.swf", 1);
gotoandPlay("home");
}

or should i use some other actionscript?

Button Actions
does anyone know of a tutorial or how to make a selector of this type?

http://www.bmwusa.com/

Go to Virtual center and choose a model.

Thanks for any help

Tim

Button Actions
Hi all... I'm new to this board and quite a newbie when it comes to Flash to or at least actionscripting. However I'm trying to follow the tutorial "How to build the peg puzzle game" and I have one problem. It says to make a button and put that in a movie clip... no problem so far. Then it says to go to the edit stage of the button and assign actions to it. BUT that is impossible for me because all the actions in the actionspanel are grey and "unpressable". What is the problem? hope for help cos' this schoolassignment should've been handed in yesterday
Here is the .fla if that helps

Button Actions...
I have a button in a movie clip.
The movie clip is in Scene 1.
What actions should I add so that when it is clicked, it will go to and play <frame label
umber> in <scene>???

i know to play it in the current scene i should use:
on (release) {
_root.play();
}



but what if i want to go to another frame number in another scene? what actions whould i use?
thanks in advance.

Button Actions
Hey everyone, i know all the basics of FLASH MX and i was wondering.. i did all the action for "over" the button and everything like that but i am not sure how to assign an action. i want to make a new animation take place when i click it for my website? could anyone help? thanks alot!

Button Actions
i have

on (rollOver) {
_root.moviebg2.gotoAndPlay(2);
}
on (rollOut) {
_root.moviebg2.gotoAndPlay(1);
}

applied to my MC.

how do i make the button say "on release send the user to scene2, frame 1 in the main swf" instead of taking the user to just frame 1 of the MC that i am working on

-doug

Button Actions
hi,
i was wondering if there is a button action that makes it so that when the button is held down something happens, i know there is an action called on press but it only works the moment the button is pressed rather then continue as the button is held, btw im using flash mx

Button Actions
I have this script in my button action window and it doesn't work:


on (release) {gotoAndPlay("2,1");

The button, when ckicked should jump to scene 2, frame 1.
is it right? why won't it work?

DD

I am using MX

Button Actions
I've created a little animated button but I don't want the animation to stop when you move the mouse away from the button I want the animation to play out to the end.Can someone tell me how to achieve this?

Button Actions Help...
Im sorry for posting this question but i havnt been able to find a tutorial or help otherwise on my specific question...

I would really like to create a button when the mouse goes ofer it that it duplicates itslef and the duplicate spreads out form the original position fading out... i kow how to use actions and alpha for this but i do not know how to make a button execute this action...

any help would be much appreciated...

thanks in advance
l3inaryl3urnout

Button Actions
Okie Dokie... I'm a total flash newbie so bear with me if I do not know what I am talking about....

I have a menu made with of course, different buttons. When I place the mouse over the button, there is an animation, a sound and the process is complete.

When I go to the end of the script, add the
on (release) {
getURL("index.html");
}
the link works but the animation does not execute. I'm thinking this is an icredibly simple fix but I'm missing it...

Thanks much

Button Actions
HI in making a site, i want to"fade out and in clips whenever I click a button to go some where else on the site. Right now I can make the sections fade in, however i dont know how to make them fade out when a button is pressed, is there some script i can ad to the button's action to accomplish this? If you know what im talking about or have any suggestions please respond. Thanks

1 Button, 2 Actions
If I have 1 button and an on release action which loads 2 different swfs into 2 different movie clips do I put 2 onreleases in the script, or something different?

Button Actions For MX Pro
can anyone tell me which button action does what? there's just so many button actions and it gets confusing.

Copyright © 2005-08 www.BigResource.com, All rights reserved