Search:
Type: Posts; User: ZippyDee
Search:
Search took 0.05 seconds.
-
So, I'm trying to make a flash vector drawing program similar to the interface that Flash itself uses for shapes, etc. It would obviously not go nearly as in-depth as Flash does with its...
-
just have an array of all the sources of the images
imgArray=["img1.jpg","img2.jpg","img3.jpg"];
then tell it to load one of those
curImg=imgArray[random(imgArr.length)];...
-
oh, of course. How stupid of me.
myTextVar2=myTextVar;
for(i=0;i<Wordarr.length;i++){
var word=Wordarr[i];
var indx=myTextVar2.indexOf(word);
...
-
put this line right after the line "var indx=myTextVar2.indexOf(word);"
if(!(myTextVar2.charCodeAt(indx-1)>=97 && myTextVar2.charCodeAt(indx-1)<=122) &&...
-
onPress(){
//put it here
}
-
Hmmm...
myTextVar2=myTextVar;
for(i=0;i<Wordarr.length;i++){
var word=Wordarr[i];
while(myTextVar2.indexOf(word)>-1){
var indx=myTextVar2.indexOf(word);
...
-
You can use the same concept as what I wrote above, only set the minDistX, maxDistX, minDistY, and maxDistY differently. You would probably want it to look at the dimensions of the background and...
-
well, the following your cursor is easy. Just use [whatever the movieclip is].startDrag(true);
Also, Mouse.hide() will make the mouse pointer go away, too.
The shooting bullets is more...
-
-
for(word in Wordarr){
while(myTextVar.indexOf(word)>-1){
var indx=myTextVar.indexOf(word);
...
-
instead of "this._xmouse", use "(this._width-this._xmouse)"
-
just put this code on the frame:
stop();
var keylistener:Object=new Object();
keylistener.onKeyDown(){
if(Key.getCode==Key.SPACE)
gotoAndPlay(<nextframe>);
...
-
for each word in array1
while currentword is still found in the text
i=position of currentword in text
newText=substring of text from 0 to i-1
newText+=random word...
-
var numberOfLayers=3
//here you set your speeds.
trees1.speed=1/40;
trees2.speed=1/60;
trees3.speed=1/80;
//instead of tracking mouse distance on each frame, we'll keep track of
//the total...
-
Wait, I think I may have misunderstood what you were asking for. I thought you meant that you wanted the car with the wheels falling off to be at the position that you clicked the mouse.
Alright,...
-
First of all, the "||" means "or"
Try this code then:
clicked=false;
over=false;
this.onRollOver=function(){
over=true;
}
-
put this code on the first frame of the movieclip
clicked=false;
this.onEnterFrame=function(){
if(clicked || hitTest(_xmouse,_ymouse,false))
this.gotoAndStop("red")
else
...
-
when you're adding a tile, just use
[whatever the tile].onRelease=function(){
//stuff to do on click
}
-
just add this to the end of your script.
if(!touchingGround) this.gotoAndStop("spring");
-
Give the car movieclip an instance name (I'll just use "car") and put this in your main timeline.
_root.onMouseDown=function(){
car._x=_xmouse;
car._y=_ymouse;
delete...
-
I'm not really sure what you mean about adding a SWF inito XML scripting. Could you explain a little more?
It would be helpful if you could post the .fla (or a stripped down version of it) or the...
-
For your first question, you just need to check that none of the keys are pressed AND the character is on the ground:
if(!(Key.isDown(Key.UP) || Key.isDown(Key.DOWN) || Key.isDown(Key.LEFT) ||...
-
The Math.random() function randomly returns a number between 0 and .99999...
The line Math.random()*300 will generate a random number between 0 and 299.9999...
However, you don't want this...
-
Ahh, I think I found it!
Instead of this:
for (var i = 0; i<_root.platforms.length; i++) {
if(this.hitTest(_root[_root.platforms[i]])){
grounded = true;
...
-
if(mc._width>=Stage.width){
if(mc._x+(mc._width/2)<Stage._width)mc._x=Stage.width-(mc._width/2);
if(mc._x-(mc._width/2)>0)mc.x=mc._width/2;
}
same concept goes for _y and height/_height
|
Click Here to Expand Forum to Full Width
|