Salve dovrei realizzare qualcosa di simile a questo qualcuno potrebbe aiutarmi???
7 replies to this topic
#1
Posted 23 July 2012 - 08:55 PM
#2
Posted 24 July 2012 - 10:11 AM
...this is an English speaking forum - I'll move this to the appropriate Supporto Italiano Forum.
wolf
wolf
#3
Posted 24 July 2012 - 10:15 AM
#4
Posted 24 July 2012 - 07:18 PM
ok thanks but not what I want to try harder as a function of in figure someone can help me?
#5
Posted 25 July 2012 - 06:04 PM
#6
Posted 26 July 2012 - 10:39 AM
#7
Posted 26 July 2012 - 07:57 PM
ok thanks I did but I still have one last problem I have is that after you have dragged all five correct answers will pass to the next scene someone could help me? thank you very much....
#8
Posted 26 July 2012 - 09:51 PM
Use Wolfs Drag and drop example and copy the script below and replace the script in the example.
Add a dynamic text box and name it "count_txt" without the " ".
This is just to see and text count is working.
Now make a second Scene with a stop() in the first frame.
Now text.
Wayne
function start_move()
{
this.startDrag(true);
this.onEnterFrame = check_office;
}
function end_move()
{
stopDrag();
}
function check_office()
{
var hit : Object = null;
for (w in workers)
{
var ofc : Object = variable(workers[w] + "_office");
if (this.hitTest(ofc))
hit = ofc;
}
if (hit)
{
if (this._name eq hit._name.substring(0, hit._name.indexOf("_")))
{
banner.text = "Right";
count += 1
stopDrag();
this._x = hit._x;
this._y = hit._y;
this.onEnterFrame = null;
}
else
{
banner.text = "Wrong";
}
}
else
banner.text = "";
}
onSelfEvent (enterFrame) {
count_txt.text = count;
if(count >= 3) {
nextSceneAndPlay();
}
}
onFrame (1)
{
count = 0;
var workers : Array = new Array("bob", "dave", "rick");
for (w in workers)
{
var obj : Object = variable(workers[w]);
obj.onPress = start_move;
obj.onRelease = end_move;
}
}
onFrame (2) {
stop();
}
Add a dynamic text box and name it "count_txt" without the " ".
This is just to see and text count is working.
Now make a second Scene with a stop() in the first frame.
Now text.
Wayne
Wayne helps those who help them selves.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














