ActionScript 3.0 :: Creating A Pong Game ?
Sep 28, 2011
how to create a Pong game: http:[url].... There's a link to the source code: http:[url]...file=pong4.txt.When I add the source code to a new AS file (using Flash CS 5.5), save it as "Main.as", create a new Fla and link it in the actionscript settings to the Main.as and run it, I get errors:
C:UsersxxxDesktopP4Main.as, Line 1171093: Syntax error.C:UsersxxxDesktopP4Main.as, Line 1171084: Syntax error: expecting rightparen before 270.C:UsersxxxDesktopP4Main.as, Line 1211093: Syntax error.C:UsersxxxDesktopP4Main.as, Line 1211084: Syntax error: expecting rightparen before 270[code]....
View 2 Replies
Similar Posts:
Jun 6, 2011
I just saw the McDonald's commercial which I have linked to below and I would like to try developing something similar for a festival. We have been talking about making a game in which the user has to use their iPhone and something like what McDonald's has done would be great.My question is if anyone have an idea how I can send the data and what technology they might have used? I imagine making two websites. One on which the game itself is shown and one which is the controller but how would I make sure that the data is sent and handled fast enough?I am familiar with JavaScript and PHP. I have been working a bit with flash and ActionScript and I am wondering if that might be best for the game (obviously not the controller)You can see the McDonald's commercial on the link below. Basically, the user visits a webpage which is the controller and then they are able to play the ping-pong game on the big screen.
View 4 Replies
Apr 22, 2005
I am using the pong game tutorial, with all of the actionscript and it is all working except I have one problem I am making it a different size...I want it to fit in a 120x600 area and the ball and bar and game arena are all fitting in there, however, when I put the bricks in there they line up to the old arena. So basically about half of the bricks fit into the playing area and half of them don't, the bricks are also too big. How to make all of the bricks fit in the area of 120x600?
View 2 Replies
May 3, 2005
I have attached my FLA & I was just wondering if anyone out there could tell me how to make it so that my paddle will move so that the pong game is playable.
View 4 Replies
Apr 22, 2005
I am using the pong game tutorial, with all of the actionscript and it is all working except i have one problem I am making it a different size...I want it to fit in a 120x600 area and the ball and bar and game arena are all fitting in there, however, when I put the bricks in there they line up to the old arena. So basically about half of the bricks fit into the playing area and half of them don't, the bricks are also too big...Does anyone know how to make all of the bricks fit in the area of 120x600?
View 2 Replies
Apr 2, 2009
I'm not really good with AS3 yet so maybe somebody can help meI found a pong game tutorial and it works fine.[code]Now I want that two computers play against eachother.So no player input only two computer that play.I tried a lot with the script but it doesn't work.
View 3 Replies
Apr 14, 2009
I have a problem... I found a tutorial making a pong game... I want to make some changes but I tried everything but it wont work Here is some code:
[Code]....
View 2 Replies
Mar 22, 2009
And I am creating a box game where the user has to avoid the boxes but i want to put lives on so when the user moves over the box one of the lives goes down.
View 8 Replies
Sep 6, 2009
I've been wanting to learn to work with Flash for awhi l e and decided to start learning by attempting a game. I found a decent tutorial for a space shooter and used it to create the basic code (firing, etc...) and now I've been figuring out how to add other elements (splash screen/scrolling screen).now I'd like to add power-ups but can't figure out how.I've created a graphic, turned it into a movie clip, but can't think of what to define for its actions.
View 2 Replies
Mar 12, 2011
i made a set of crosshairs and i set my enemies to disappear when i click on them andeverything works fine but i noticed that my crosshairs don't line up to where i am clicking, so i go into my crosshairs which are a movie clip and move the crosshairs so the little + sign is lined up in the middle of the crosshairs, now when i play the game nothing happens when i click on the enemies unless i put the crosshairs layer below the enemies layer
View 3 Replies
Apr 30, 2010
I've tried a variety of tutorials and had no success in creating a preloader for my game.I can't seem to get all of my library items to load in frame 1 properly. Any tutorials that I try do not achieve the preloader effect that I desire.What I would really, really like is this:A .swf file that wraps my .swf game and puts in a preloader.That's it.How do I do this, or specifically, what should I be typing into the search window of this forum?
View 2 Replies
Nov 5, 2009
So i need to create a 3D game in flash. What is the best way of doing that? Do I need to use Papervision 3D, or can I just import 3D animations and code it in Flash?
View 4 Replies
Oct 29, 2003
how to make the ball move and bounce around the stage. and i also need help on the paddle that the ball bounces off of.
View 11 Replies
Sep 8, 2009
I'm sort of new to Flash, have been using it for ages but just to animate, i haven't done any programming or interactive stuff for years, so i feel new to it again!Creating a very simple platform.Movie clip of the character (instance name z_1)- runs button - when pressed makes z_1 invisible and loads another movieclip of him firing a weapon (z_fire). (also makes ground stop moving- basically game is a static running animation, over a moving ground, if that makes sense)This all works fine, i even figured how to make the score increase!After the firing animation is finished (there is a stop on the movieclip) i want the original running animation to be visible again and for the ground etc to play again. The firing animation is only 12 frames long so i imagine i need to tell the button to resume normal service on the stage after that time period![code]It's probably completely wrong but it works, i just need to know the extra code to make the original animations start back again after z_fire has played.
View 2 Replies
Jun 3, 2010
source or tutorial for creating a word matching game similar to the one found on this site? [URL]
View 1 Replies
Aug 28, 2010
I am wondering how to write code so that once a character reaches a certain 'end mark' it will trigger the next frame/level. I am using Flash CS5, but I have primarily used it for animation. This would be my first leveled game.
View 2 Replies
Jan 11, 2010
I am creating a blit game and as of right now, the only thing that is blitting is the world itself (i.e. roads, fences). i was planning on displaying my character as a sprite and any interactive objects that it comes by as sprites as well.PickUps, Houses, Enemies. I was wanting to know what are the best practices when it comes to this. does this seem wise. When normallying blitting a game, how much of the game is actual blit, and how much should be display objects.
View 2 Replies
May 12, 2010
Well, the title said everything, I saw some very nice effects using After Effects, but I want to apply those to a Flash game.. will it be useful?, or After Effects only works on cut scenes, animations, etc?
View 1 Replies
Jul 2, 2011
I just started to learn AS3 and decided to use the Platogo engine, and I got stuck on the first part. It is described as follows:
[Code]...
View 1 Replies
Jan 31, 2012
I'd like to port my Zuma-like game to browsers. It's not really complex 2D arcade game, just some animations and particle systems - really similar in complexity to the one I linked to.I'm wondering what technology should I use. I'm thinking about Java, Flash or maybe some solution working without a plugin (SVG, Canvas?). The cost of the technology is also really important to me (I'd prefer a free solution of course, but don't know if it's possible).It's really probable that I'll also port the game to Anrdoid and iPhone. Maybe if I picked Java, I could write one version that would work on both: browsers and Android phones?
View 3 Replies
Oct 12, 2010
So I'm making a game that uses blocks... I want to create an initial grid of blocks on the screen inside a grid container. as you move the grid container around, more blocks would be added dynamically to the grid... either to the left, right, or bottom.
View 1 Replies
Mar 9, 2011
I'm using Macromedia Flash Professional 8 at the moment, and I'm fairly inexperienced with actionscript and most Flash processes. What I'm looking to do is create a game of sorts where characters appear on either side of the screen and a dialogue box appears at the bottom with text scrolling across every time the player clicks "Next" or whatever, and the characters' mouths move and their eyes blink as the text scrolls. We're using voice actors so we'd put an audio clip at the start of each piece of dialogue.
View 1 Replies
Feb 17, 2011
I'd like to know if it would be better for programming and for code organization if I'd create a Console class, which would be used for game settings and to start a game, and another Game Class, which would be used for the game itself, like movements, conditionals, scores, etc.
View 1 Replies
Sep 22, 2010
Creating a pacman-style game using Flash (AS3). There are 3 players competing to eat the most dots. Right now when one player eats a dot, on that player's screen the dot goes away (but only for a second) and appears again in the screen. The other player playing, doesn't see that the dot went away and reappeared.Using hitTestObject, when a player touches a dot, the dot should no longer be seen on the stage. I'm using shared object to create this multi-player game environment. I'm new in using SharedObject and also AS3.
public function PlayerSelect()
{
nc = new NetConnection();[code]....
View 1 Replies
Oct 10, 2011
I am attempting to create a game that will simulate groceries coming down a conveyor belt. The player acts as a bagger and must click and drag the groceries into designated bags (one for cold food and one for non-cold food). When the correct choice is made the food will disappear and the score will increase +1.
I have become overwhelmed by thinking about how to do this and have not found helpful answers that actually work when I try to compile them so I decided to ask. how I can have random grocery items fall down the screen? I assumed I could create an array of movieclips and have them be called to fall down randomly, but I am not sure how this would work.
View 2 Replies
Nov 27, 2010
I have been working on a game (Pokemon haha) since around the beginning of June. I just started experimenting with Classes today and I've run into some big problems (as expected). I have many SharedObjects in my game and I started the game when I barely understood any code. But I've worked on it a lot and learned so much. Right now, I'm trying to create Classes so that I can save time and be more efficient with my code. But... With my first major attempt, I failed.
This is what I want to do:
Create a Class that will switch a bunch of SharedObjects in my game. I don't need the switching part (because that worked before when the code wasn't in a class), just the creating the class part that involves SharedObjects.
This is basically what I have:
ActionScript Code:
import flash.net.SharedObject;
class GrassLife {
so = SharedObject.getLocal("so_file");
function Life() {
so.data.variable7 = so.data.variable2;
so.data.variable2 = so.data.variable1;
so.data.variable1 = so.data.variable7;
//The variables switch at this part
}}
View 1 Replies
May 14, 2009
am creating a simple flash game where you rotate a planet to make the buildings on the planet avoid incoming meteors.I was told that there is another just like it already, but I don't want to see it because it may restrict my imagination.
I have everything pretty much planned out now in a "game script" of everything that i want to happen. only thing is, i'm not sure where to start.Actually,i implemented rotating the planet and the timer so far, but that is all.I was wondering if anyone wouldn't mind reading through my game script and pointing me in the right direction.I am trying to wrap my head around creating classes to handle different aspects of the game, but not sure what to put in a class and what not to.I attached the game so far and the word file
View 13 Replies
Jul 10, 2002
I want to create a matching pairs card game within flash. I have found actionscript for a matching pairs game but it does not work the way i want it to. I would like to be able to match a Picture with a word as opposed to 2 pictures the same.
View 4 Replies
Mar 7, 2011
I am a middle school teacher and would like to create a Flash Jeopardy game for the teachers at our school to use on our school website.I would like a game similar to the game on url..I have been able to successfully create a flash jeopardy game that uses a xml file.My problem is that I have to have a swf file and an xml file for every game we create.I want to be able to have one swf file that will load many different Jeopardy games.I am using Flash CS3, Dreamweaver CS3, and MySQL.The files I have created are here: url...
View 2 Replies
Apr 16, 2011
What is a good framework to build a multiplayer game in Actionscript? I want to create a multiplayer 2D shooter like Asteroids on the Blackberry Playbook; my main concern is latency - a shooter wouldn't be fun if the bullets are super-jerky and unexpectedly hit people. I'm guessing that a UDP-based framework would be the best.
View 4 Replies