Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2013, 03:56:05 PM

Login with username, password and session length
Search:     Advanced search
The look of the forum is still being worked on. Thank you for your patience.
193705 Posts in 16235 Topics by 17054 Members
Latest Member: y6pptpvv7

* Home Help Login Register
AppleGeeks.com  |  Help / Advice  |  Flash  |  Topic: Flash 8 Actionscript Help 0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: Flash 8 Actionscript Help  (Read 6942 times)
Wockeh
Newbie
*
Posts: 9


« on: June 10, 2006, 09:32:37 PM »

http://www.orbitfiles.com/download/id147219388

My first button works alright and moves onto the first set of choices and so does the explosives option, but the other two buttons don't go to where they're supposed to.

I dunno what the problem is. :S
Logged
DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #1 on: June 16, 2006, 01:14:59 AM »

"File not found."

What's your script look like? Files, frames, layers and so on...
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Wockeh
Newbie
*
Posts: 9


« Reply #2 on: June 16, 2006, 08:42:05 PM »

Try this

Scene 1 (Everything works):

Play Button, background animation

Button actions:

on (press) {
     next scene
}

Scene 2 (Only one button goes somewhere):

Choice 1 (Button, highlights key when moused over):

on (press) {
     gotoAndPlay ("5", 1)
}

Choice 2 (Button, makes a spoon come down and scoop up some ground):

on (press) {
     gotoAndPlay ("4", 1)
}

Choice 3 (Button, makes lighted dynamite appear; Works):

on (press) {
     next scene
}

Choice 2 goes to the dynamite scene and choice 1 just doesn't work.
Logged
Netlatino
Sr. Member
****
Posts: 488


Can't Touch This...


WWW
« Reply #3 on: June 16, 2006, 09:24:32 PM »

still can't find the file...
Logged

DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #4 on: June 17, 2006, 06:45:39 AM »

"File not found."

Do you have hosting? You could post a .zip file on there or on GeoCities or the like.

Also, unless you ahve to you really shouldn't put your code for your buttons on the button itself. It's just a kinda bad practice since if you want to edit all the code you have to go from button to button. You can put it on a frame in the timeline very easily.

Once you start getting into the more advance source files and such you'll notice most people have an Actionscript layer in the timeline, usually the top one, with actions on keyframes as needed. The script to do that would look like this:

this.myButton.onRelease = function() {
      gotoAndPlay("scene1", 1);
};

Line 1: The "this." path refers to this clip you're in. Any time you do that it's saying, "the object is in this movie clip." if it's on the root timeline (bottom one) you can put "_root." instead. Then it's just the button instance name, the type of action (in this case an onRelease) and you turn it into a function.
Line 2: Whatever action and such you want the button to do.
Line 3: This closes the function.

This makes it easy for you to check your instance names and such and have one easy place to edit all of your script.

That, btw, is what I recommend you do for now, at least until you get us a source file. Go and double check all the instance names, symbol types and scene names. Though, you shouldn't use scenes for the web since it tends to add to the file size and, like you're now noticing, it can have problems. Most people drop scenes and just use nested movie clips instead. Something to think about.
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Wockeh
Newbie
*
Posts: 9


« Reply #5 on: June 28, 2006, 01:39:25 PM »

Blargh, I just tried that. Still didn't work.

Can I email you my flash?
Logged
DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #6 on: June 28, 2006, 03:03:37 PM »

Blargh, I just tried that. Still didn't work.

Can I email you my flash?

Go for it.
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1] Go Up Print 
AppleGeeks.com  |  Help / Advice  |  Flash  |  Topic: Flash 8 Actionscript Help
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.042 seconds with 20 queries.