Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tracking object positions

Status
Not open for further replies.

snowy33

MIS
Jan 16, 2008
5
IE
hi,
i first posted here a couple of months back about a small project i was doing, i hadn't used flash before, and i was just querying if flash 8, the one i have, was capable of doing what i needed. i was told that i could do it in flash, but ive been sidetracked with other work since, and have only really been able to check flash out in the last couple of weeks. the project is basically a small application that allows kids to drag graphical blocks, representing actions such as "forward", to an area on the stage, and if the blocks are placed in the correct order, an animated car will take the correct route around an obstacle course, as well as overcoming some obstacles on the way. a screenshot of early stage of development is attached.

from my limited knowledge of programming in vb and java, the code basically needs to be along the lines of: when play button pressed {IF car is on step one of road AND forward block is dragged to position one on flow tray, THEN animation plays of car going from step one of road to step two.....Else if car at step one of road AND forward block is dragged to position one on flow tray AND forward block is dragged to position two on flow tray THEN animation plays of car goin to from step 1 to step 3 of road...etc etc}. basically i need code that can check the cars position on the obstacle road, check if the correct graphical blocks are placed in the correct order, and then link both, and then play the animations. my level of programming is pretty basic, and im new to flash; what im wondering is:

do i need to make movie clips of each section of animation (e.g. movie clip 1 of car going from position one to position 2 on road, etc), or can i make one big animation and link the actionscript from the play button to frames? seems like there would be alot of clips needed to cover every potential step of car on road.
and if i use drag and drop for dragging a graphical block to a flow area, how do i keep track if the directional blocks are in the correct sequence?
any help welcome for this struggling programmer!
 
thanks kenneth, without being rude, anything more specific?

in looking at the drag and drop needed for the graphical blocks, how do you code it so that when i click and drag a block, a copy of the block gets dragged, leaving the original in place, and each time its dragged a new instance is created. in other words, if i want the car to move forward two places, i click on the action block representing forward, a copy gets dragged to position 1 of the flow chart-type area, then i go back and click and drag a second time and drag another copy to position 2. how do i set this up so that two separate instances are created and thus can be referenced by position?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top