Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A thread 3

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 2 of 16«<12345>»
Forum Login
Message << Older Topic   Newer Topic >>
3/9/2007 23:17:41   
EragonZZZZ
Member

Also, quick question, is the code in the MC or the timeline. I'm not certain which.
AQ  Post #: 26
3/10/2007 2:03:03   
lil boi blue
Member

its on the MC, and it worked, thanks a lot both of you. yea i needed to add the 'this' into the 'gotoAndStop' part
AQ DF  Post #: 27
3/11/2007 16:29:18   
dominic_r_monroe
Member

i would like to learn but i haven't the program to much maybe in the fututre i'll get it cheap on ebay

_____________________________

AQ  Post #: 28
3/12/2007 1:10:59   
Grie Velorn
Member

Yes i was wondering if there was some action script that adds points and depending on the # of points they have it plays a new frame

_____________________________

AQ DF  Post #: 29
3/12/2007 15:12:42   
EragonZZZZ
Member

if (point condition...ie, what makes points earned)
{
playerPoints += 5
}

if (playerPoints >= 100)
{
gotoAndPlay(_root.currentframe + 1)
}

Or gotoAndStop. Depending on what you wish to happen
AQ  Post #: 30
3/12/2007 18:35:42   
flsg
Member

well, if you have to check the points for more than once(for example, at 50 points, 200 points, 300, 500,...), I suggest you to put them in an array:

var checkValues:Array = [[50, 4], [100, "myFrameName"], [200, 29], [300, 33], [500, "win"]];
//define the array that will store the informations. The first value in the second array is the points that you need to check, the second value is the frame to play, it could be a number, a string, or a variable
var myPoints:Number = 0;
//define your points variable
myPoints += 148;
for (var i:Number = 0; i<checkValues.length; i++) {
	if (myPoints>checkValues[i][0] && myPoints<checkValues[i+1][0]) {
		_root.mcThatYouWantToPlay.gotoAndStop(checkValues[i][1]);
	}
}

here you go, something easy to maintain if you don't understand, tell me

< Message edited by flsg -- 3/12/2007 18:40:17 >
AQ  Post #: 31
3/12/2007 18:44:44   
Grie Velorn
Member

wow thanks i am wondering i have a game that im making heres a demo: Demo1.0 mabey can you show me how i would implement that?


< Message edited by Grie Velorn -- 3/12/2007 18:46:27 >
AQ DF  Post #: 32
3/12/2007 18:52:25   
EragonZZZZ
Member

yeah, flsg's method is mucho better cause I'm tired and busy right now.

Flsg's actionscript level is preetty much on par with if not above mine, so listen up.
AQ  Post #: 33
3/12/2007 18:52:57   
flsg
Member

just put my code on the first frame and replace names that you should replace
AQ  Post #: 34
3/12/2007 18:55:37   
Grie Velorn
Member

so when you kill one it should add 1 0r what ever points to the variable so.. how would i do that, add them i mean, i really no nothing about action script
AQ DF  Post #: 35
3/12/2007 19:02:39   
flsg
Member

var checkValues:Array = [[50, 4], [100, "myFrameName"], [200, 29], [300, 33], [500, "win"]];
//define the array that will store the informations. The first value in the second array is the points that you need to check, the second value is the frame to play, it could be a number, a string, or a variable
var myPoints:Number = 0;
//define your points variable
function addPoints(points:Number):Void{
myPoints+=points
for (var i:Number = 0; i<checkValues.length; i++) {
	if (myPoints>checkValues[i][0] && myPoints<checkValues[i+1][0]) {
		_root.mcThatYouWantToPlay.gotoAndStop(checkValues[i][1]);
	}
}
}

here, if you want to add points, use addPoints(pointsYouWant2Add), and the function does the rest for you
AQ  Post #: 36
3/12/2007 19:05:26   
Grie Velorn
Member

thank you so much i wont be able to try this now but ill be sure to add you the the credits
Edit is there a place that i an easyly learn action script?

< Message edited by Grie Velorn -- 3/12/2007 20:10:57 >
AQ DF  Post #: 37
3/12/2007 20:30:44   
EragonZZZZ
Member

Okay, there are a few options in this situation. Whichever one you pick depends on your desire and learning style:

1. You can buy one of the numerous flash teaching books to learn actionscript. I recommend
Beginning AS 2.0
Flash 8 AS Bible
OOP for AS 2.0

