USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 6/12/09 05:44 PM
Sign-Up: 05/04/08
Posts: 122
What i want to do is when i click it comes out bullets where ever i aim. im gonna do that by putting in frame:
new MovieClip (_root.Bullet) onMouseDown = function() { add MovieClip (_root.Bullet){ _root.Bullet.moveTo(_xmouse,_ymouse) } }
But it seems im doing something wrong. i have a bullet movieclip in library but not on stage. Linkage = Bullet Any help?
saunich's the name, speeds my name | speaking japanese is like playing through fire and flames at expert on guitar hero.
Posted at: 6/12/09 05:49 PM
Sign-Up: 01/11/08
Posts: 403
At 6/12/09 05:44 PM, Pippatchu wrote: What i want to do is when i click it comes out bullets where ever i aim. im gonna do that by putting in frame: new MovieClip (_root.Bullet) onMouseDown = function() { add MovieClip (_root.Bullet){ _root.Bullet.moveTo(_xmouse,_ymouse) } } But it seems im doing something wrong.
What language is this? Check out Actionscript 1,2 or3.
"Even if it's just cynicism that remained to push us ahead, we'll carry on!"
Posted at: 6/12/09 05:51 PM
Read the title. actionscript 2 .
Posted at: 6/12/09 05:55 PM
Sign-Up: 07/27/07
Posts: 690
That, my friend, was not actionscript 2. At least try and stick to the language you want to use.
::Robert and Sherman::
Posted at: 6/12/09 05:59 PM
Sign-Up: 06/10/08
Posts: 2,745
wtf that is psudeo code if anything, dunno where he got that from
Posted at: 6/12/09 06:00 PM
Sign-Up: 03/02/02
Posts: 13,466
onMouseDown = function() { var myBullet:MovieClip = attachMovie("Bullet"); myBullet._x=_xmouse; myBullet._y=_ymouse; }
or something along those lines, I didn't test it out.
where did you get this 'add MovieClip{}' syntax from? and moveTo is for the drawing api, not positioning. Did you browse the reference manual looking for code segments that might randomly apply to what you want to do?
Posted at: 6/12/09 06:03 PM
onMouseDown = function() { var newMc:MovieClip = this.attachMovie( "Bullet", "", this.getNextHighestDepth()); newMc._x = _xmouse; newMc._y = _ymouse; } }
That should work better although I am tired and I'm used to AS3 so I dunno
Posted at: 6/12/09 06:06 PM
Damn, ninja'd. What he said.
Posted at: 6/12/09 06:24 PM
At 6/12/09 06:06 PM, StaliN98 wrote: Damn, ninja'd. What he said.
yours actually works though, I forgot the extra params for attachMovie ;)
Posted at: 6/12/09 09:50 PM
Sign-Up: 07/20/07
Posts: 412
For one, you need to use better syntax. I haven't used flash for a month or so, but I've been doing PHP and just forgetting to add a semi-colon at the end can screw up your code.
All times are Eastern Standard Time (GMT -5) | Current Time: 03:28 PM
<< Back