Help Me... Its The Bounds And Grass (:P) There Is The Problem
Hello my fellows!
I have a problem with bounds. I have seen HERE and when the blue stick brother there goes into grass he can not just walk over it. What AS should I write to do the same thing. I need bounds that also work with a moving background. Thanks
ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 09-08-2005, 03:07 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
GrAsS
So I just sketched this one blade of grass out and had the frames in a movie clip. I set two keyframes, used an envelope transformation and applied a shape tween (the intended effect is going to be grass waving in the wind)- however two of the veins on my leaf are switching...does anyone know why?
Thanks,
Rilian
Grass Movement
Ok Set myself the task of making a piece of grass move when the mouse goes over but can't seem to get the end of the grass to stay put.
So if for example you have a string with A and B as the end bits, I want A to move with the mouse and B to stay put.
So if you have any ideas please post/ I know we can do this!
Actionscripting Grass?
Hey people. I was thinking about making a script that would take a static flash graphic of grass (vector grass) and slowly bend/move it to the cursor's movement (simulating wind). Well, I had some ideas on how I was going about this, but the site in which I was gonna get scripting help from (levitated.net) sadly disappeared. If anyone has any idea how one would go about this or knows of a site that does something similar (hey, phong is down too!), please help out a friend. Until then, I will work my best. =) doh
Fun With Getting Rid Of Duplicated Grass
Alright, I lied. There's not much fun here. I'm sorry.
However, there is this crazy little issue: when my movie clip starts, I create a field of grass using this code:
PHP Code:
for (k=0; k<120; k++) {
_root.grass.duplicateMovieClip("grass"+k, grassdep++);
}
This works just swell, it makes sures everything is behind the grass at all times. Just one teensy-problem... how on earth do I get rid of it? On the last frame of my movie, I have a scores screen, and the grass must go! But, I cannot figure out how to dynamically unload every piece...
Well, thanks for any help. Hints are okay, too, I like to learn rather than just cut and paste
- wobbly
Greener Than Grass.....
I am brand new to Flash. I have a Coffee Cup flash program but I want to expand my horizons. I'm probably way over my head but I just ordered a Macromedia MX software bundle and would like to know the best place to go to start learning Flash MX. Should I go use tutorials, buy a book, go to school or repeatedly bang my head against the wall saying why why? Thanks for all considerations...
Easy Grass?
is there an easy way to create blades of grass (close up) and sorta make it look like paint strokes, so it tapers and is somewhat rough?
i really don't feel like drawing it all out...
How To Draw Grass
Does anyone know where I can download a flash file with grass in it or anywhere there is a tutorial to draw grass? I am kind of new with flash and the drawing of it with so many blades, etc. seems too drawn out and plus I find the drawing tool hard to use. Thanks for your help.
Grass Swaying
Yo, I have this picture and Im trying to get a swaying grass effect
I tried to get some transparent gifs in there but their animation sucked
can someone help me out?
heres the pic, do wat u want with it (cept steal it)
Swaying Grass
i am quite new to Flash MX and im trying to make something...but i dont know how to make the grass sway like the wind blowinga t it and it goes back and forth. yeah i dontknow how
can someone teach me??? i really need your help
Making Grass?
Hola,
I am a new flash user and am trying to make a game with the help of a software guy at the moment that is a football game, however I am trying to get a reasonible looking pitch but cannot seem to find a way to replicate grass? we have tried gradients (doesnt look too good) using a bitmap and tiling it (affected overall size of game app - needs to be small) and vector drawn blades of grass from illustrator though that made it too large as well.
Is there some sort of way to apply a "noise" style effect? or any way of drastically reducing an imported bitmap/jpeg etc tile from photoshop?
Any suggestions welcomed! thanks guys
IFD and "E"
Waving Grass
Hi - I'm trying to creat the effect of grass moving in the breeze - just a very subtle effect. I've tried importing the attached image, breaking it apart, and then using the envelope transformation tool, but I'm running into problems. It just doesn't tween right - it seems to keep the image from the last keyframe as well as show the transformed version on the next keyframe.
What is the best way to go about this? Any ideas would be greatly appreciated!
[F8] I'm As Green As The Grass At This
Hi, my name is Kim and will probably be a constant visitor here. I am trying to build a website, on it I want to have a beautiful front page with a creeper with flowers appearing (I am probably using the wrong lingo!) then the title appearing letter by letter. Then a main photo which will disappear and others appearing in its place,..then smaller photos underneath, entitled gallery 1, 2 3 etc. Now you have the picture in your head hopefully!!!!! My question is this, do you think a person who has not had much experience could do this? and would it be easier to make in Flash, frontpage, dreamweaver or Swish. I have access to all programs, and don't know which one to put most of my effort into?
Can I use all of these and combine?......take care for now.....Kim
Help With Grass Tutorial
Hi,
i want to create a shadow effect in animation using flash. I was wondering, are graphics the only type of symbol that one can do shape tweens with? Thanks in advance
Swaying Grass
Does anyone know how to make the grass the kirupa made in his tutorial sway as if in a breeze? I don't want the grass to follow the mouse or the position of the grass to change at all, just the tops to sway.
Regards
Some Grass Questions
Hey Guys & Gals,
I just have a few questions for you all....
I plan on making a plant based website and would like to have grass swaying in the wind.....but I really want the grass to be a nice quality grass (i.e. Photoshop grass tool type grass like lostinbeta's old sig ) But I would like this to have a natural sway effect does anyone have an idea how I would go about doing this?
Thanks for all the past help, and hopefully future help!
Case
Grass Effect - Help Please
Hi guys,
Found a fla which had a grass effect happening. I have played around with the code and have made the grass spread the way I would want it to be.
I just don't want the grass to be generated dynamically, I want to use a PNG of a blade of grass I have created instead. You can see it in the attached FLA.
I want the PNG of the black blade of grass to replace the dynamic green grass. And if possible, does anyone know how to stop the jittering of the grass? When the grass is not swaying from side to side, it shakes pretty quickly, does anyone know how to change that?
Thanks for your help
Help With Grass Tutorial
Hi,
i want to create a shadow effect in animation using flash. I was wondering, are graphics the only type of symbol that one can do shape tweens with? Thanks in advance
Swaying Grass
Does anyone know how to make the grass the kirupa made in his tutorial sway as if in a breeze? I don't want the grass to follow the mouse or the position of the grass to change at all, just the tops to sway.
Regards
Moving Grass
Hi everyone,
Yet again I have a question for all you better designers.
I am trying to make a header for my site in which I have some grass blowing in the wind. I've tried using all vector grass and it didn't turn out well so I am now using the grass looking brush that comes default with Photoshop 7 & CS. Has anyone got an idea as how I would make all the grass sway in the wind?
-Neverrain
Moving Grass
Hi there,
I am trying to do something probably very easy, however I am new to this. I want to know how to get my grass duplicated and then to get it to move as if the wind were blowing. Is this posible?
Thanks for anyone's time,
Miensa
Simulate Grass Blowing
Hi, I want to simulate a blade of grass blowing randomly in the wind, but not by shape tweening, any ideas?
Windy Grass Effect
hi guys,
i have an image of a sign stading in a field and i want to create the effect of the grass blowing in the wind, does anybody know how to do this?
this is a link to the image http://www.stockxpert.com/browse.phtml?f=view&id=23430
thanks
andy
Make Grass So It Is Waving Around?
hey all,
I just wanted to see, is it possible to make grass on the ground of a flash document, and make it wave around?
Because I want to make a banner and it is for sport, and I want grass to be waving around, then a soccer ball bounce past the screen. Then The soccer ball to zoom past the screen from the opposite direction really fast, and leave the words of my website after it.
Anyway, can anyone help?
Addi
Waving Grass... How Am I Gonne Do That
im curently creating a cool header to a site, and to top things off it would be realy cool to have moving/waving grass... is there anyone that did this or has an tutorial on how to create this???
HELP NEEDED PLZ About Grass Tutorial
hey, well i've followed the grass tutorial in special effects on kirupa.com. it all works fine and well BUT the trouble i have is i want to stop the grass movie clip after a certain frame, because its in scene 2 of my cartoon and jsut continues. the mc only uses frame 1 of my scene 2 but how would i go about stopping it?
Make Grass So It Is Waving Around?
hey all,
I just wanted to see, is it possible to make grass on the ground of a flash document, and make it wave around?
Because I want to make a banner and it is for sport, and I want grass to be waving around, then a soccer ball bounce past the screen. Then The soccer ball to zoom past the screen from the opposite direction really fast, and leave the words of my website after it.
Anyway, can anyone help?
Addi
Windy Grass Effect
hi guys,
i have an image of a sign stading in a field and i want to create the effect of the grass blowing in the wind, does anybody know how to do this?
thanks
andy
Stop ENERGETIC Grass Growing Up HELP
Dear All,
The grass in this file keeps growing up even it is out of document size of 600x350px. However, I want them to be grown only inside the document size. Could anyone help me to stop this energetic grass growing when it is out of the document size?
Thanks in advanced
I zipped this file into
www.delvetica.net/solution/fh002.html
Remember A Growing Grass Anim?
Hi there.
I remember once seeing a site that featured, via flash, a growing grass animation. I've been asked to do something similar but can't remember this site anymore!
Does it ring a bell with anyone?
also, are there any clever ways to make bitmaps wave and sway in flash? I can't think of a way besides doing it vector-based.
thanks for any help!
SS
Simulate Wind Through Grass Or Hair?
Hi, I'm trying to make it look as though there is a breeze blowing through hair. Has anyone seen this done or know how to do it? I'm guessing I would affect one blade of grassMC then duplicate??? THANKS!
Grass Effect Help And Some Other Minor Stuff
Hi Hi can some one help me out on this. I have created a nice scenery but I added the grass effect in it but it doesn't goes all the way across the X-axis. I know in the tutorial it's using 300 X 200 dimension but I am using 550 X 400. So how would I go about changing it.
And also can someone teach me how to create random popping circles. The circles will fade in and fade out (I know alpha must be used here) randomly all over the screen. I am not really a actionscript pro but I am willing to learn. (i only know how to create buttons T_T)
Help please, Thanks In advance
Lawn Mowing, Blades Of Grass
Hello all,
Okay, I have a problem. I am making something which there is a lawn mower, and it mows grass (uduh!). Don't ask what it is...
Anyways, the lawn mower is just a rectangle. The lawn mower moves around on the screen, on an area of grass. Now, what would be the best way to figure out how many blades of grass it has mowed? Attaching 160,000 blades of grass movie clips (1 pixel each on 400x400 area) and performing thousands of hitTests per frame isn't a good idea. I need to show the path of the lawn mower (A darker color than the grass means its already been mowed).
So how Would I figure out how many blades of grass it has mowed. This means that if the lawn mower goes over the same position twice, it can't mow those blades of grass again.
What is the best way to achieve this?
Thanks,
Jon
Creating A Swaying Blade Of Grass In AS
Hey there all-
Im trying to create a swaying piece of grass using the easing equation, but I think I'm getting it all wrong. Heres what I have, but it doesnt work at all:
ActionScript Code:
blade._rotation=0;blade.onEnterFrame = function(){ if(this._rotation < 1){this._rotation +=(20 -this._rotation)/10;} else if (this._rotation > 10){this._rotation +=(0 -this._rotation)/10;}}
Is there an easy way of creating a swaying blade of grass. Thanks for the Help!!!
Grass Effect Help And Some Other Minor Stuff
Hi Hi can some one help me out on this. I have created a nice scenery but I added the grass effect in it but it doesn't goes all the way across the X-axis. I know in the tutorial it's using 300 X 200 dimension but I am using 550 X 400. So how would I go about changing it.
And also can someone teach me how to create random popping circles. The circles will fade in and fade out (I know alpha must be used here) randomly all over the screen. I am not really a actionscript pro but I am willing to learn. (i only know how to create buttons T_T)
Help please, Thanks In advance
Get Bounds
hey pplz, is get bounds used for games????
coz i want to know how to make it so that when my character moves over a hill he will go over the hill and walk up a little, if u know wot i mean.
also , this has no relation lol , how duz Xiao Xiao make it so that when u push that button, it slows the frame rate and it goes in slow motion ( XIAO XIAO 3 )
thanx pplz
Skribble
_______________________________
www.skribblinteractive.tk
Out Of Bounds?
Hello... If a user drags a piece off the screen my program goes crazy.
www.enjoychess.com. Grab a piece and take it all the way to the edge of the screen and you will see what I mean.
I have event handlers and boundaries set and they work, but when the user takes the piece all the way to edge it goes nuts.
Any idea? Thanks!!
I am using flash mx 2004 pro
ANDY
Bounds
Hello,
I have a big problem in my game. I can not make bounds! In a way I can but not in this case. The problem that it's the background that is moving, not the car. So I would really appreciate if someone could explain me how to do it.
Thanks.
Here is the script I put on the background (the car is called "bil") :
onClipEvent (load) {
speed = 8;
}
onClipEvent (enterFrame) {
if (key.isdown(key.LEFT)) {
_x += speed;
}
if (key.isdown(key.RIGHT)) {
_x -= speed;
}
if (key.isdown(key.DOWN)) {
_y -= speed;
}
if (key.isdown(key.UP)) {
_y += speed;
}
}
onClipEvent (enterFrame) {
if (_root.bil.hitTest(_root.Wall4) or _root.bil.hitTest(_root.wall5) or _root.bil.hitTest(_root.wall6) or _root.bil.hitTest(_root.wall7) or _root.bil.hitTest(_root.wall8) or _root.bil.hitTest(_root.wall9) or _root.bil.hitTest(_root.wall10) or _root.bil.hitTest(_root.wall11) or _root.bil.hitTest(_root.wall12)) {
speed = 0.1;
} else {
speed = 8;
}
}
And this one on the car :
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_rotation = 90;
}
if (Key.isDown(Key.LEFT)) {
_rotation = 270;
}
if (Key.isDown(Key.UP)) {
_rotation = 0;
}
if (Key.isDown(Key.DOWN)) {
_rotation = 180;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP)) {
_rotation = 45;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP)) {
_rotation = 315;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {
_rotation = 135;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {
_rotation = 225;
}
}
Repeating/duplicating Images With Scripting To Make A Field Of Grass
i'm trying to create a field of rye grass that scrolls by continously. I think it would probably be easier with actionscripting to make the one image of grass duplicate itself many random times in order to make an appearance of a field that scrolls by. i can't figure out how to do this though. help?
Scrolling Bounds >?
hey ,
i have a mc called pic ,i am tring to have it appear at the _x pos when it scrolls out of the 300 width area to start over again ..
here is what i have for the arrow keys ..
*********i didnt add any of the code examples for the _x pos ..but the stage is 300x50
Code:
myListener = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 37) {
picture._x -= 2;
}
};
Key.addListener(myListener);
myListener = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 39) {
picture._x += 2;
}
};
Key.addListener(myListener);
cheers ..
Bounds For DraGging
Does anyone know how to create bounderies for a dragable object, so when the side of it gets to the bounderies it stops moving on either the X or Y axis depending on where ti hits?
thanks in advance
-Stwelin
[F8] Get Bounds - Whole Screen
I remember reading this code somewhere but now I canīt remeber or find it. If You want to have the "get Bounds" from the whole screen. So if You have a swf with many drag-objects. So the user doesnīt by accident drag something outside the screen and canīt find it again.
Bounds:Object
Hi
I need to check the bound of a rotating object. The code below has two versions: A) rotates the block itself and B) rotates a block within the movieClip. Only B works but for the purposes of my game I need A to work.
I've attached the test app.
Code:
var bounds:Object;
function rotationControl(evt:Event):void {
// A
this.testBlock.rotation += 5
//
bounds = this.testBlock.getBounds(this.testBlock);
this.guideLine1.x = this.testBlock.x + bounds.x;
this.guideLine2.x = this.testBlock.x + bounds.x + bounds.width;
// B
this.testBlockB.block_gr.rotation += 5
//
bounds = this.testBlockB.getBounds(this.testBlock.block_gr);
this.guideLine3.x = this.testBlockB.x + bounds.x;
this.guideLine4.x = this.testBlockB.x + bounds.x + bounds.width;
}
this.addEventListener(Event.ENTER_FRAME, rotationControl);
Thanks
[CS3] Scaling With Bounds
Hey all, I'm trying to create a function to zoom/in out on a map with bounds using a scrubber. Was wondering if anyone has ever run into a similar situation/solution. What I have so far doesn't seem to quite work:
PHP Code:
function onZoomAdjust(pct:Number):void {
var cx = stage.stageWidth/2 - map.x //determine center point of map on x
var cy = stage.stageHeight/2 - map.y
scale = maxScale * pct + minScale //new scale pct based on slider
var tx = (cx * scale)/2 //translation of x
var ty = (cy * scale)/2
map.x = tx;
map.y = ty;
map.scaleX = map.scaleY = scale
}
It gets me pretty close but there's no control to stop the user from zooming out of bounds. Is this the sort of thing I need to use a matrix for?
Thanks
Bounds In Flash?
i have a "circle_mc" movie clip and its registratoin is in the center but it moves and works fine but i dont want it to go off the stage half way i want it to stop before it goes off
anyone?
ActionScript Code:
circle_mc.onRollOver = function() {
this.dx = Math.round(Math.random()*Stage.width);
this.dy = Math.round(Math.random()*Stage.height);
this.onEnterFrame = moveIt;
};
function moveIt() {
this._x += (this.dx-this._x)/10;
this._y += (this.dy-this._y)/10;
if (Math.round(this._x) == this.dx) {
this._x = this.dx;
}
}
-aldo
StartDrag Bounds
So I'm doing what I would normally do in AS 2 and it's not working. On press of my clip I am getting
Code:
Argument count mismatch on flash.display::Sprite/startDrag(). Expected 0, got 6;
Live docs don't have an example on how to set bounds.
Does startDrag not take any parameters?
Any links or anything?
TIA
Expand Out Of Bounds
Given a flash file with dimensions, like 300x400 embedded on an xhtml page, is there a way to allow the content to spill out of the box and over other elements? Ive seen this done on ads, but I want to use it for a navigation. Does anyone know how they do it?
Expanding Beyond The Bounds...
I'm attempting to do some Rich Media design, and have run into a snag. I have a banner (768x90) that will expand once hovered over. Best example I've run into is something like THIS where it expands from the 90 high to about 270 total. There's a lot of other examples at PointRoll under the FatBoy category.
I need help on how to get the additional content to display outside of the original Flash file. It appears as though it's all one file, the 'bounds' of the stage simply expand to accomodate it, but I can't figure out exactly how to get this done.
Thanks in advance.
Mouse Bounds
I currently have a Nav that I am working on that will follow the mouse's _y position. I am wanting to have bounds set that keep the nav in between certain top _y and bottom _y, but am lost on how to do it.
I have tried applying the same techniques that I would to create bounds for a Dragging menu (define top and bottom bounds) but it didn't work with the mouse position.
Here is the code so far that makes the menu follow the mouse:
speed = 25;
menu_mc.onEnterFrame = function () {
target_y = _root._ymouse - this._y;
this._y = this._y + (target_y/speed);
}
Any help would be appreciated.
Thanks,
--
Michael
|