I would advise buying them according to skill level...the OOP one is very advanced and covers stuff that I'm using in my things.
Also, you could look up some AS 3.0 books (just thought I'd save flsg the trouble of saying that lol)

2. You can look online for tutorials or get a teacher here on the forums.
FlashKit.com, gotoAndPlay.it, and numerous other sites have great tutorials on anything you could want. The problem is, sometimes they don't teach you so much as feed you code...so watch what you read and make sure you know what code you input does. Otherwise, you're gonna have a hell of a time debugging.

Tutorials for AS on this forum are rare, though. Scripters are in a much lower demand than artists.

3. My favorite, and the way I learn every program.
Read the included help documentation. Just the first introduction. Read a bit about the scripting window and what you can do with it. Look at some examples. When you are ready, DIVE RIGHT IN! Code like crazy! Try to do random things! If you look on my computer, I have about 40+ .fla and .swf files that are just circles and rectangles and lines doing things that can be implemented in games; Multiple shots, side scrolling, jumping, walking, tileset generators....tons of mini-engines (and some not-so-mini ones, too).

Flash's debug can be tricky at first. So when you have a problem with a piece of code, just look it up in the help docs. Normally each function has a full page devoted to it. Read up on it, check the syntax. Look at the examples. Repeat.

Soon enough, you'll come to realize that you don't need to look at the help docs as often, and will become a semi-fluent (trust me, thats good) actionscripter. Now, to become what I
call a fluent actionscripter, you're gonna dedicate around 9 months of continuous scripting and crazy stuff like that...thats how long it took me....

Whoops. Never mind. I'd been programming for 5 years previously, so it might be a BIT harder for you.

________________________________


Good luck with scripting!
Feel free to PM me for help and stuff!

-Eragon


PS- Your art rocks.

AQ  Post #: 38
3/12/2007 20:35:46   
Grie Velorn
Member

lol thanks i didn't realize it would be so hard(and cost so much money lol) well thanks for the help ill look some of this stuff up but i may not be very good with it or even figure out what to do
PS-Thanks
AQ DF  Post #: 39
3/12/2007 20:50:14   
lil boi blue
Member

i love the bibles of programs, they are like twice the size of a regular bible and can actually be understood lol.
AQ DF  Post #: 40
3/12/2007 21:23:31   
flsg
Member

yeah...that last book...OOP AS 2.0...I have it
by colin moock
he's one of the best flasher I've ever known. Try his another book:
http://www.amazon.com/ActionScript-Flash-MX-Definitive-Second/dp/059600396X/ref=pd_sim_b_2/002-8706535-4206433?ie=UTF8&qid=1173744979&sr=1-3
this is definitively the best flash AS book that you can find(I also have it lol)


quote:

ORIGINAL: Grie Velorn

lol thanks i didn't realize it would be so hard(and cost so much money lol) well thanks for the help ill look some of this stuff up but i may not be very good with it or even figure out what to do
PS-Thanks

lol, I don't think it costs a lot. The professional registered version of Flash 8.0 is way more expensive. When I get enough money, I'll buy the flash media server, which costs more than 4000$, and 1500$ for the upgrade lol
AQ  Post #: 41
3/12/2007 21:28:55   
Grie Velorn
Member

Thanks flsg but the only reason i can't get it and why everything seems so expencive is i have no surce of income and no way of getting one lol but ill look into that book some more it seems nice but would it be good for some one who have no programing experince or has ever programed anything
AQ DF  Post #: 42
3/12/2007 22:21:39   
somebody621
Member

Or, if you're under certain conditions, mostly of age and your work company if you're grown up, you can just get the educational version. It's cheaper XD.

Oh, and the thing about here is that everybody tries to make rpgs. Very few are actually successful because scripters are so under demand. What many don't realize is that RPG's are among the hardest to script. At least start with simple puzzle games...

The thing with flash, before, was that it was so easy to quickly brew something up, and that was a reason it was attractive to newb scripters. Now with AS3, it is scaring away many newbs.

Personally, I am working with rigid body physics right now, and the classes are a MAJOR time-saver. In As2, classes were simply too slow for action games without asbroadcaster.

< Message edited by somebody621 -- 3/12/2007 22:22:22 >
Post #: 43
3/12/2007 22:30:08   
Grie Velorn
Member

were can i find the educational version
AQ DF  Post #: 44
3/13/2007 8:41:52   
Myhos
Member

quote:

ORIGINAL: somebody621

Or, if you're under certain conditions, mostly of age and your work company if you're grown up, you can just get the educational version. It's cheaper XD.

Oh, and the thing about here is that everybody tries to make rpgs. Very few are actually successful because scripters are so under demand. What many don't realize is that RPG's are among the hardest to script. At least start with simple puzzle games...

The thing with flash, before, was that it was so easy to quickly brew something up, and that was a reason it was attractive to newb scripters. Now with AS3, it is scaring away many newbs.

Personally, I am working with rigid body physics right now, and the classes are a MAJOR time-saver. In As2, classes were simply too slow for action games without asbroadcaster.


Sure the Educational version is cheaper but you have less options with it and some limits. You also need a student ID or a teacher to get it.
AS3? are you kidding me??? Its out?!?!?! Where!?!?! *fan girl eh boy scream*. Anyhow personally I rather make small games then rpgs.

< Message edited by Myhos -- 3/13/2007 16:34:02 >


_____________________________

AQ DF  Post #: 45
3/13/2007 15:04:57   
EragonZZZZ
Member

Okay, time to respond to a couple inaccuracies in Myhos's post. And the questions, too.
quote:


Sure the Educational version is cheaper but you have less options with it and some limits. You also need a student ID or a teacher to get it.


Sorry, but thats completely wrong. You can buy Flash educational for different discounts depending on where and how you get it...Normally its through a family member. I got a $700 discount on the entire Flash/FireWorks/Dreamweaver/Contribute/FlashPaper suite and none of those are limited versions.


And yeah, flash 9 AS3 is out. I've decided to start learning it. Get it at Adobe.com
AQ  Post #: 46
3/13/2007 16:30:55   
Myhos
Member

There are limits to the license and there are a few small limits (at least thats true with the Flash MX 2004 education ver.) and the only way i know how to get its via teacher or student id.

edit: yea there are no limits in the edu and you have to agree that you can't use it for pro things like game making and anything else which you can make a profit from.

< Message edited by Myhos -- 3/13/2007 16:41:47 >
AQ DF  Post #: 47
3/13/2007 17:06:03   
petermaxo
Member

can anyone tell me what is wrong with this game? this part is the begining where In am trying to make it possible to customize your character. I only included relevent script.
ccolor and style are variables.

Scene 1: contains button "charcreate"

_global.ccolor = 0
_global.style = 1
_root.onEnterFrame = function(){
gotoAndStop(1)
//stops playhead from advancing to next scene
}

characrate:
on(release){
gotoAndStop("Scene 2",1)
//moves playhead to next scene
}

Scene 2: buttons "styleup", "styledown", "continue"

_root.onEnterFrame = function(){
gotoAndStop(1)
//stops playhead from advancing to next scene
}

styleup:
on(release){
if (style < 5){
style += 1
}
//causes the variable style to increase by 1 if it is less than 5
}
styledown:
on(release){
if (style > 1){
style -= 1
}
//causes the variable style to decrease by 1 if it is greater than 1
}

continue:
on(release){
gotoAndStop("Scene 3",1)
//advances playhead to next scene
}

Scene 3: button "color1-10"

_root.onEnterFrame = function(){
trace(ccolor);
gotoAndStop(1)
//stops playhead from advancing to next scene
}

Colorn:
on(release){
ccolor = n
//changes the variable ccolor to the nomber of the color button pressed
}




there is a movie clip called "display" which shows what your character looks like. It has 10 different colors with an instance name attatched to them which is their color. the script attatched to the movie clip is this:

_root.onEnterFrame = function(){
if (ccolor == 1){
red._visible = true
}if(ccolor!= 1){
red._visible = false
}if (ccolor == 3){
yellow._visible = true
}if(ccolor!= 3){
yellow._visible = false
}if (ccolor == 2){
orange._visible = true
}if(ccolor!= 2){
orange._visible = false
}if (ccolor == 4){
green._visible = true
}if(ccolor!= 4){
green._visible = false
}if (ccolor == 5){
blue._visible = true
}if(ccolor!= 5){
blue._visible = false
}if (ccolor == 6){
indigo._visible = true
}if(ccolor!= 6){
indigo._visible = false
}if (ccolor == 7){
purple._visible = true
}if(ccolor!= 7){
purple._visible = false
}if (ccolor == 8){
white._visible = true
}if(ccolor!= 8){
white._visible = false
}if (ccolor == 9){
black._visible = true
}if(ccolor!= 9){
black._visible = false
}if (ccolor == 0){
silver._visible = true
}if(ccolor!= 0){
silver._visible = false
}
//these mean that a certain variable for color makes a certain color of player visible (ex. if ccolor = 1, the player is red.) they also make it so that if the variable is not the one required for the color, the color will not appear (ex. if ccolor is not equal to 1, the player is not red.)
}



the problem I am experiencing is that once Scene 3 is being shown, all script-controlled action stops. it doesn't trace ccolor, and nothing else happens.

< Message edited by petermaxo -- 3/14/2007 17:57:22 >
AQ DF  Post #: 48
3/13/2007 18:26:12   
EragonZZZZ
Member

Mythos, do you know if you can pay to upgrade (like, pay the difference or discount) so that you could be allowed to make games, etc?
AQ  Post #: 49
3/13/2007 19:30:58   
flsg
Member

petermaxo: wow, could you at least tell us what's wrong with your script? XD because nobody has the patience to read all that lol

I looked at some of the lines, and I don't understand why you're using onEnterFrame. This event allows you to replay the code inside it everytime a frame passes. That's perhaps your bug. just simply remove it(well, I'm not sure what you're trying to do XD)

also, if you define _root.onEnterFrame more than once, the newer code replace the older code(which means the older code inside your onEnterFrame event dissapear)

and, if you use if() a lot, I suggest you to use switch()+case, which is easier to read
AQ  Post #: 50
Page:   <<   < prev  1 [2] 3 4 5   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 2 of 16«<12345>»
Jump to:






Icon Legend
New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Content Copyright © 2018 Artix Entertainment, LLC.

"AdventureQuest", "DragonFable", "MechQuest", "EpicDuel", "BattleOn.com", "AdventureQuest Worlds", "Artix Entertainment"
and all game character names are either trademarks or registered trademarks of Artix Entertainment, LLC. All rights are reserved.
PRIVACY POLICY


Forum Software © ASPPlayground.NET Advanced Edition