|
metadata
attachmovie didnt work and i cant get the miniboss to come in either
|
|
|
metadata
Well, I can’t say why it wouldn’t work from that description.
The way attachMovie() works is very simple. The first argument is a linkage ID. If you have a `<clip/>` inside the `<library/>` tag in the XML, its id=“blah” attribute will add it to an internal dictionary of linkage IDs, such that attachMovie() will be able to use it.
|
|
|
metadata
if i posted my xml could you tell me whats wrong with it?
|
|
|
metadata
|
|
|
metadata
[http://www.mediafire.com/?g4sotfmjtd2](http://www.mediafire.com/?g4sotfmjtd2)
can you download that and check my xml and stuff for why nothing is working right?
sorry i repeated myself
|
|
|
metadata
Well, you don’t have any mention of miniBoss.png or an id=“MiniBoss” or class=“MiniBoss” in your xml, so I don’t know how you can be expecting it to work. It should be about the same as the enemy ship stuff
|
|
|
metadata
is that the only xml problem?
|
|
|
metadata
You also have some stuff repeating which can’t be right. There shouldn’t be two clips with the same id attribute.
|
|
|
metadata
|
|
|
metadata
could you also look at the begining of my powerup.as to see if i used attach movie right?
|
|
|
metadata
Well, that’s the wrong place to put it… when you use attachMovie() to create a clip, the class associated with the ID you provided is instantiated. It makes no sense to attach from within the class, because that would either never run or it would make an infinite loop if there was an attachMovie() elsewhere
Check the shootorial code if you’re not sure where to put it
|
|
|
metadata
|
|
|
metadata
I was using the Flash trial, but as that ends in 3 days, I’m switching to this. This method actually seems to have a number of advantages for people who waste lots of time figuring out that they need to right click on some thing in the library rather than doubleclick on the movieclip on stage.
Anyway, I’ve downloaded your latest example and moved it to the folders and got the swf to run, but as soon as I tried to substitute my background for the shootorial background, when I run the build.bat, once swfmill is started I get the lovely windows “swfmill.exe has encountered a problem and needs to close” Any guess what that would be? My background is 2110 × 300, but it is probably a significantly larger file.
|
|
|
metadata
Did you make any changes at all to the XML? If so, try restoring the original file and changing the filename of your background image instead. It shouldn’t matter about the size or anything else.
If that doesn’t make a difference, I guess it could be some kind of annoying bug, but not one I’ve come across… try opening the file in an editor (not the one you originally created it in) and then saving it immediately; or try using [this updated win32 version of swfmill (2.2 MB)](http://www.explodingferret.com/hosted/shoot/swfmill-0.2.12.6-win32.zip).
|
|
|
metadata
Thanks! I hadn’t changed the xml, only changed filenames around, but for some reason the newer version of swfmill succeeded where the other one failed.
|
|
|
metadata
I shall change the first guide to point to this version, since this is the second major problem with the release version.
|
|
|
metadata
I don’t think I’m likely to make the contest deadline, but since I do want to finish my game at some point, I wanted to ask about animations.
Basically, I wanted to know if there’s anyway to use tweening with free tools? I am using GIMP for graphics and people use GAP to make animations, and I know you can use tweening for that. Would I be able to attach a GIMP animation sequence as a movieclip? Or would I need to run it, extract each frame to a separate file, and load each into the sources folder and add separately to the xml file?
Ideally I want both constant animations (flapping wings usually) and animations that happen in response to use input.
|
|
|
metadata
swfmill doesn’t support animated formats like GIF89a at this time. I had to convert it to individual frame images and put lines in the swfmill to load one image per frame of a movieclip (you can see I did this with the explosion clip if you look at my downloadable archive). GIMP probably has a feature to create all of these images for you, and most good editors have a way to generate lots of similar lines easily.
As for tweening, I have no idea! I don’t even know what they are. But you should check if it’s possible to use those directly from ActionScript by checking out the language reference or searching Google. Sorry I can’t be more helpful about that.
|
|
|
metadata
Thanks, that does answer my question. Tweening, btw, is what generates the intermediate images between two images (which you set as keyframes) where the parts of the image change, but don’t change relative to one another. I did look at the explosion animation you did, but this explained that you did what I thought you had to do—convert the image to individual frames. That could get very old with lots of them, lol, but still better than buying Flash.
|
|
|
metadata
ok how would i do the text box thingie in shootorial 7 i believe it is. i have all the code down but idk what to do from there
|
|
|
metadata
It’s just a matter of looking at the screenshot from Shootorial #7 and copying all the values from it. I haven’t tested the following, but it should work.
Inside your library section, put:
`<textfield id="RewardText" width="82" height="23" size="14" font="Comic Sans MS"/>
<clip id="RewardPoints" class="RewardPoints">
<frame>
<place id="RewardText" name="field" x="-41" y="-10" depth="16384/>
</frame>
</clip>
`
|
|
|
metadata
I found this too late to enter the competition, but your guide is very interesting. Thanks for helping us poor Windows-less souls.
I have a question: in Shoot.xml, why is there a need to give two different values for the depth of the background and everything else?
|
|
|
metadata
You mean this bit?
` <clip id="Background" class="Background">
<frame>
<place id="scrollingBackground.jpg" depth="16384"/>
<place id="scrollingBackground.jpg" depth="16385" x="2110"/>
</frame>
</clip>
`
Two place tags = two images. The depths are different because in flash, if you place two things at the same depth, one will overwrite the other (a common error when using attachMovie() in AS2; less so in Flash IDE because it automatically chooses them for you).
If the thing you’re asking is why there are two images, that is explained in Shootorial #2: it’s a cheap way of scrolling the background. If you don’t see how that would work, [check it out](http://www.kongregate.com/games/Kongregate/shootorial-2) (slide 8).
I’m sorry if I haven’t understood your question, it’s 5am here and I’m suffering from insomnia.
|
|
|
metadata
I am still a bit confused about the whole depth thing. In some parts of the xml, the ship, explosion, missile and one side of the scrolling background have the 16384 place id, but then after the library ending tag (I don’t know the name for anything, sorry) place you set them in order with different place id’s—I am guessing that the end place id stuff is like the layers at your root screen in the Flash IDE, and in the other places it’s like the numbers are describing movieclips within the movieclip?
I am wondering how I will identify the shield depth both in the library and at the end. In my game I also want a foreground that is above everything else—basically the “ship”/player is in a forest, and there is a background of trees but also individual trees that the “ship” and enemies go behind (momentarily obscured by the trees). I also want to put buds that blossom and turn into apples and fall to the ground that are on top of the trees as well as dark grey layer that covers things in a gloomy slime and fades as the player is more successful, so that would have to be on top of everything. In addition, the enemy ships would have a layer of slime over them, but I am guessing that would be a 3 layer movie clip (shield, ship, slime).
I’m not in a hurry for this, as I’m still working on graphics and have lots to do there.
|
|
|
metadata
nope it doesnt work. i think its how it says
` <textfield id = `
nvm you just forgot to end the quotations somewhere
i still cant get it to do anythign but i have to go ahead and submit my game so w/e
|