HOME | DD

Flash-R-Us — Basic button coding.

Published: 2005-01-07 01:21:19 +0000 UTC; Views: 7064; Favourites: 46; Downloads: 1663
Redirect to original
Description Flash 'R' Us Tutorial

Basic Button Coding

Author:
Skill level: 2
Teaches:Creating buttons,Editing Actionscript,Button Events,Play/Stop buttons


Orginal Source of tut
[link]
(If you like this tut and want to fav it, pls fav at this link)
Related content
Comments: 23

Immortal-6 [2007-05-03 09:21:16 +0000 UTC]

er...how do I import my movie into the actual button...or what do i do so that when I click the button my movie will play...please help!

👍: 0 ⏩: 0

japanimator [2007-01-22 02:28:30 +0000 UTC]

Er...I tried following the tutorial, but everytime I tried saving my animation, this kept popping up:

"**Error** Scene=Scene 1, layer=fire, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {"

;_;
Would it be okay to ask for a suggestion as to what may be causing this problem?

👍: 0 ⏩: 1

Immortal-6 In reply to japanimator [2007-05-03 09:18:10 +0000 UTC]

OOH! that kept on happening to me to...until I copied the ENTIRE code, you may have missed some of the code...XD

👍: 0 ⏩: 1

japanimator In reply to Immortal-6 [2007-05-03 12:43:11 +0000 UTC]

Hmm...I'll try it again then...

👍: 0 ⏩: 0

Grusart [2006-11-26 21:38:41 +0000 UTC]

Oh, CRAP! I've made a button out of this tutorial, but it didn't work, so i clicked gotoandstop, and now i'm just LOST in flash! WAAA

-Nice tutorial.

👍: 0 ⏩: 0

little-teenager-sam [2006-08-12 14:01:35 +0000 UTC]

''i'm not sure for the ''variables'' bar, try all of the settings''

all of them work for me

👍: 0 ⏩: 1

little-teenager-sam In reply to little-teenager-sam [2006-08-12 14:18:26 +0000 UTC]

code i used on a button to lead to my site

on (release) {
getURL("[link] ", "_blank");
}

just change the site name and copy/paste it

BTW it wont work if you click it when still in Flash, you must click Control>Test Movie

it's my third message, i just allways forget something

👍: 0 ⏩: 1

frandemartino In reply to little-teenager-sam [2006-08-21 19:10:16 +0000 UTC]

this was really helpful, thank you! <3

👍: 0 ⏩: 1

little-teenager-sam In reply to frandemartino [2006-08-21 21:39:31 +0000 UTC]

you're welcome. *thinks about making some tutorials*

👍: 0 ⏩: 0

frandemartino [2006-08-02 18:29:50 +0000 UTC]

how about buttons that lead to an url when clicked? the code i use seems not to work.. -_-;

👍: 0 ⏩: 1

little-teenager-sam In reply to frandemartino [2006-08-12 13:58:35 +0000 UTC]

you just gotta set some more things, im using flash 8. make a button. make sure you do all of it's frames (up, over, down, hit). make em all the same if you want but i make every one slightly differnt (size, colour), but the ''hit'' frame. make it totally the same as ''up'' frame. go back to scene 1. open the library and drag the button you made on the stage. select it and go to its actions.

make sure youre not in expert mode/use script assist if you have the option. under browser/network double click getURL, if not in expert mode you should see 3 settings above the code now. in the ''URL'' bar type in the name/link/url to your website (for example: www.deviantart.com). next, in the ''window'' bar click the arrow on the right and select _blank. i'm not sure for the ''variables'' bar, try all of the settings

it should work now

👍: 0 ⏩: 0

TimetravelerJoe [2006-05-17 00:56:03 +0000 UTC]

This helped me a bunch, thank you so much!

👍: 0 ⏩: 0

Meatball-man [2005-01-07 13:05:56 +0000 UTC]

omg i love you guys

👍: 0 ⏩: 0

mr187 [2005-01-07 12:04:42 +0000 UTC]

o_o;; programming buttons scare the crap out of me. mine never work.

👍: 0 ⏩: 0

BenSpector [2005-01-07 02:33:40 +0000 UTC]

Excellent. Can you guys do one on loading screens next?

👍: 0 ⏩: 2

h3llbringer In reply to BenSpector [2005-01-08 18:48:32 +0000 UTC]

[link]

👍: 0 ⏩: 1

BenSpector In reply to h3llbringer [2005-01-08 18:54:37 +0000 UTC]

Cool. I'll check it out.

👍: 0 ⏩: 0

h3llbringer In reply to BenSpector [2005-01-07 02:35:45 +0000 UTC]

Ooouuu... I could probably do that.

👍: 0 ⏩: 1

skellyboy In reply to h3llbringer [2005-01-07 18:47:25 +0000 UTC]

yes plz! even I dont know how to make a proper preloader...

i just use NG preloaders!

👍: 0 ⏩: 1

h3llbringer In reply to skellyboy [2005-01-08 18:48:12 +0000 UTC]

[link]

👍: 0 ⏩: 1

yoshi22 In reply to h3llbringer [2006-07-06 09:48:24 +0000 UTC]

what version of flash is that? im in MX there's no expert mode in the actions window T.T

👍: 0 ⏩: 1

h3llbringer In reply to yoshi22 [2006-07-07 13:30:02 +0000 UTC]

I believe that MX is set to Expert mode by default...

👍: 0 ⏩: 1

yoshi22 In reply to h3llbringer [2006-07-07 14:25:03 +0000 UTC]

oh ok -.-

👍: 0 ⏩: 0