dragNdraw v1.0

Compatibility MX 2004, Flash 8, FLASH CS3 (AS2.0 compatibility mode)
Approval Adobe
Version 1.0
Commercial Free
Overview

This component is designed for people without an extensive knowledge of actionscript, who want to be able to create e-learning activities with Flash. The dragNdraw component is an alternative to our classic Flashvalley dragNdrop component. Instead of dragging movie clips across the stage, the dragNdraw component allows the user to associate elements on the stage by drawing lines between them.

The component automatically displays the correct answers after a number of tries which you can define. The component is highly customizable and will adapt to any situation.

You can use the variables generated by the component to track down the score and the user answers. These variables can easily be sent to third party applications.


Features

The dragNdraw component package


The dragNdraw component package is composed of 4 distinct elements :

dragNdrop target The draggable dot component
dragNdrop drag
The target component associated with the above draggable dot
dragNdrop setup
The set up component
dragNdrop message window
The message window


Create associations in seconds

You link associated elements by dropping a draggable dot and a target component next to each of them.
setting the associations



Easy setup


--> On the draggable dot component you just need to specify the name of the correct target it should be associated with (fishbowl in our case here).
--> You can specify the name of functions to be called instantly if the drag is released on a correct target or on a wrong target. (
wellDone and notGood in our case).
setting up the component
Fig1
 

Tip : 2 parameters are passed to the function that is specified in the onCorrect and onIncorrect field. These parameters are the name of the drag and the name of the target it has dropped on. See example below :

function WellDone(myDrag, myTarget){
trace(myDrag+" has been dropped on "+myTarget);
}

The main parameters that need to be specified for the dragNdraw activity (Fig2) are :

- number of tries : specify how many tries will be given to the user before he is offered the choice to see the correct answers.
-
test if completed : if this parameter is set to true the user will be prompted if he hasn't completed the activity.
-
One drag per target : If set to true no more than one drag can be dropped on a target
-
display answers function : Normally the correct answers are automatically shown by the component but sometimes (especially when there is more than one correct drag per target) you might want to show the correct answers on another frame or even load another swf. This can be done by specifying the name of a function in that parameter field. In our case we call a function named showCorrectResults.
- onCorrect : name of the function to call once the activity is completed and the answers all correct
- onIncorrect : name of the function to call once the activity is completed and one or more of the answers are incorrect.
- onPress : name of a function to call each time the submit button is pressed

main parameters
Fig2

Tip : The buttons are nested into the "set parameters here" movie clip, therefore if you want to customize their graphics open that component. The buttons are on frame 2 and on frame 3.



Self contained and scalable

Once you have assigned your drags and targets and set up all your parameters you just need to wrap your activity (assets and components) in a movie clip (Fig3) and to link it to the dragNdraw class (Fig4) ... job done your dragNdraw activity is ready to go :)

select all elements
Fig4
dragNdraw class
Fig3



See the dragNdraw component in action
You need to have a full version or working demo of Flash
in order to use Flash components.



You can download the manual here.

Compatible with Flash MX 2004, Flash 8 and FLASH CS3 (AS2.0 compatibility mode)


flashvalley
 
Copyright ©2006-2008 flashvalley.com - All rights reserved