Making a game!

Hello i need help i need the
code to spawn stuff so that other players mayspawn
soldiers or tanks whatever so please i need the code for spawning movieclips .
(im using macromedia flash 8!)

If you can't understand what the documents say, there's no promise anyone else can explain it in terms you'll understand.  Here's the information from the help documents... which part do you not understand?
The general format of the the attachMovie method:
     attachMovie(id:String, name:String, depth:Number, [initObject:Object])
The arguments descriptions:
id:String - The linkage name of the movie clip symbol in the library to attach to a movie clip on the Stage. This is the name that you enter in the Identifier field in the Linkage Properties dialog box.
name:String - A unique instance name for the movie clip being attached to the movie clip.
depth:Number - An integer specifying the depth level where the SWF file is placed.
initObject:Object [optional] - (Supported for Flash Player 6 and later) An object that contains properties with which to populate the newly attached movie clip. This parameter allows dynamically created movie clips to receive clip parameters. If initObject is not an object, it is ignored. All properties of initObject are copied into the new instance. The properties specified with initObject are available to the constructor function.
Example using all of the arguments:
this.attachMovie("linkageName", "instance2", this.getNextHighestDepth(), {_x:100, _y:100});

Similar Messages

  • Making a game with 3 layers of tiles; help

    Hi guys,
    I am busy making a game which will have 3 layers of tiles. Firstly, the terrain, then the buildings and finally the player (sprite).
    I was thinking of using JLayeredPane to achieve this. But, I was also thinking of just drawing all the layers onto one bufferedimage and then just showing that everytime? What would you say?

    Thanks, i am going to do that. question now is one of transparency.
    How do i make sure that Java treats my png properly? I have tried testing whether it treats the transparent pixels properly and it doesn't. How do i work around this?

  • What methodogies should i consider for making a game?

    Im at the begining of making a game. I was wondering what design methodoligies i should use for constructing the game. The game will be in the form of a classic arcade stlye shoot-em up.

    In my workplace, we have identified five general methodologies; the waterfall, the v-shaped, the prototyping, the incremental and the spiral development patterns.
    For you, I would suggest doing the incremental (iterative) or the spiral pattern. What they have in common is that you start with a very basic, very rudimentary working system and add increasingly sophisticated functionality.
    Incremental (iterative) makes you add components. For example, a graphics framework, then sound code, then the ability to save games and so on. Presumably other components include support for joysticks and gamepads.
    Spiral on the other hand has you make a complete, rudimentary package from the start and you consider the risks involved in adding the next layer of sophistication. "Is it worth swapping out my sprite based 2D graphics system for a 3D model-based system?"
    But keep in mind that "design methodologies" are really nothing more than a way for you to organize your work such that you can offer a reasonable accurate schedule and a cost for implementing the project. For example, you could say it would take you about X number of days to switch from 2D to 3D and you can then determine if your game is going to be that much better for the work you put in.
    However, I suspect you're really done this for the fun of it, you just want to dabble in Java and have a bit of fun with it. In which case, I would not bother with a design method any more elaborate than a program logic flowchart and a crude schedule of what to code first.
    Hint: threads containing rudimentary controls and a basic 2D graphics framework that can move an image around the screen are probably the first thing you should code.

  • Making Java Game Help ^^

    We're making a game for our Java course and we're thinking of making something like Flash Flash Revolution, only in Java. Is this anywhere near possible? Or should we just make a tile-based game like Spyhunter...?
    I'd really appreciate some help or comments. ^^

    This can 100% definetly be done.
    The only real hard part is getting the arrows to perfectly sync up with the BPM of the music. Your going to have to write a routine that can change the scroll speed and timing of the arrows based on varying BPM values.
    There are some free programs out there you can download that will give you the BPM of songs you feed it. The non free tools allow you to get a higher and more accurate BPM precision.
    Of course if you simple make the game only have 1 song, and you already know the exact BPM, then you can code the initial arrow movement speed for that one song and pretty much the rest of the game is a cake walk to program.

  • Making SWF games software choose

    Hello, I am new to making flash games & apps but the thing I need to know is which Adobe Flash Software should I use?
    Adobe Flash Professional
    Adobe Flex
    Adobe Flash Builder
    Adobe InDesign
    Adobe Flash Catalyst
    (dunno if that is all)
    So help me choose, cost doesn't matter.
    Requirements:
    Easy-to-use
    Creating .swf games, applications and documents
    Many features
    Compatible with Windows Vista Home Premium 32-bit
                    and  Windows 7 Home Premium 64-bit

    "Easy-to-use" rules out InDesign right from the start. Only yesterday I found out a simple paragraph style has no less than 180 parameters to play with.
    (You might also don't want to make a 150 MB tetris clone: CS5 creates "enormous" SWF files - help!  and  File size of .swf files exported from Indesign CS5 )

  • New to flash actionscript, making a game.

    Hi. My name's Rory.
    I am an artist.
    http://www.youtube.com/profile?user=PimpOfPixels
    http://roaring23.cgsociety.org/gallery/
    I am learning action script and Flash so that I can make
    games.
    I am not a complete novice in programming. I am proficient in
    Java and in MaxScript (3DSMAX embedded language).
    I have been making some progress in action script and I have
    a functional (although incomplete) game in the works. You can view
    it here:
    http://secure2.streamhoster.com/~rlu...orniverous.swf
    The idea is it's a color game
    red beats green, green beats, blue beats red. Think paper
    scissor rock.
    The idea is to change the entire circle into one color.
    The graphics are place holders BTW.
    I am using FlexBuilder 2.0 and Flash CS3, and I have come
    across a problem not covered in either of my books.
    I'd really appreciate any help that you guys can offer.
    I have gotten this far on my own.
    My #1 question (and I have many more) is:
    How do you through Flash specify animation segments for a
    MovieClip Symbol?
    Notice how the red creatures occasionally open their mouths.
    I want to have a walk, an attack, an absorb, and a bounce animation
    on the same timeline and trigger the appropriate one depending on
    which color the creature collides with. I do not know how to go
    about this problem. I’ve just been trying to get the walk
    animation to loop without playing the attack animation so far.
    I've tried frame-labeling in flash, with scripts on the key
    frames of a second layer that specify when to stop or repeat the
    animation... No dice.
    I have a symbol named RedShot in the library of a flash
    project named "graphics"
    In my timeline I have 2 animation segments, and I have a
    second layer denoting two corresponding frames named "walk" and
    "attack" from the properties menu.
    On the final frames of the animations I have scripts.
    Code:
    gotoAndPlay("walk");
    and
    Code:
    gotoAndPlay("attack");
    respectively.
    Im my library I have linkage options specified as such:
    Class:RedShot
    BaseClass:flash.display.MovieClip
    export of actionscript#CHECKED
    export on 1st frame#CHECKED
    on the main stage of my flash project I have actionscript for
    2 functions:
    Code:
    function walk(){
    red_shot.gotoAndPlay("walk");
    function attack(){
    red_shot.gotoAndPlay("attack");
    I export the project and the opened window has the "walk"
    animation looping properly.
    In my FlexBuilder project I embed the symbol
    Code:
    //Inside class global variables:
    [Embed(source="../graphics.swf", symbol="RedShot")]
    public var RedShot:Class;
    private var _shot:MovieClip;
    Code:
    //and in my buildShot function:
    _shot = new RedShot();
    addChild(_shot);
    When I build the project the characters appear, and they
    animate. The only trouble is that there are no breaks in the
    animation. The animation loops right through the frames where I
    have specified that the animation should "gotoAndPlay" from a
    different part.
    What's weirder is that I can call
    Code:
    "gotoAndPlay("attack");"
    without an error and it will go to and play from that point.
    The only trouble is that it will begin to loop the entire animation
    again without stopping at the gotoAndPlay events stored in the
    frames of the timeline.
    It seems like all embedded actions are ignored, add I can't
    think of another way to controll the animation.
    Any thoughts?

    After hours of searching the internet I finally got this
    blasted question figured out.
    How to you export a symbol from Flash for use in a Flex
    Builder project without destroying actionscript stored within the
    frames of the Symbol's timeline?
    That's a long winded way of saying: "In FlexBuilder, how do
    you control MovieClips from Flash". I'm trying to make games, and
    this was a particularly important question for me :).
    Here's how:
    1) You need a hotfix from Adobe.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML]
    This allows Flash CS3 to export a SWC file.
    2)You have to set the linkage properties for your various
    symbols in the flash library panel.
    a)right click on symbol in library panel
    b)choose "linkage"
    c)"Class:" = (pick a name)
    d)"Base class:" = flash.display.MovieClip;
    e)"Export for ActionScript" = CHECKED
    f)"Export in first frame"=CEHCKED
    3)If you want to have multiple segmented animations as I
    certainly did you'll want to create frames and actionscripts within
    the symbols timeline to define where these animations are.
    a) in the symbol's timeline make a second layer. We'll name
    that layer "labels" for the sake of not having this get too
    confusing.
    b) on that layer create a new frame for each of the animation
    segments that you'd like to define and stretch them to the length
    of the corresponding animations.(I'm assuming that you have a
    keyframe animation on the 1st layer... otherwise what's the point
    of all this :P?)
    c)in the properties panel name the frames in the "labels"
    layer accordingly ie. "walk" "run" shoot" etc.
    d)Define whether the various animations play once or loop by
    adding a script to the last frame of the animation. If you want the
    animation to loop add
    [CODE]gotoAndPlay("name-of-the-animation");[/CODE]
    if you want the animation to play once and stop add
    [CODE]stop();[/CODE]
    if you want the animation to play once and then return to a
    different animation add
    [CODE]gotoAndPlay("name-of-a-different-animation");[/CODE]
    4) now you can export the symbols to an SWC file. Note: you
    do not get this option unless you have installed the hotfix.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML] .
    a)rightclick on a symbol in the library panel
    b)choose "exportSWCfile..."
    c)export the file to a logical place such as the root of your
    FlexBuilder project.
    5) Now you have to tell flexbuilder about the new SWC file.
    Note: Once this file is added to the FlexBuilder library you can
    instantiate classes from it as though they were included using the
    "include" function.
    a)Right clicking on the root of the project in the Navigator
    view.
    b)going to properties.
    c)Going to library path. (2nd tab)
    d)and pressing the "Add SWC" button
    Now you're done and you can instantiate any of the symbols
    from your library while preserving any actions from your symbols
    timeline just as though you had imported it as a class from a
    typical library.
    Sweet huh?
    Thanks to the countless people and internet resources I found
    on the subject. Hopefully it will be easier for anyone who finds
    this post.
    Here's an adobe video which covers the basic process.
    https://admin.adobe.acrobat.com/_a300965365/p75214263/

  • Help Making a Game Like Pokémon Trading Card Game.

    Hello! Im kinda new into making games in flash. And im trying hard to make a Game like the Pokemon TCG and i can't find anything on the internet that helps, so can't someone teach me how to do a game like that. Thanks!

    Well, it's not much. But i will studdy and become great!
    Thanks for your answer!

  • I am making a game and need help badly

    I am makeing a sprite game and I want to make a ticker for a
    special move. I don't quite know how to go about making this ticker
    let alone subtract from the ticker once I make it. any help. help
    would be greatly appreciated. thanks in advance.

    I took the advice given but there are many text fields and am
    unsure of which one to choose. I tried looking them up in my flash
    professional and it told me to update. I tried many times and it
    doesn't update. I was just wondering which would be the best text
    field in this situation.

  • Help making a Game with AS3

    Hey Guys (and Gals)
    I’m hoping one of you can help me out with a game I am making in flash.
    I’ve been following through this tutorial online (http://as3gametuts.com/2011/11/11/platformer-1/) , and it seems to have missed some fundamental parts that I desperately need, and I am really struggling to work out how to do it.. I’ve vigorously Googled, but to no avail..
    Basically, I need to animate the enemy sprite, but whenever I add any kind of animation to the symbol, it becomes non-collidable; the player just passes right through it!
    I also need to work out a way to remove enemy sprites from the previous level, as they seem to be passing forward to the next level, and adding a ‘removeself’ function doesn’t seem to do anything. I then need to add a new, separate list of enemies for the next level..
    I want to point out that I am EXTREMELY novice at flash (and coding in general), so if you could dumb-down your answers that would be really helpful.
    Here is the source code: https://app.box.com/s/d6oibaw63w12e2kvcmsx
    Thanks in advance!

    What do you mean by animating enemy? If you are trying to add some animation to it on the main timeline - perhaps something what Amy sensed happens. The thing is that manually created animations on timeline sometimes are very difficult to fit into conventional AS3 functionality.
    I suggest you try to animate enemy on its own timeline (not op the main timeline). I guess programmatic animation is too much to attempt for your level.

  • Making my game in Flash - a few questions

    Hello all, I am quite new to Flash but I have a few years of experience in the other CS software, such as Photoshop, Illustrator, and InDesign. I downloaded the trial version of Flash and started working through some tutorials last night so I can get my feet wet with it.
    Anyway, I have a game that I would like to create, and I never considered making it Flash-based until I started working with Flash yesterday. I made this game in a board game form about 8 years ago, and it revolves around giant monsters ala Godzilla, etc. It is turn-based and two players move pawns space-by-space around the board and attack by rolling a die and then using a corresponding attack on the card. There are also some simple environmental objects, such as buildings around the arena that can be destroyed and used strategically. I would describe the game as a strategy game with elements of a card game and also simple RPGs. There are five levels of cards, and when you score a certain number of points, you level up to the next round of cards. You win the game by reaching a certain number of points. When I made this game, I also included very detailed rules and such with it, so that part is finished at least.
    Is this a feasible project to use Flash to do?

    Though the nitty gritty details haven't been disclosed, it sounds like it should be do-able in Flash.  I could say it would be easily created with Flash, but I don't want to give the impression that you personally can just pick up Flash and get it done without a good amount of learning to tackle in the process.

  • Making a game for the iPhone and iPod touch!!!

    Hi, I'm not really sure if this is where this thread belongs, but I couldn't find a better fit category, sorry!
    Anyway.
    I'm a complete NOOB at making games. I'm a complete NOOB at flash animations and coding a game with the iPhone SDK. In fact, I have NEVER coded ANY game in my LIFE before, nor touched flash development programs, with the only exception being a month or two using Game Maker 2.0 which involved about 3 lines of code per game .
    I want to develop a quality game for the App store and sell it. My basic idea is using flash to animate some people and having a sniper-type layout where you have to shoot things. (Sorry if I'm being vague, I dont want anyone to take my idea. There's more to it, including one really "clever" aspect of the game (in my mind) which is why I think I can get it to sell.) If its a really great quality game, how long do you estimate it will take me, start to finish, including learning to code with the SDK, to finish this project? 3 weeks? 2 months?
    Thanks!

    Hello, 
    You can't use Flash as that's not available for the iPhone/iPod touch.
    You can find out about developing for the platform here:
    http://developer.apple.com/iphone/program/
    regards
    mrtotes

  • Good Resources for making Flash Games?

    I'm new to Flash, and I'm working on getting through a book on the basics.  What I'm wondering though is, are there any good resources out there for making games in Flash CS4.  I know I'm going to get some "learn the basics first" replies, and yes I know I need to get a solid grounding in those, but I want to be able to start gathering resources, and look ahead to what I'll be able to do with Flash in the future. 
    By resources I mean books, other websites, your own advice about game making, etc...

    i started developing in flash about 2 weeks ago for the same reason and have written a little animation and started writing a multiplayer game, which will be fully functional and properly skinned soon.  If you are like me, you have a vague understanding of object oriented programming, know at least one other programming language and can adapt to all this event-driven stuff.  Here's my story in brief.
    I started with some dev center videos and then went to AdobeTV for more videos, especially to newbie channels like Douge Winnie's.  I think I also played along with some flash down under videos to learn more action script 3 (very important in a game, I would say).
    I'm sure you want to get onto your game project right away, but you are probably 3-5 mini projects away from that.  If you don't do some toy projects you'll just end up doing a crappy job on your game or plain old getting stuck.  The mini projects, whether they are elements of your game, or exercises in videos, will force you to find the ressources you need to learn from.
    If you want to make a multiplayer game, try smartfoxserver - it is very well documented with little tutorials and stuff.  Some tutorials on
    this youtube channel too (where he mostly just runs you through the documentation).  Smartfox has a few good examples of nicely built interactive programs.  Just make sure you are using their actionscript 3.0 stuff.
    Lastly, understand and use Components.  They will save you a lot of work.  smartfoxserver has components (called bits) and so does flash.  I imagine you can even download extra components.  These are things like scrolling text boxes, buttons that look like buttons, etc.
    Cheers,
    Alejandro

  • What to use when making a game?

    Hi,
    I'm new to JAVA gaming but I was looking to making a bomberman like game in JAVA. I've been searching the web for ways to start programming this game, but there are so many different ways that I'm confused, what to use.
    I want to create a client/server system with simpel 2D graphics.
    Should I use sockets or TCP or UDP, or something else for the networking? And does anybody have any idea how fast it can be?
    Furthermore what shoudl I use for the graphics. Just basic JAVA or JAVA 2D or something else? Is there a way to use hardware? Does using JAVA 2D mean the users needs to download this before he/she can play?
    Is Webstart any good, so users can instanly download everyhting the game needs?
    Maybe you guys can point me to some helpfull information on the net?
    Or maybe some examples to start with.
    Hope you can help and thanks in advance?

    I am not an expert at Networking, never tried it
    really, just read a lot of books about it; and
    apparently you need UDP as the protocol checks whether
    the packet has arrived or not.Erm, no - UDP is fast because it doesn't check. TCP is slow(er) but consistent.
    As for speed, in 1.4.1 its GOOD. For an applet
    ofcourse (don't know about applications). However, you
    do need a decient hardware to run.Did you mean that the other way round? Apps are pretty much always faster than applets.
    To the point - look at the java AWT / java2d tutorials, and use google

  • Making a Game on a Java Applet

    I want to write an applet for a game, like a card game or something, could you tell me where i should look for libraries or code examples for linking two or more users together for the game.
    I can write the game code easy enough it the linking together of different users i'm finding a bit tricky.

    I want to write an applet for a game, like a card game or something, could you tell me where i should look for libraries or code examples for linking two or more users together for the game.
    I can write the game code easy enough it the linking together of different users i'm finding a bit tricky.

  • Programs to use for making video games

    I am interested in trying to make my own video game. I just upgraded to a 15.4" MacBook Pro with a 2.33ghz intel duo core 2 processor, 256mb Graphics cards, 120gb hard drive, and 3 gb of ram. I am new to this whole gaming thing, and need to know what kind of programs to get to start doing it. Does anyone have any suggestions?

    hi,
    well motion could certainly help with producing some graphic elements to use in a game. You could produce explosions and other particle animations. It all depends on what kind of game you want to make, if its a true 3D game you will need a 3D engine which is a whole other kind of fish. And in any case to bring all the graphic elements together with the UI and rules of the game you will need to delve deep into coding. For that you will need to chose an application that can compile code into an application. There is a progrm that is pretty easy to pick up, is very powerful and can compile to Windows and Linux as well as Mac.
    go here:
    http://www.realsoftware.com/
    I must warn you though that coding is a dark and scary place.
    have fun
    regards
    adam

  • Making my game created using Java SE work on mobile devices

    I have created a game using Java SE. Can my game be played on a mobile device such as the new g3 iphone?
    Do I have to create my game using Java ME in order to be played on mobile devices?
    Thank you,
    jeffphotos7777

    A lot of the J2SE library is not available on J2ME and the user interface components will have to be completely changed. Check out the J2ME API and you can see what parts of your code you will be able to keep and what will have to be changed. There is also the consideration of performance, the design of J2ME apps is different from J2SE so you may need to make changes to make sure you don't drain the battery etc.
    [Sun's guide to getting started with J2ME games|http://developers.sun.com/mobility/midp/articles/gameapi/]

Maybe you are looking for