-
Okay, to start off I have a movie with an image as the background. It has a sound when you click on it (a bullet shot sound, to be precise). But now I want, when you click on the image, a image appeareces. I've made a bullet hole image so it looks like your shooting the image! This is a fun game I'm creating, but I don't know how to make the image I created apperear when you click on the background image!
I've worked out most of the stuff I have to know to finish this movie, but not the image that apperears after you click on the image!
NOTE: This is not related to any terorists or anything to do with people, it's a game I'm makeing with people as the background from a nother game (Red Faction, to be precise).
So can someone please help me out here?
Thank you in advance!
ASH...
-
You can do that by duplicating the bulletHole MC every time the mouse is pressed, something like this:
Code:
_root.onMouseDown = function() {
_root.attachMovie("bulletHole", "bulletHole"+(++name), name);
currentHole = "bulletHole"+(name-1);
currentHole._x = _root._xmouse;
currentHole._y = _root._ymouse;
}
In the library, set the "Linkage" property of the MC you want to use as a bulletHole to "export for actionscript" and give it the name "bulletHole" (no quotes).
You might need to change this line:
currentHole = "bulletHole"+(name-1);
to:
currentHole = eval("bulletHole"+(name-1));
If it doesnt work.
-
problem... the actionscript thingy ain't accsesable!
-
-
Here's a screenshot for you!
-
sorry i'll upload onto a new server!
ASH...
-
Again... A Screenshot For You!
[img]http://communities.msn.com/_Secure/0RAD**wcZNF3KruQtIMnoBa8k2PgWaRlhJEbtpyQeFwV9WWoP7 KkSKEttiu*chah8ZppSebHlHCBrVgg8cGyWVqy2NSVW981nvDI YeQUXMeU/flashscreen1.jpg[/img]
-
-
-
The image needs to be a movie clip.
-
-
ok, who the bullet hole appereses but only in the top left corner! Not where the mouse coursor is
-
Try chainging the code to:
Code:
_root.onMouseDown = function() {
_root.attachMovie("bulletHole", "bulletHole"+(++name), name);
_root["bulletHole+(name-1)]._x = _root._xmouse;
_root["bulletHole+(name-1)]._y = _root._ymouse;
}
-
nope sorry still stays in the corner
-
Here, try it now, I forgot the closing quotes before.
Code:
_root.onMouseDown = function() {
_root.attachMovie("bulletHole", "bulletHole"+(++name), name);
_root["bulletHole"+(name-1)]._x = _root._xmouse;
_root["bulletHole"+(name-1)]._y = _root._ymouse;
}
-
Nope
-
If this doesnt do it then I dont know what to try. Its 1am here and I cant think right now.
Code:
_root.onMouseDown = function() {
_root.attachMovie("bulletHole", "bulletHole"+String(++name), name);
_root["bulletHole"+String(name)]._x = _root._xmouse;
_root["bulletHole"+String(name)]._y = _root._ymouse;
}
-
All that happerns is that the bullet hole appereses in the corner, so which fram am i ment to put it in?
-
Does the "_root" command mean anything? or is it just there to look good?
-
Nope, still not working
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|