@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18



Comments:

<0> 1, onClipEvent is deprecated in favor of movieclip.onEnterFrame ... and 2, you can't put onClipEvent on a frame, has to be on a movieclip
<1> oooh, okey
<0> so, it would be this...
<1> :)
<0> _root.ball.onEnterFrame = function() { if (Key.isDown(Key.DOWN)) { this._y -= 10; } }
<1> hm.. why _root.ball.onEnterFrame = function() ?
<2> damnit, my onLoad isn't working
<1> I don't doubt it, I'm just trying to learn what I'm actually doing :P
<0> well, you're telling the ball that you want something to happen every frame, and it only affects the ball ... but your code is on your timeline so it's centralized
<0> if you're asking why do you have to do mc.onEnterFrame = function(), that's because you have to write a function for the onEnterFrame to run
<0> you could also do, someFunction = function(){ //do stuff } and then do _root.ball.onEnterFrame = someFunction;
<1> ah, okey
<1> thanks :)
<0> no prawblum
<1> trying to use it with hitTest()
<1> I've gotten 2 mc's to "collide" (text notifying), but I've always written the code inside the mc's to do it the easy way



<2> logo_mc.onLoad = function () { trace ("it works"); } <- this should work if logo_mc is loaded, right?
<1> so, should: if (_root.ball, hitTest(_root.box)) {, be inside: _root.ball.onEnterFrame = function() { /* ... */ }, as well?
<0> bugiam: i don't believe so, i don't think onLoad works for mc's like that
<2> ok,. cause it doesn't right now.
<2> i'm loading a jpg into a CreateEmptyMovieClip, and onload doesn't work
<0> bugiam: use the MovieClipLoader cl***
<0> it has an onLoad or something similar
<0> i think it's onLoad hehe
<3> how do i make a link open a page with a specific size and without the IExplorer Buttons? :)
<3> whats the action?
<3> anyone know?
<0> Jennavive: getURL("javascript:window.open("page.html", "_blank", "height=400,width=300,toolbar=no,menubar=no");");
<3> thanks!
<3> :D
<3> Fear your rock
<0> google the javascript window.open command for more options in that 3rd param
<3> ok cool :D
<1> FearX: sorry to bother you, but should this be inside _root.ball.onEnterFrame = function() { /* here */ } ?
<1> if (_root.ball, hitTest(_root.box)) { _root.debug = "Touch!"; } else { _root.debug = "Nothing!"; }
<0> yeah
<0> but
<0> you don't need _root.ball inside that if() ...
<0> it could just be if(hitTest(_root.box))
<0> or maybe you can do if(this.hitTest(_root.box))
<1> hm.. that doesn't sound logical if it's not in the mc :S
<0> why not?
<0> if(_root.ball) checks to see if _root.ball exists
<1> oooh, wait, now it does :D
<0> but, if you've put that inside _root.ball.onEnterFrame, of course it exists
<1> I had to re-read the code :)
<1> yup, exactly :)
<1> but..
<0> or, if it doesn't it won't execute
<1> but, I drawn 4 lines around the ball on its own layer, I converted the box into a mc (instance: box), but _root.debug always says "Touch!" even if it's not touching the lines
<1> *I've drawn..
<0> no clue .. this would be an instance where i'd need to see it to understand what it's doing
<1> there's no code in the ball or box
<2> thanks FearX, MCL worked great
<1> only in a layer called "Action"
<0> bugiam: cool
<2> what's the diff between mc.height and mc._height?
<4> a _
<0> bugiam: i believe there is no mc.height, but there is Stage.height
<2> ok, cause mc.height gets color coded.
<2> aah, sorry, i misinterpreted you
<2> ok, i see
<5> :( i wan't my kidz bop CD
<6> whats up
<6> I have a quick question, I have a movieclip of my bullet, and I want to add additonal properties to it such as a boolean for alive, and velocity/angle
<6> how do I add additional properties to a movie clip
<2> mc.velocity = 10; ? :)
<6> that wasnt working
<6> There is no property with the name 'xInc'.
<6> ("mLaser" + laserCount).xInc = 1;
<1> FearX: would you mind taking a look at a pastebin I added?
<1> http://pastebin.sekati.com/?id=hitTest@d79c6-1229ac2-t
<7> HaZnO, its inside the bounding box of the lines
<1> yes
<1> but even when I move it out of the box, it still says "Touch!"
<7> try if(this.hitTest
<1> ah, that worked, thanks :)



