Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsAt 5/6/13 10:42 PM, poom3619 wrote: Hello, World. Could anyone explain detailed difference between Computer Engineering and Computer Science? I decided to enroll in CE because my parent and relative said that "Engineer" is sound good and other "Computer Engineer" here would raise the eyebrow if they know "Computer Scientist" will be their boss. I personally prefer coding and trail-and-error'ing instead of assemble something.
Roughly speaking, Computer Engineers work with hardware. Do you like building your own computers and looking at hardware specs? Do you like the idea of learning about how CPUs, memory, storage, etc work?
Computer Science is usually a degree that prepares you to be a programmer. Do you like writing flash games or other software? Do you like discrete mathematics?
Just make the entire credits one textfield, then slowly tween them up over the stage.
You don't need to make a class file for each extension. You can set a custom class for an auto generated one to extend in the properties window.
onClipEvent(load){
a=0;
}
onClipEvent(enterFrame){
a+=1;
}
lol = [];
for(i=0; i<23; i++){
creep = new Creep();
lol.push(creep);
}
Then just loop through the array to reference them all.
Google "as3 switch statements"
It'll get rid of a lot of your
if(asd == "asdfca"){
}
if(asd == "adfgvafsda"){
}
if(asd == "asasdfgvadfa"){
}
At 8/26/09 11:31 PM, RemminyCricket wrote:
:trying to learn how to code so that I don't sound like an annoying noob
If you want to shed your noobdom faster, don't waste your time learning as2.
So I instance my mc player and try it from the main frame like this:
if (Key.isDown(Key.UP)){
_root.player._y-=8
}
That just checks for the key press one time. You need it to check for key presses every frame.
onEnterFrame = function(){
if (Key.isDown(Key.UP)){
_root.player._y-=8
}
}
Tried restarting flash? Tried not having unprotected sex with software?
Put code in the platform class/whatev that says "if I am hitting the player, add my velocity to the player's velocity"
onClipEvent (enterFrame) {
while (face._y >= 350) {
face._y --;
}
while (face._y <= 0) {
face._y ++;
}
while (face._x >= 480) {
face._x --;
}
while (face._x <= 0) {
face._x ++;
}
}
in my previous post, I added the float to the stage, not to a container
for it to be in the layer movieclip, stick thisLayer in front of addChild, using my code above.
thisLayer.addChild(float2);
To make it have certain coords, just assign them like normal:
float2.x = 300;
float2.y = 700;
var names:Array = ["Patrick","James","Edward"];
var randomName:String = names[Math.floor(Math.random()*names.len gth)];
It's basically the same in as2, just remove the :Array and :String.
There is probably a far more efficient way to do this, but off the top of my head...
$noSpaceUsername = '';
$username = trim($_POST['username']);
$username = explode(' ', $username);
foreach($username as $part){
$noSpaceUsername .= $part;
}
this thread is pass
If you've used any tweens on that layer, try using two different layers. I used get bugs with scale when using a bunch of different tweens on the same layer in flash 8.
http://www.newgrounds.com/bbs/topic/9281 19
just look at the index of the flash forum
In this for loop:
for (var layerNum:uint=0; layerNum<numLayers; layerNum++){
try adding this
if(layerNum == numLayers-1){
var float2:float2 = new float2();
addChild(float2);
}
To add an instance of a different class to the top layer.
I don't know if this is what you wanted, when you say "adding a different child" I assume that means another DO of a different type than float1.
1- how to create an instance of that movie clip whenever the user clicks somewhere on the movie (there needs to be able to be as many instances as the user clicks, not only one.)
2- How to delete an instance when it has reached the end of its animation.
I don't know how to do this code-wise too, not only theorically.
Make a class that extends MovieClip, and attach it to the animation you made.
Add an instance of the class to the stage or wherever, and change the x and y to mouseX and mouseY.
I made a class that sorta accomplishes what you need for this one project of mine
package
{
import flash.display.MovieClip;
import flash.events.Event;
public class MapAnim extends MovieClip
{
public var finished:Boolean = false;
public var removeOnFinish:Boolean;
public function MapAnim(autoRemove:Boolean = false):void
{
removeOnFinish = autoRemove;
addEventListener(Event.ENTER_FRAME, oef);
}
public function destruct():void
{
removeEventListener(Event.ENTER_FRAME, oef);
parent.removeChild(this);
}
private function oef(e:Event):void
{
if(this.currentFrame == this.totalFrames){
finished = true;
if(removeOnFinish){
destruct();
}
} else {
finished = false;
}
}
}
}
Here:
onClipEvent (load) {
_x = 250;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
if (_x < 350) {
_x += 3;
}
if (_rotation < 20) {
_rotation += 0.6;
}
}
if (Key.isDown(Key.LEFT)) {
if (_x > 150) {
_x -= 3;
}
if (_rotation > -20) {
_rotation -= 0.6;
}
}
if(!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)){
if(!_rotation < 0.6 && !_rotation > -0.6){
_rotation += -1 * _rotation/3;
}
}
}
I also fixed some redundancies.
If you want to know how it works, feel free to PM me.
After the player chooses their character in my game and enters a level, there is a lot of lag while the level loads because of all the constructors running and display objects being added to the stage. Is there any way to create an in-game loading screen to display while flash lags rendering the level?
http://www.friendsofed.com/book.html?isb n=9781590597910
That was a great book.
Also, when looking on their website, I saw this:
http://www.friendsofed.com/book.html?isb n=9781430218210
That looks good too.
I think you need to take a look at this:
Guide to Order of Operations
Actually, I do. Damn.
I am not thinking straight tonight.
Sorry for the messed up code...
And the values for x and y are always equal.
My bad.
myXdirection = myYdirection = -1*range+random(range);
Now you get only negative numbers.
I think you need to take a look at this:
Guide to Order of Operations
To select all the stuff in a group of frames all at once, go to the onion skin button, and 2 buttons over is the "edit multiple frames" button. Select that, and move the brackets in the timeline like you would an onion skin so the frames you want to edit are in between the brackets. Lock any layers you don't want to be selected, and press ctrl+A or command+A to select everything. You should see all the shapes jumbled on top of one another, and you should be able to transform and move them around.
In as2, _root has two methods that allow you to make preloaders.
The methods are getBytesLoaded (returns the number of bytes in the movie already downloaded to the user's drive) and getBytesTotal (returns the total size of the flash file).
If getBytesLoaded = getBytesTotal, then the movie has loaded.
_root.stop();
_root.onEnterFrame = function(){
if(getBytesLoaded() == getBytesTotal()){
play();
}
}
onClipEvent(load){
range = 5;
myXdirection = myYdirection = -1*range+random(range);
_alpha=100
}
http://www.newgrounds.com/downloads/prel oaders/
Download one of these.
Change the graphics.
Just stick the variable on root. It won't change from scene to scene.
Try FlashDevelop and the Flex SDK.
http://opensource.adobe.com/wiki/display /flexsdk/Downloads
http://www.flashdevelop.org/community/vi ewforum.php?f=11
If you aren't very good with computers, or only want to do animation, just get a cheap copy of CS3 off of ebay or something.
Turn the display_errors setting in php.ini to off.