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

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



Message


flsg -> RE: Flash Q&A Thread 4 (2/1/2008 17:15:49)

gah...sirschmoopy, you copied all that fancy code right? because it's way too different from your on(release) thing
what eragon said
i suggest you to code it yourself, you'll have big troubles if you dont even know what the code does




SirSchmoopy -> RE: Flash Q&A Thread 4 (2/1/2008 20:04:10)

i didnt copy that code i remember 1 time i made a code to make sumtin go from frame one to frame 3, and i called frame 3 nextFrame, the code was:
gotoAndStop(nextFrame);
and for some reason it went to the second frame, so i thought maybe if i did it again it culd make it goto the next frame!




Zoltan -> RE: Flash Q&A Thread 4 (2/2/2008 1:33:08)

SirSchmoopy: Err. if you want it to go from say frame 1-3, why not just make it do that.. instead of making it goto the 2nd one.. which is obviously not frame 3. Unless I read what you said wrong




flsg -> RE: Flash Q&A Thread 4 (2/2/2008 12:05:25)

I was talking about the longer code, not the gotoAndPlay thing




EragonZZZZ -> RE: Flash Q&A Thread 4 (2/2/2008 15:16:35)

"nextFrame" isn't a property, its a function of MovieClip and _root.

That's why it's not working for you.




SirSchmoopy -> RE: Flash Q&A Thread 4 (2/2/2008 15:35:42)

@eragon: I knose!:) besides, i said the code in the big array and i forgot until about 3.5 seconds ago.
@zoltan: i made that code when i first got flash, and i noticed how it did that while i was looking through all my old work.
@flsg: i didn't copy it




Sephiroth12 -> RE: Flash Q&A Thread 4 (2/2/2008 17:32:33)

I have a problem: In an RPG, how would you get it to switch to a battle...? Like if you clicked battle it would or if you ran into something?

Nvm... I figured it out :P I think




The Illusive Man -> RE: Flash Q&A Thread 4 (2/3/2008 4:13:31)

well, turns out i'm back lol

Just couldn't stay away




EragonZZZZ -> RE: Flash Q&A Thread 4 (2/3/2008 4:26:25)

Not shocking, its rather hard to leave :P
Well, I'll be kissing goodbye to my 1000+ post count.
It'll be dropping substantially rather soon...




zenron the great -> RE: Flash Q&A Thread 4 (2/3/2008 5:32:13)

yeah..Im saying goodbye to about 1000 posts too... will still have over 1000 left though :P




SirSchmoopy -> RE: Flash Q&A Thread 4 (2/3/2008 9:02:31)

