A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Waving Grass

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    4

    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!
    Attached Images Attached Images

  2. #2
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    post the FLA so i can see what's happening (if you're using Flash 8, save it down to MX04 before posting)
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Posts
    4
    Hi, Thanks for taking a look at this. Here's the fla.
    Attached Files Attached Files

  4. #4
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    ok... i ended up creating this for you instead.... hopefully this will help you. It just duplicates a swaying blade of grass randomly across the stage with random _height, _width & movement.... test it a few times, it will always be different.
    Attached Files Attached Files
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  5. #5
    Junior Member
    Join Date
    Sep 2006
    Posts
    4
    Hey, Thank you very much for posting that!! I really appreciate you taking the time to look at it. What was I doing wrong though? I know you created the grass yourself. I thought that I would just be able to use the graphic that I imported. Could you let me know, I'd really like to understand that.

    Thanks again!

  6. #6
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    you're graphic was low res... it was all pixelated and what not.. so i just created the blades from scratch. if you're going to import things to use, import them at a higher resolution, or ideally, import vector artwork (since flash is a vector based program). All i did was create a few blades, and motion tween them rocking back and forth (i.e. swaying) you could probably do the same with your grass, you just need to strip it down to JUST the grass.. try using Fireworks to create the grass shape... and importing that to Flash.... you can use the Trace Bitmap feature to strip out the backgrounds, etc
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  7. #7
    Junior Member
    Join Date
    Feb 2009
    Posts
    1
    madzigian, I've tried copying this into flash CS4, but I'm getting this error: "1046: Type was not found or was not a compile-time constant: Void." (Line 18)

    which prevents it from duplicating the blades. Do you know what can be done to fix it?

  8. #8
    Member
    Join Date
    Nov 2005
    Location
    Houston, TX
    Posts
    93
    Well, looking at the main time line and the actions on it, you see that the function "dupe" returns Void, or nothing. And surprise surprise, this happens on Line 18 as the error message says. I googled "CS4 void 1046 error", although I didn't really have to. See for yourself.

    http://www.kirupa.com/forum/showthread.php?t=300635

    Don't capitalize the V in void. In other words, make it :void instead of :Void, at least in CS4.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center