<6> hello, im trying to make my spaceship shoot lasers
<7> np
<6> whats the best way to go about generating laser
<6> lasers*
<6> im using duplicateMovieClip
<1> but, how do I fix the issue that it's "hit" when it's "inside" the box? :\
<6> but I need additonal properties on that movie clip, such as angle, if the bullet is still alive, etc
<0> HaZnO: do ... if(this.hitTest(_root.box)) ... and change all your _root.ball actions to this
<0> distinctd: pastebin (see topic) your code, and paste the url here
<1> okey, thanks
<0> when you do _root.ball.onEnterFrame = function(){ //you can just do; this._x +=10; } .. which would make _root.ball move right 10 pixels every frame heh
<1> hehe :P
<1> but how can I make the box "transparent" so that it wouldn't "hit" when it's inside the "walls" :P
<0> so you don't have to write _root.ball for every action .. this is really useful when you have something like _root.mc[somethingElse].blah.whatever[crazyness].onEnterFrame
<0> HaZnO: that might mean using 4 different mc's, one for the top bar, left bar, right bar, bottom bar of the overall "box"
<1> hehe, yeah, I know that actually, it's just that I copy-pasted the code from outside the function :P
<6> can anyone help me?
<1> hm, okey, I was afraid so
<0> distinctd: i already answered you
<0> [00:07:50] <0> distinctd: pastebin (see topic) your code, and paste the url here
<6> oh ok
<6> http://pastebin.sekati.com/?id=flash****@2932c-a2603ca2-t
<6> we duplicate a laser
<6> but that laser needs info on where to go
<0> that's OLD OLD OLD code
<6> are u talkin to me?
<0> ja
<6> ok
<6> what should we be doing
<6> you undestand what we are trying to do
<0> yes
<6> we are idiots lol
<0> hehe, ok
<6> the graphics are nice tho
<7> distinctd, is that from the spaceship game tutorial on flash kit?>
<6> nope
<6> from scratch
<6> + google help
<6> + FearX help soon
<6> :)
<6> ;)
<0> ok, take your first setProperty ... this could just be written as this._parent["mLaser"+laserCount]._x = mShip._x;
<6> ok..
<0> so, no need for setProperty ... this would mean that you could do this._parent["mLaser"+laserCount].xInc = Math.cos(mShip._rotation);
<6> ok
<0> i believe it's this._parent for the scope, it should work, if not, and if your lasers are all on the _root, then just to _root["mLaser"+laserCount] instead of this._parent["mLaser"+laserCount]
<6> ok root is working :)
<6> lemme see if i can use xInc
<6> THank you so much we got what we needed!
<6> if i have any more questions I know who to ask lol
<0> congratulations :D
<0> wait til you get my bill lol
<6> lol
<6> need my address?
<6> 1 more quesion
<0> sure
<6> does this look like it should work
<6> _root["mLaser"+laserCount].xInc = Math.cos(angle) * 15;
<6> _root["mLaser"+laserCount].yInc = Math.sin(angle) * 15;
<6> angle is the angle the ship is facing
<0> as logn as angle is set
<6> but im talking about the math
<6> is the cos and sin correct for what we are doing?
<0> oh, that i'm not sure about, i always have to play around with the cos and sin when i use them to get what i want... i understand what they do and what they're for, but i have to see what it's doing to adjust my code
<0> is it not working right?
<6> now we got it
<6> Math.cos wants radians
<6> not degress
<6> thanks :)
<0> yeah that's true
<3> Fearx i copied and pasted getURL("javascript:window.open("page.html", "_blank", "height=400,width=300,toolbar=no,menubar=no");");
<3> and it wont do anything
<3> does anyone know how i can make a link open up a page in its own window sized at a sertain size without the toolbar?
<3> the action?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #flash
or
Go to some related logs:

#fedora
greek mithology goddess
#politics
#freebsd
#gentoo
#computers
#unixhelp
quotes hate cisco
#dreamweaver
#cisco



Home  |  disclaimer  |  contact  |  submit quotes