im saying bye bye to everylast single post of mine :(, ill be newb again.




zenron the great -> RE: Flash Q&A Thread 4 (2/3/2008 9:50:19)

again...




EragonZZZZ -> RE: Flash Q&A Thread 4 (2/3/2008 10:00:37)

Uh, SirSchmoopy, all your posts in the Q/A don't get deleted..so not really?

Man, I WISH I could go back to New Member. I'd love to have that as a title.

and zenron, touche'.

Anyone actually have a Flash question? XD




Taerzik -> RE: Flash Q&A Thread 4 (2/4/2008 3:44:33)

Yeah, here, I've got a question.
A script in my project creates a bunch of MCs. When I click on one of them I want the others to go away. I would think to use .removeMovieClip() but it doesn't seem to be working. Since the names of the MCs are derived from the items in an array, I tried to use something like this:

for (v in Array) {
_root[Array[v]].removeMovieClip()
}

I'm guessing that I just haven't yet figured out how to reference the MCs properly.


Additionally, does anyone remember how to load a specific part of a text file into a text field? It's not a major issue yet but it will be soon.




EragonZZZZ -> RE: Flash Q&A Thread 4 (2/4/2008 7:03:39)

I've never done anything that way...but you can either try taking root and the non-Array brackets out entirely or putting a period right after _root.
I'll test later.




biG frend -> RE: Flash Q&A Thread 4 (2/4/2008 11:04:39)

UnloadMovieClip();
That Works for me.
Try that.




Taerzik -> RE: Flash Q&A Thread 4 (2/4/2008 14:08:31)

Well, unloadMovieClip() seems to work. To my understanding it leaves the actual MC and it's parameters behind, simply unloading it's contents, but for now I'll use it. If it becomes a problem I'll fix it later.




SirSchmoopy -> RE: Flash Q&A Thread 4 (2/4/2008 17:37:41)

@T:
on(release){
this._visible=false;
}

it might work im not 100% sure, but try it




EragonZZZZ -> RE: Flash Q&A Thread 4 (2/4/2008 17:41:16)

uhh that just makes the movie clip invisible and doesn't remove it at all...




Taerzik -> RE: Flash Q&A Thread 4 (2/5/2008 0:07:12)

Yeah, I got it to work. (So far)

Tonight I'm tackling loading text. Problem is, I'm loading something like chapters from a collection of books... and they're all stored in a monster text file (4.6 mb [&:], w/out fancy formatting or anything). I'm going to have to re format it but can someone give me some pointers on what to do? Thanks.



Edit: I haven't gotten to the text yet as I'm facing a new problem. It's another 'for (...)' loop with MCs as the result. The problem is that I can't get the loop to work. If the loop is disabled then the code will execute and create a single MC, but enabled doesn't yield anything.

I just though of something. I should try replacing the script inside the loop with a simple action to see if it executes. It's possible that the script just simply can't generate the new pile of clips.




Sephiroth12 -> RE: Flash Q&A Thread 4 (2/9/2008 16:10:50)

How would you customize a character like in AQ? To where you have a certain class, face, hair, armor, weapon, etc...? I know it has to do with variables but which... :P

and also how would you get it to save... O.o

Once I have the basic RPG down that I'm working on I'll put it on my site :P




Taerzik -> RE: Flash Q&A Thread 4 (2/9/2008 16:39:42)

For ^:

In AS you need to create some variables to begin with.
For AS2 it's like this:
quote:

Name = "Taerzik"


Of course you should probably say:
quote:

var Name = Taerzik

but you don't have to.

Let's say you have 7 races for players to choose from. Then, define arrays for each race and put the characteristics for that race as the items.
In this way, whenever a player selects a race, you can have the special features of the race load up.

In order to load a character's custom appearance and such you need to have AS load the variables from a text file. I'd explain more but I haven't mastered tat yet. Saving them would just be the reverse: write to the text file.
You will need to have the file save either to the player's computer or else to the server that you are on.




Sephiroth12 -> RE: Flash Q&A Thread 4 (2/9/2008 17:51:40)

K, thx :)




Taerzik -> RE: Flash Q&A Thread 4 (2/13/2008 3:04:47)

I'm having a problem with re-using a function.

I defined most of the actions in my script as functions because they need to be re-used frequently.
Two of the functions make a bunch of MCs and the other functions remove them. Here's the thing: the movie calls one of the functions that makes MCs when it starts up. At the press of a button the MCs are removed and different ones are put in place including a button which removes the new MCs and puts the first ones back by calling the appropriate function. The problem is that when I call the function to put back the old MCs it doesn't work right. It just puts down a single MC, without putting it where it belongs or anything like that.
The problem might be the the function is being called (the scond time) from a script in an instance of a button (the button is nested in a MC) but I don't know.


Solved that one, just reconfigured the script to shrink and expand clips, moving them when necessary since the remove and unload process can't seem to eliminate the clips properly.

New problem, and it's all Greek AS2 to me (meaning I'm mostly lost):
I'm trying to load paragraphs (one at a time) from text files and break them up and label them for the reader. The labeling system is pretty basic and I can alter it to whatever will work, but each sentence needs to be identified by a separate number. I think I understand how to break up the text but I'm having trouble loading it to begin with. Can someone give me pointers on how to go about doing this? In the end I'd like to be able to pull individually numbered paragraphs from the text file and load up the selected text, then have it appear broken up sentence by sentence in the text field on screen.

Thanks yall.




biG frend -> RE: Flash Q&A Thread 4 (2/14/2008 19:59:25)

Alright I'm trying to code a random image gen from memory. But I'm having problems.
So Far I have this
stop();
banner = 0;
_root.banner = _root.banner+random(1);
if (_root.banner = 1) {unloadMovie("fantasium");}
if (_root.banner = 0) {unloadMovie ("cu");}



But It won't seem to unload any of the two movie clips.




Page: <<   < prev  24 25 [26] 27 28   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.109375