The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsHere's something i came up with:
Ah nevermind, it was a dumb mistake, the instance names are case sensitive, and i typed them in different cases. :P
Yes, the functions make sure, that two characters always face each other. (i'm making a fighting game)
So anyway, case closed.
Hey. I'm updating an old project from Flash 6, AS 1.0 to Flash 8, AS 2.0.
When i change it in the publish settings and test it, some things do not work. I managed to fix most of them, but i can't fix this:
onEnterFrame = function () { P1Rotate();P2Rotate();};
function P2Rotate() {
if ((player1._x > player2._x) && (_root.Player2._xscale > 0)) {
_root.Player2._xscale *= -1;
} else if ((player1._x < player2._x) && (_root.Player2._xscale < 0)) {
_root.Player2._xscale *= -1;
}
}
function P1Rotate() {
if ((player2._x > player1._x) && (_root.Player1._xscale > 0)) {
_root.Player1._xscale *= -1;
} else if ((player2._x < player1._x) && (_root.Player1._xscale < 0)) {
_root.Player1._xscale *= -1;
}
}
It works fine in the old project but when i update it doesn't do anything. I guess i may be using outdated syntax or deprecated code, can anyone help? Thanks!
At 11/1/07 10:36 AM, Agnate wrote: is faceless (or hero, whatever) in the _root, or did you change the code a bit for clarity? If faceless is inside another movieclip, you have to use a .localToGlobal alteration to the x,y coordinates. Judging by the results you posted about what was happening, this would be my guess at the problem.
If this isn't the situation or the problem, I'm sorry for wasting your time (or regurgitating information you already knew).
Well, the hero movieclip that the player controls is not inside another mc, it is in root. So i, however should be sorry here, for not providing a good enough description of the situation. ;)
But information you provided is new to me, as i was not aware that movieclips inside other movieclip could require the use of "localToGlobal" to properly interact with. I did not consider using object either, so maybe that will prove usefull in the future as well.
At 11/1/07 11:23 AM, Paranoia wrote:At 11/1/07 10:27 AM, GustTheASGuy wrote: Also don't use '_root' for such scrolling. You end up having to move lots of stuff backwards.Agreed. You're best sticking everything you want to move in a big clip, lest you want to have to move all of your UI every time something moves.
Yes, i was aware of the problem of moving UI backwards. So, if i try the Big Movieclip trick, are there any limitations that arise from that? Or do i just use "_root.BigMc.[something]" instead of "_root.[something]" when i want to interact with stuff inside it, and that's it? And i still can use variables and functions in the actions of the main frame, or am i better of with defining everything in the big mc?
ah sorry i left one error in the example code ;P
the instance name of mc i have is "faceless" but i wanted to change it to "hero" for clarity. So the code's problem isn't really the different names it's just a typo i left ;P
Hey everyone. I am having some trouble with moving the _root._x (or the screen) in my game.
I have a long mc of the whole level in the background, and obviusoly only a part of it is visible at any time.
What i need, is when the character you control gets near the edge of the screen (both left and right) the screen smoothly moves so the character is in the middle of the screen again. (i require the same thing for up/down, but i think i'd be able to do that myself once i get the idea for scrooling left/right)
So far i've been unable to acomplish that since i was using stuff like:
if (_root.hero._x > (_root._x+700)) { //700 is the with of the screen
_root._x += _root.faceless._x; // here i tried variuos stuff to add
}
The point being i am doing this by trial and error, and so far i dont get the result i need, the screen either moves in the wrong direction, doesn't move at all, or doesnt stop moving up to infinity ;P
So i would really appreciate if someone would help me achieve this screen scrooling i desribed, and for the record, i already checked AS:Main, but i wasnt able to find what i need, or i didn't look close enough.
I aprreciate both tips and code, and i never just copy/paste, so i'll be happy to see any help, and learn from it.
Thanks in advance :)
My 2nd submission :)
(Of course the text can be anything)
P.S. I also added a bit more detail to my: 1st Submission ;P
For all you Hitler fans ;D
Sorry if this is already done i didnt't checked the topic ;P
P.S. i could make this more detailed if it actually gets picked, now i was in a hurry since there's not much time.
Hello everyone, i need some help with ground in an arcade/platformer game.
Ok, so there's a hero MC and a ground MC, game engine is pretty much done, but the hero mc does not move according to ground pattern (bumps, slopes, etc) after it lands after a jump, he stops where he hits the ground and then just moves in that height in a a horizontal line, until another jump ( so he appears to be floating or beneath ground sometimes)
Now i kinda know a way to make it go down slopes, by constantly checking if he hitTests the ground, and making him fall if he doesn't, but i still need a way to make him go up slopes. (would be awesome to prevent him going up the slope if it's too steep too ;)
So if anyone knows how to make this, please post, thanks in advance :) !
At 12/17/06 08:45 AM, West-End-Pro wrote: if(_root.whatever._currentframe == #){
whatever.gotoAndStop(#);
}
Replace # with the frame numbers..
Hmm, i didnt knew the "_currentframe" script, i think this can be used to get the effect i need, Thanks !
yes i know that, i need a script that would be like:
If (the "outer" movieclip in which this "inner" movieclip is placed is instanced named "mc1" ) {
GoToAndStop(2);
} else {
If (the "outer" movieclip in which this "inner" movieclip is placed is instanced named "mc2" ) {
GoToAndStop(3);
}
}
Of course this is just an example i dunno if it is possible to detect mc isntance names, maybe there are other ways to get the effect..
Hello everyone, i wanted to ask is it possible to make such a thing:
There are 3 movieclips let's say "mc1", "mc2", and "mc3".
Movieclip "mc3" is inside both "mc1" and "mc2". Now is there a way to make "mc3" go to different frames depending on the moviclip it is inside?
For example it goes and stops to frame 1 in "mc1" but it does go to frame 2 if it's inside "mc2"..
Thanks, i think those tutorials might help.. :)
Now does anyone know anything for the question 3?
Oh comeon doesn't anyone know how to make the things i need?
Hey people, doesn't anyone have any more info?
this whole 06/06/06 things is dumb if the world would end on 06\06\06 it would have ended at the year 1906 06 06 , it's shorter version is 06/06/06 too. -_-
No, i mean i want a movieclip, to get tinted when u click a button that is inside that MC, and that the tint would stay on until u click an other button...
Thanks for replying, so then would there be a way to prevent cheating in projected flash games? And about that tint thing, shouldn't the tint color be set somewhere?
I had the same problem in my abandonned game.
I think i did managed to solve it by making a variable "moving" and if it is 0 the character MC goes to idle, if it is 1 it goes to moving animation.
and then i made an Actionscript that sets movement to 1 if the key is pressed, and sets it back to 0 otherwise.
Though i'm not sure if this was the way i did it, i abandonned that project some time ago, because i wasn't able to fix some other errors, and i don't remember, neither can i find it..
Hello everyone, i wanted to ask how to do a couple of things in flash:
1) I know how to disable the right click option for flashes in web, but the meniu still is there if u launch the swf from your computer (or maybe i do sth wrong) so i wanted to ask, is there a way to disable that meniu so it never shows up, including the Projected .exe file?
2) how do people insert their website URLs and similar stuff in the right-click meniu?
3) I want my game to have it's cinematics in their own swfs, i know how to load another movie, but i want to know how do u make Flash go back to the main movie after the cinematic SWF is ended? and how can u protect the cinematic swfs, so that ppl can't see the cinematics by just opening the cinematic.swf file ?
4) Is there a way to make a Movieclip get some kinda color tint when it's clicked, and then to make the tint dissapear when another button is clicked?
5) how to make a flash movie read variables from a notepad file? so u can save the players stats or something. (not for online saving) And then would there be a way to prevent the ppl from opening the notepad file and boosting up their stats?
I would really appreciate if someone could answer atleast some of my questions.
NAd i would liket to thank all the NG commnunity in advance because i asked alot of questions about flash here, and u always seem to have the answer. :)
Thanks, i'll see if i can understand something in those tutorials..
But maybe u have any ideas, on how to make the MC do different commands on mouse click.
(as i said; if clicked on enemy-attack, if on neutral- talk, if none of the previuos- go to the location where u clicked)
Can't anyone actionscript that? :(
Hi everyone, i'm making an RPG like game, and im using a view from the top to navigate in map. Now i'm using an actionscript from Flash MX tutorial where u control a beetle with your mouse. But i don't understand how it works so i have some problems: If i click an Interface button or something the movieclip moves there, and that is annoying, of course i'm blocking it's movement off-screen and stuff, but i still would like to fix this thing.
So could someone post maybe an easier actionscript that would make a Movieclip move to a location where u click with your mouse, also it should rotate to look at the direction. And what script should i add to Interface, and characters you can talk to want to attack, etc.. so that the MC wouldn't move but do other actions ( open a dialog box, attack etc.) ?
Any help appreciated.
It works perfectly now. Thanks! :)
At 5/3/06 10:50 AM, -yam- wrote: I think you might be able to put a _root.hero. infront of it, or name the walls different.
if i make it "_root.hero.y" Flash will think that i want to do something with another MC called "y" that is inside the hero MC, so that will not wotk..
Hello, i found a tutorial somewhere on how to make borders that prevent a player controlable MovieClip from going of screen, and on other background objects.
It is put on the MovieClip (i called it "hero") and looks like this:
onClipEvent (enterFrame) {
if (this.hitTest(_root.wall1)) {
_x = _x+12;
}
}
But i have a lot of walls, to fit my background, and i need to put them all on the hero MovieClip. I thought how to make this easier, but i don't know how to properly make that in Actionscript. I think i could put this script on all walls, (of course with changed coordinates) to keep the Hero MC clear:
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
_x = _x+12;
}
}
I need to change the bolded text so it changes coordinates of the Hero MC, not the wall. But i dunno how to actionscript that. Could someone help? Thanks in advance.
Yes, i know how, and i did that before, but this time i was so sure that the .fla will work, that i didnt took the .swf :(
Yes, almost everytime, i unplug it without disconecteing it, and plug it back in, it's empty..
But this time im sure i unplugged it correctly.
So isn't there any way to extract atleast some of the graphics from it, so i could do atleast something, towards the finishing of the project?
Hello, i have been working on a flash project elsewhere, and when i carried it back home, i get an "Unexpected file format" error when i try to open it.
I have experienced that before, when i was trying to open flash files made with newer versions ( 7 or newer propably, because i have 6.0 at home) So i just got Flash 7.1, but i still can't open the file, so i guess the version difference should not be the problem.
So maybe anyone knows how could I open the file?
Because i need to finish it soon, and i will have the chance to get back the original file, not so soon... : (
P.S. I have carried the same .fla file in a Usb flash drive before, and it worked fine, so mayeb something happened and it got corrupted this time?
Any help,m or advices would be appreciated.