PDA

View Full Version : movies & buttons


texbala
07-13-2002, 09:45 PM
Hi,

I was creating a movie and gave 'onClipEvent' action for an animation for a button inside the movie.

Also, I want to give an action to the movie or button, so that when I click, it should go to the frame label (say, index).

Should I write the code for the button as:

=============
on (release) {
gotoAndPlay ("index");
}
=============
((it didn't work?))

or should I write the code for the movie? if so, how?

thnx,
bala

Abelius
07-13-2002, 10:01 PM
That shouldn't go on the onClipEvent action...

Usually it's used on a button, not a movie...

CyanBlue
07-13-2002, 10:16 PM
As Abelius said already, onClipEvent is the on for the movieclip and on is the one for the button...

I think the reason why your gotoAndPlay ("index"); was not working is maybe because frame label "index"does not exist within its timeline...
If you want your movie go to the main timeline, it will have to be _root.gotoAndPlay ("index"); and if it is within the movieclip, it will have to be _root.yourmovieclipname.gotoAndPlay ("index");

Good luck... :)

simail
07-13-2002, 10:21 PM
yep and if it still doesn't work you may be calling index from a different time line in which case the path could be:
_root.gotoAndPlay("index");

regards
simail

simail
07-13-2002, 10:22 PM
sorry CB beat me to it
simail

CyanBlue
07-14-2002, 06:04 PM
Yo, simail...

I didn't beat you... Please don't sue me... :p

simail
07-15-2002, 12:07 AM
he he he

and i thought this was a family site!!!!!

simail:D

texbala
07-15-2002, 12:58 AM
thnx to everyone...

The _root actually worked... but before playing there seems to be an error. ("Mouse events are permitted only for button instances")

I am attaching the .fla file....

thnx..
bala

CyanBlue
07-15-2002, 02:00 AM
("Mouse events are permitted only for button instances")Which means that you might have put the mouse event into the frame or movieclip event... (latter more likely...) Check it out...

Yo, simail... So... you are not going to sue me, right??? :)

Ricod
07-15-2002, 09:14 AM
I know ! Jason's trying some reverse psychology and is actually a financial masochist. He wants to be sued and receive parking tickets etc. I never would have figured ... well, if u want to be financially punished that bad :

------------------------------------------
AS.org bill 1st notice :
For changing this informative thread into a cage fight :
$ 250,- !! + *shame on u two ! This is a family site !*
------------------------------------------

:)

CyanBlue
07-15-2002, 01:25 PM
Oops...

How did you know that my wife majored in psychology in her elementary school??? :p

Okay... I'll take that bill and pass it smoothly to simail... :p

Ricod
07-15-2002, 01:47 PM
How I know ? WE KNOW ALL ! By spending time here, we check out your backgrounds and personal life ... leave your pc on logged on at AS.org ... then check next day ... to see your pm filled with pictures of stuff u did ... >:)

Don't pass it through to Simail ... he has his own bill and already paid ... so, cough it up CyanBlue ! ;)

simail
07-15-2002, 05:14 PM
hang on guys i've smell money here and i've been with my brief all day who smells money too. he's been onto his mates who smell money and up until a couple of minutes ago we had a writ in the fax line geting ready to wing its way to CB!
but i've just run this:
function howmuchayougota_CB(prop,mon,futs,)
and what did i get!!!!!!!!!!!!
null,null,null returns
well it was a good try but watcha you expecta witha programers
breath again CB.
simail:p ;)

CyanBlue
07-15-2002, 10:47 PM
Oops... nothing is private any more in this town, I guess...

How did you know I got zippo in my bank account???
Well... there is no bug in your function, function howmuchayougota_CB(prop,mon,futs,), brother... But I do have two puppies... Would you like take them instead??? :p

Have a nice day!!!

Ricod
07-16-2002, 09:26 AM
Are they Dalmations ? My wife wants one of those spotted coats ...

BTW ... when your bank account has 0, that means u can still lend money ! Muhahaha ! Then nobody will know your highschool emberassments ... but if u fail to deliver the puppies ... the phrase CyanBlue +highschool WILL be the most requested phrase combo on ALL the search engines :) !

simail
07-16-2002, 02:07 PM
may i remind you gentlemen that puppies are not legal tender, there's no puppies futures market and i've never been able to trade one in at the bank! you don't get change for oohs and aahs so CB's got to write lots more programs for his crust and i still can't sue:(
never mind it was a good idea anyway!
simail

___________

War does not determine who is right - only who is left
Bertrand Russell

CyanBlue
07-16-2002, 05:00 PM
Hahahaha... That's where the worng information comes... I didn't go to the highschool... I skipped... :p

Um... One of the dog is an American Cocker Spanier and the other one is a mix breed... no Dalmations here...

Hey, simail... let me know if there is any bank in the world who can take my puppies... :)