Search:
Type: Posts; User: jbum
Search:
Search took 0.07 seconds.
-
Hey Simon,
I haven't seen any examples like this, but I have a pretty good idea how I'd implement.
I'd first generate a bitmap which corresponds to the surface the ant is travelling on. The...
-
To react to relative mouse position, use this
this.vx = (this._x - _root._xmouse) * 1.5;
this.vy = (this._y - _root._ymouse) * 1.5;
To answer your second question. I'm not sure there is...
-
There are basically three fixes you need to do. First, comment out the lines that read
this.startDrag(false);
and
this.stopDrag();
Next, near the bottom of the script there are two lines...
-
Note: Offering money for services is against board policy. Closing this thread.
-
A method I commonly use (which works like a global string replace on the string) is:
yourString.split( 'seachString' ).join( 'replaceString' );
This was one of a collection of useful...
-
I added a few lines to the end of your snow script:
onClipEvent (load) {
movieWidth = 700;
movieHeight = 140;
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
-
I was able to simplify your onEnterFrame handler by using a few trig functions.
// USEFUL CONSTANTS
kCorrection = 180; // This is only needed because your cannon is pointing to
...
-
theta is the angle of your current spot in the spiral - you just need to convert it from radians to degrees.
_root["t"+step]._rotation = theta * 180/Math.PI;
- Jim
-
messageString = "<NEW_CLIENT userName = \"" + userName + "\"/>";
-
Cool! Glad you were able to get your hands dirty :)
-
Or just bite the bullet.
ary = [D1_H0_CUM, D1_H0_SWE1, D1_HO_SWE2, // etc... ];
And next time, name your variables consistently to avoid this kind of nonsense.
-
Let's say R is the percentage loaded - most preloaders compute this at some point.
Let's say OX, OY are the original (random positions) of the movie clips. If you haven't stored these in...
-
Aww c'mon, writing parsers is fun!
Here's a quick & dirty one I just wrote for you.
This one uses reverse polish notation, and accepts formulas such as
2 2 +
2 2 * 4 +
-
Thanks. Keep in mind that it's not the color that is the problem - it's the double-spacing and indenting.
-
Change this bit:
getURL(linkArray[i],"_blank");
to this:
getURL(linkArray[this.i],"_blank");
-
Just wanted to mention that the [ as ] tag bugs are a big reason for my recent inactivity here.
Just too irritating to have to post unreadable code in an actionscript-centric forum.
-
He's probably doing it in an enterframe handler, like so:
onClipEvent(enterFrame)
{
if (Key.isDown(Key.LEFT))
{
// handle left key
}
if (Key.isDown(Key.RIGHT))
-
The article is suggesting that in place of a loop or recursive function (or other code which takes a long time), you replace it with an onEnterFrame handler, or a function called via setInterval...
-
Unlike some other languages (like Perl), actionscript does not provide a function for parsing and executing arbitrary actionscript code. In other words, this does not work:
result = eval("2 *...
-
When you hit a horizontal wall, reverse the horizontal velocity, and leech off a little of the energy.
For example:
// hit left wall?
if (this._x < 0) {
vel_x = -(vel_x * .8);
}
The...
-
I think you want about 77% - not 70%.
1/1.3 = .769
If you post your circle drawing code, I can show you how to modify it to draw the circle at any location.
-
Assuming all these variables are attached to the _root timeline, you can do this:
timeRemaining = _root["timer" + theRound];
-
First off, to round a number up to the next 100, you would do this:
n = Math.ceil(n/100)*100;
In your case, however, you don't want to round to 100. In the case of 1152, you want to round to...
-
Yeah, change this line as follows:
this.arrow._rotation = Math.atan2(dy,dx)*180/Math.PI + 90;
-
Cool - remember that your arrow must point to the RIGHT when it is at zero rotation, in order for that code to work.
|
Click Here to Expand Forum to Full Width
|