The 2DIY script archive

A resource containing Actionscript examples for 2Simples 2DIY software.

  • Home
  • ActionScript
  • Animation Script
  • Collision Script
  • Start Button Script
  • Examples
  • Ideas
  • Help
  • Discuss

Changing the speed a character travels across the screen

When editing an activity that includes collecting objects, (or avoiding objects), you can alter the speed a character moves to the left and right.

Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.dx=4;

The smaller the value, the slower the character will move. This can be handy if you are creating an activity in a water setting, where movements will be slower.

View example; Download Start_button_dx

Posted by webmaster on 03/19/2009 in Start Button Actionscript | Permalink

Reblog | | Digg This | Save to del.icio.us |

Changing the height a character can jump

When editing a platform activity you can alter the maximum height at which a character can jump up to. Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.jumpSpeed=-16;

The smaller the value, the smaller the height the character will jump on the screen. It can be used to create more difficulty in an activity, by limiting the route a character can travel along.

Note: the value is always negative

View example; Download Start_button_jumpSpeed

Posted by webmaster on 03/19/2009 in Start Button Actionscript | Permalink

Reblog | | Digg This | Save to del.icio.us |

Changing the speed a character falls

When editing a platform activity you can alter the speed at which a character falls down the screen.
Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.maxFallingSpeed=16;

The smaller the value, the slower the character will drop down the screen. It can be used to create a "parachute" effect.

View example; Download Start_button_FallingSpeed

Posted by webmaster on 03/19/2009 in Start Button Actionscript | Permalink

Reblog | | Digg This | Save to del.icio.us |

Changing the closeness of collisions with objects

When editing an activity that includes collecting objects, (or avoiding objects), you can alter the sensitivity of the collision detector.


Within a platform activity if you right click on the "test activity" (green triangle) you can alter the following code;

_root.hitDist=40;

The smaller the value, the closer two objects must be before they interact with each other. 
Note however that if you set the value to "0", you will not be able to collect any items.

View example; Download Start_button_hitDist

Posted by webmaster on 03/19/2009 in Start Button Actionscript | Permalink

Reblog | | Digg This | Save to del.icio.us |

login

Recent Posts

  • Luke's Shark Attack
  • Lois and Paige's 2DIY drag game
  • Ellie-Jade and Jordan's Drag game!
  • Alfie and Savannah's Drag game
  • Chinese New Year
  • Haiti Earthquake Activities
  • Year 6 Little Red Riding Hood game
  • More from Sonning Common Primary
  • Collaborative learning and playing
  • Simon Haughton's 2DIY Planning

Recent Comments

  • webmaster on Discuss
  • Angela Canas on Discuss
  • webmaster on Discuss
  • Angela Canas on Discuss
  • webmaster on Discuss
  • Ali on Discuss
  • webmaster on Discuss
  • Max Wainewright on Discuss

Archives

  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009

More...

2simpleant's Blog

| The 2DIY script archive |

Design by @xannov