PDA

View Full Version : Problem with Flash...



TiJay
01-04-2006, 05:50 AM
Does anyone here know much about coding flash and ActionScript 2.0? I'm trying to create a webpage using flash, and everything worked, until I started making it idiot proof (the difference between 30 lines of code and 300 lines of code) If anyone here has any idea of flash, this is the code I have set up for button 1 (named ball1)...

_root.timeline_mc.ball1.onRollOver = function() {
if (timeline_mc.move_var == 0) {
if (timeline_mc.ball1_var == 1) {
timeline_mc.gotoAndPlay("_1over1");
}
if (timeline_mc.ball2_var == 1) {
timeline_mc.gotoAndPlay("_2over1");
}
if (timeline_mc.ball3_var == 1) {
timeline_mc.gotoAndPlay("_3over1");
}
if (timeline_mc.ball4_var == 1) {
timeline_mc.gotoAndPlay("_4over1");
}
if (timeline_mc.ball5_var == 1) {
timeline_mc.gotoAndPlay("_5over1");
}
if (timeline_mc.ball6_var == 1) {
timeline_mc.gotoAndPlay("_6over1");
}
if (timeline_mc.ball1_var == 0 &&
timeline_mc.ball2_var == 0 &&
timeline_mc.ball3_var == 0 &&
timeline_mc.ball4_var == 0 &&
timeline_mc.ball5_var == 0 &&
timeline_mc.ball6_var == 0) {
timeline_mc.gotoAndPlay("_over1");
}
}
};
_root.timeline_mc.ball1.onRollOut = function() {
if (timeline_mc.move_var == 0) {
if (timeline_mc.ball1_var == 1) {
timeline_mc.gotoAndPlay("_1out1");
}
if (timeline_mc.ball2_var == 1) {
timeline_mc.gotoAndPlay("_2out1");
}
if (timeline_mc.ball3_var == 1) {
timeline_mc.gotoAndPlay("_3out1");
}
if (timeline_mc.ball4_var == 1) {
timeline_mc.gotoAndPlay("_4out1");
}
if (timeline_mc.ball5_var == 1) {
timeline_mc.gotoAndPlay("_5out1");
}
if (timeline_mc.ball6_var == 1) {
timeline_mc.gotoAndPlay("_6out1");
}
if (timeline_mc.ball1_var == 0 &&
timeline_mc.ball2_var == 0 &&
timeline_mc.ball3_var == 0 &&
timeline_mc.ball4_var == 0 &&
timeline_mc.ball5_var == 0 &&
timeline_mc.ball6_var == 0) {
timeline_mc.gotoAndPlay("_out1");
}
}
};
_root.timeline_mc.ball1.onRelease = function() {
if (timeline_mc.move_var == 0) {
if (timeline_mc.ball1_var == 1) {
timeline_mc.gotoAndStop("_big1");
}
if (timeline_mc.ball2_var == 1) {
timeline_mc.gotoAndPlay("_2re1");
}
if (timeline_mc.ball3_var == 1) {
timeline_mc.gotoAndPlay("_3re1");
}
if (timeline_mc.ball4_var == 1) {
timeline_mc.gotoAndPlay("_4re1");
}
if (timeline_mc.ball5_var == 1) {
timeline_mc.gotoAndPlay("_5re1");
}
if (timeline_mc.ball6_var == 1) {
timeline_mc.gotoAndPlay("_6re1");
}
if (timeline_mc.ball1_var == 0 &&
timeline_mc.ball2_var == 0 &&
timeline_mc.ball3_var == 0 &&
timeline_mc.ball4_var == 0 &&
timeline_mc.ball5_var == 0 &&
timeline_mc.ball6_var == 0) {
timeline_mc.gotoAndPlay("_release1");
}
}
};



now, button's 1-6 are all the same code, I've read over the script time and time again, checked all the labels, and checked the target paths...if anyone can see a problem I have overlooked here, PLEASE let me know...

For my first question on this forum in a long time, I gotta make it a fun one o.0

TiJay
01-04-2006, 07:36 AM
I guess I'm alone on this :P

Jen
01-04-2006, 08:37 AM
Coding with flash is a specialised area. Posting at 4.50am local time (NZ) and then expecting an answer within two hours is pushing it a little :rolleyes:. If you don't get a bite within 24 hours, then bump your thread as someone with this experience may of missed it first time. :)

TiJay
01-04-2006, 08:41 AM
kk :P I've just been stuck on this problem for a while...getting kinda anxious to find a fix :P

FoxyMX
01-04-2006, 08:42 AM
I guess I'm alone on this :P
At this time on Saturday morning, yes, most definitely. It's only 7:40am here right now. :lol:

TiJay
01-04-2006, 08:43 AM
Whoa...yea, that hole 'Ocean' thing really screws me up with my times...it's 3PM Friday, here...lol

stu161204
01-04-2006, 01:16 PM
Whoa...yea, that hole 'Ocean' thing really screws me up with my times...it's 3PM Friday, here...lol

LOL :D

** bump **

TiJay
04-04-2006, 04:22 AM
Bump..at what, 3:30AM Y'alls time...maybe i'll get lucky and someone who knows flash would have a years supply of Jolt Cola (that would last a week) and see this...

Greg
04-04-2006, 05:47 AM
The universal problem with Flash is... that people use it :p

TiJay
04-04-2006, 08:27 AM
The universal problem with Flash is... that people use it :p

Now for my problem...:P

Hashbrown
04-04-2006, 08:46 AM
I'd recommend reposting this on the actionscript.org forums. If you don't get an answer there try flashkit or webwasp.com.

TiJay
04-04-2006, 09:46 AM
I'd recommend reposting this on the actionscript.org forums. If you don't get an answer there try flashkit or webwasp.com.

Thank you, I'll do that

Greg
04-04-2006, 09:58 AM
Good luck, and let us know how ya get on.

TiJay
06-04-2006, 02:59 AM
Actionscript.org forums were so unbelievably helpful...I owe you my life...or something like that...

with their help, I went from 3000+ frames, and 600+ lines of code not working without another 100-200 lines of code - to 1 frame, and 60 lines of code doing more...whats more, is they taught me how to use this nifty new coding...thanks for the reference, greg

:beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer:

10 out of 10 beers

Laura
06-04-2006, 03:30 AM
Thanks TiJay.

As I'm the only member on the forum at present (2.30am here), I just drank your beer.

Sorry, Greg. You missed out...

P.S. I did offer some to the Googlebots, but they said they never touch it when they're working.

TiJay
06-04-2006, 06:44 AM
Thanks TiJay.

As I'm the only member on the forum at present (2.30am here), I just drank your beer.

Sorry, Greg. You missed out...

P.S. I did offer some to the Googlebots, but they said they never touch it when they're working.

lol cheers