Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsI haven't watched WWE in quite a while. Is the great khali still active? He is my favorite.
Could use some reviews on my latest game. Thanks.
Click to view.
Your tv_swf is a class type. You need to cast it as a movieclip.
mc = new tv_swf() as MovieClip;
As2 is a programming language. Unlike other things (ie. wine, snes, memories) it doesn't get better the older it gets. Only people who still pick AS2 are the employees whose boss ordered them to use AS2 for whatever reason or lazy kids who have heard that it's "easier" and think it's their golden ticket into making flash games.
At 12/12/11 09:16 AM, telinc1 wrote: Hi! I have some questions.
1. How do you make an event?
First you switch to AS3 project. Then write:
var ev:Event = new Event("myevent");
2. How do you "fire" an event?
dispatchEvent(ev);
3. How do you add an "Event Listener"?
myobject.addEventListener("myevent", myHandlerFunction);
4. How can you know is a certain event fired?
It will call the handler function you have specified.
5. How do you remove Event Listeners?
myobject.removeEventListener("myevent", myHandlerFunction);
Pretty basic questions. I know. Thanks!
On the top of my head I'd say you can do it with simple resizing the tongue mc and rotating it towards the point where the user clicked. But if the tongue graphics has a lot of detail, then it will look very ugly when resized, but if it's a simple graphic then this method should work without anyone noticing much. Can't think of any more elegant ways right now.
At 12/8/11 02:08 PM, Xiox231 wrote: your just going to have to wait and see.
Reality check time. You will never finish. I doubt you will even get 10% done. Don't believe me? Just wait and see.
So you want to use strings to identify a class and make an instance of it? You can use getDefinitionByName. Example:
var c:Class = getDefinitionByName("xlr") as Class;
addChild(new c() as MovieClip);
There are several sites that allow you to stream your own content, twitch.tv for example.
Unfortunately you can't bind in regular flash (you can in flex). So just write again after changing the variable: Score.text = money
That's too bad, cuz you get to keep it forever once you get it. But to answer your question on whether fb or cs5, definitely cs5 if your goal is to make games.
Flash Builder is free for students btw. I didn't pay a dime for it. Just had to prove to Adobe that I'm a student, which was a really simple process and after a few weeks I was approved and got Flash Builder for free. Google it and see if you can get it for free as well.
I assume that the container._Art and container._Games don't exist in all of the same frames? You are running the enterframe regardless on which frame you are on. You get null for the container._Games because it doesn't exist in the frame you currently are, or vice a verse with container._Art. Check to see the if current frame contains the child before checking what label it is on.
So you are jumping into another frame in your maintimeline while the code is being run in the mc, and the mc doesn't exist in the other maintimeline frames? I suppose that could cause some weird problems, it's been a while I coded in frames. Try putting the gotoAndPlay in the function I gave you inside an 'if' clause and running it only if a certain boolean is true. And set the boolean to false when you jump to another maintimeline frame (and back to true again when you get to the third maintimeline frame).
if (_root.xp > 250 && _root.xp < 280 ) {
&& means 'and'. || means 'or'. Use them wisely.
You said you were gonna put it inside a mc. Now you seem to say that you put it on the maintimeline. Your error is that you don't seem to know where to put it. Can't help you with that one. You know what the code does, put it where you want it.
That code can't affect the maintimeline if you put it inside your mc first frame. You have some other problem then.
Throw this code on the first frame:
stop();
var num:Number = Math.floor(Math.random()*9000)+1000;
var id:Number = setInterval(runIt, num);
function runIt():Void
{
clearInterval(id);
gotoAndPlay(2);
}
The 'num' value is between 1000 - 10000. It is high because the setInterval counts with milliseconds, so the time is between 1 - 10 seconds. And the lowest value is important to have, cuz if you random a zero then your computer will explode and take half of the city with you :D.
At 12/2/11 07:39 AM, glavca wrote: BTW posting a comment saying: the problem is you copyed the code doesnt help.
It should trigger a response in you. Something like "Oh shit, you are right, copying code is stupid, I'm gonna go read a tutorial or a book and learn how to do things myself". And that is the best help you can get. But kids these days feel no shame for copying, stealing, kicking old people in the head...
Use a textfield to show it?
If this thread was an audio submission, I would rate it: 0 - "I hope you die in a fire".
Trace btnBack and see what you get.
Naming your class after the instance name of your movieclip doesn't magically link them together. You are adding an empty movieclip, and you can't see empty, so...
Step by step instructions:
1. Open Flash.
2. Make Windows Simulator like Windows Doors.
3. ???
4. Profit.
Same way as any other class. You know how to instantiate Number, String, int etc., right? If not, then OOP is the last thing you wanna study, start with programming basics.
If you wanna do flash, then get flash. That's my opinion.
Get flashdevelop (google it). It autosaves the class files when you hit ctrl + enter to test.
Yes the event will keep triggering. You need to also remove the event listener from the object.
Or use a weak reference (the last parameter in addEventListener). Set it to true and that makes it so that your object will be garbage collected if it has no other references to it.
Perhaps reading a tutorial about the basics of OOP is in order.