RE: Flash Q&A Thread 4 (Full Version)

All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy



Message


EragonZZZZ -> RE: Flash Q&A Thread 4 (9/6/2007 19:08:55)

X_X
wow.

Wait, 3rd level? I assume 2nd level is Assembly language and 1st level is machine code.
And yeah, I'm working on C++ too.




flsg -> RE: Flash Q&A Thread 4 (9/6/2007 19:36:34)

yeah
BTW, I suggest you to concentrate on one program language instead of learning 2 or 3 at the same time




SirSchmoopy -> RE: Flash Q&A Thread 4 (9/6/2007 20:04:02)

this will probably be last post, ill c ya in 2009, but as a last post, i edited my demon dood, so c ya http://img204.imageshack.us/my.php?image=giftageuc7.swf [:(]




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/7/2007 17:21:40)


quote:

ORIGINAL: flsg

yeah
BTW, I suggest you to concentrate on one program language instead of learning 2 or 3 at the same time


I'm concentrating on Java, C++ was just a look into what I may take up in the far future.
It's not going to cause me too much trouble to multi task like that.




SeniorBiscuitBut -> RE: Flash Q&A Thread 4 (9/8/2007 21:22:49)

how do i make a health bar thing where there are three hearts, and when the char gets hit, he loses a heart?




Shad0wdrag0n -> RE: Flash Q&A Thread 4 (9/8/2007 21:28:22)

I have a couple AS2 questions. I'm working on an rpg style inventory, just to see if I can figure it out (and maybe add it to an rpg game later on). I've figured out how to get it so an item is added to an inventory MC when the player picks up the item (I'm using using attachMovie to add the item MC to the inventiory MC). What I can't figure out is how to make the item appear in the first empty "slot" in the inventory. So, if the first and second slots have items in them the new item will be added to the third slot, or if the first and third slots have items in them then the new item will be added to the second slot. I also need something where if all the slots have items in them the new item can't be picked up.

I'd also like to make it so items can be moved around within the inventory, so the player can organise the items in the inventory however he/she wants. I know how to make an item that can be picked up and dropped onto a set location, but I don't know how to make it so an item can be picked up and dropped onto any one of several locations.

Any help I can get would be greatly appreciated. I've been searching the internet for tutorials that might help, but so far I haven't found anything.




SeniorBiscuitBut -> RE: Flash Q&A Thread 4 (9/8/2007 21:31:48)

all u need to do is make a picture of the item ur moving inside a seperate frame in the inv slot, make the item draggable, then make it so when it touches the slot, it unloades the item and goes to the frame in the slot of the item in there, then when u click it, make it a button that recreates the object :)




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/9/2007 11:48:38)

woah, a series of posts neither flsg, i, somebody, or althorne was involved in. >_>
Not certain if that's the best solution, but then again I do inventories in a different way ^_^




SeniorBiscuitBut -> RE: Flash Q&A Thread 4 (9/9/2007 13:22:22)


quote:

ORIGINAL: SeniorBiscuitBut

how do i make a health bar thing where there are three hearts, and when the char gets hit, he loses a heart?

Once again, how do i make that?




The Illusive Man -> RE: Flash Q&A Thread 4 (9/9/2007 13:47:21)

er... there is a way that may work

make a Movieclip - Put 3 hearts in the first one. Put 2 hearts in the second one. Put 1 heart in the third frame. And Put 0 hearts in the fourth. Give each of the frames a name.

Create a variable in the main timeline called health or something to that effect.

Use the following code (modify it a little bit to call it your own lol)

if(_root.healthorsomethingtothateffect=='3'){_root.healthbar.gotoAndStop("3hearts");}
if(_root.healthorsomethingtothateffect=='2'){_root.healthbar.gotoAndStop("2hearts");}
if(_root.healthorsomethingtothateffect=='1'){_root.healthbar.gotoAndStop("1hearts");}
if(_root.healthorsomethingtothateffect=='0'){_root.gotoAndStop("DAI!!!");}

There's probably an easier way to do that. But i dunno if "elseif" works in flash lol. I've been spending too long on php lol.




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/9/2007 15:35:33)

if(condition)
{
//code here
}else if(condition)
{
//more code here
}




flsg -> RE: Flash Q&A Thread 4 (9/9/2007 15:48:01)

hey new people!!! :) welcome
for the inventory system, I work in a totally different way. But you COULD just use SeniorBiscuitBut's way if your game is small*
althorne: your method is easy for 3 hearts, bu what if you have 180 hearts? then you'll need to use 180 MCs >_<
I suggest to use a for loop and attach the heart MC, then re-attach the right number each time(so you won't need to assign an instance variable, and remove the copy heart according to the instance name)
//somewhere...
var heartsNumber:Number=12
function loseLife(num:Number):void{
for(var i:Number=0;i<num;i++){
_root.attachMovie("yourHeartLinkageName", "newName"+i,i)
}
}
//somewhere, when you lose a life
heartsNumber--
loseLife(heartsNumber)

this uses to fact that you override the previous hearts by re-attaching sometime to the same depth(AS2)
if this doesn't work(don't have time to test myself right now, sorry), tell me and I'll re-write a code

* I didn't read SeniorBiscuitBut's solution, but that should work lol XD




The Illusive Man -> RE: Flash Q&A Thread 4 (9/9/2007 15:48:32)

Aaah, i didn't know if elseif existed outside php :)




SeniorBiscuitBut -> RE: Flash Q&A Thread 4 (9/9/2007 16:50:00)

thanks althorne, but now all i need to know is, how do i get it to subtract frum the health




SirSchmoopy -> RE: Flash Q&A Thread 4 (9/11/2007 19:27:35)

Duz any1 tthink i shuld make a galery?[sm=icon_question.gif]
btw im bak cuz i realized how much i sux, even tho i know i sux i didnt know how much




SirSchmoopy -> RE: Flash Q&A Thread 4 (9/12/2007 18:02:28)

Helloooo??? any1 there? aww, every1 h8s me, when i cum back, u stop comin here, and when im gone, ur always on this Q&a




The Illusive Man -> RE: Flash Q&A Thread 4 (9/12/2007 18:20:21)

It's not up to us whether you should make a gallery. It's yours. If you want advice and stuff, make one. If you don't want it, then don't. Simple as that.




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/13/2007 16:35:19)

No, SirSchmoopy, we don't hate you. That's silly.

Your post just had nothing at all to do with the thread whatsoever, nor did it really benefit anyone else, so naturally nobody responded. This thread becomes active when needed.




Trip -> RE: Flash Q&A Thread 4 (9/13/2007 19:24:15)

Some People Might Say Your Good Some Low Lifes Would Say No
THe People That Say No Are Shelfish :P




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/14/2007 23:03:33)

Just thought I'd poke some life into this by asking the question:

When you are creating a series of classes that need to use the same constants, such as stage width/height, what do you do to ensure that you can easily change said constants without editing each file?

Personally, I define a class called 'constants' and declare it in my base classes (the two or three that every other object is a child of), name it something simple like 'c', and refer to constants as 'c.STAGE_WIDTH' or 'c.STAGE_HEIGHT'.

This way, all you ever need to to change your 'global' constants is change the Constants class file. :D




flsg -> RE: Flash Q&A Thread 4 (9/15/2007 10:00:03)

yeah that's the way I think. I use it like that too
since in AS3 you can't access the stage in every class, but only the main document class
wait, you're talking about AS3, right? XD




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/15/2007 10:25:10)

Nope, AS2, but I'll be using it in AS3 too.

So wait, AS3 got rid of using _root in your classes (other than the main)?
Interesting. That means all of those functions are going to have to be sent to the main document.

I reallly need to buy CS3 so I can work on AS3.
It allows for AS2 access also, right? So I can keep programming while still learning?




flsg -> RE: Flash Q&A Thread 4 (9/15/2007 11:24:21)

no, in AS3, the root refers to the CLASS, so the main document class is the movie, so the root in the main class in the swf file




EragonZZZZ -> RE: Flash Q&A Thread 4 (9/15/2007 15:48:06)

Ohh, that's so much cleaner and nicer and OOP-esque.

DUDE! I've got something amazing to show you that'll encourage you on your AS3 learning:

Flash 3D Demo

That's Flash right there. Flash. Handling 3DsMax models. No..freaking...way.




flsg -> RE: Flash Q&A Thread 4 (9/15/2007 20:59:56)

lol...saw this thing twice XD
I even PMed this to somebody621(sorry didnt PM this to you because you didn't use AS3)




Page: <<   < prev  6 7 [8] 9 10   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.125