Source language: Translate to:

Drag Drop Action

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Drag Drop Action

Postby Guest » Fri Mar 18, 2005 5:12 am

Trying out the drag'n'drop in NB5 ... but can`t work out how to make something happen if object succesfully dropped into selected drop zone...

eg...

If object 1 successfully dropped into dropzone1 "sound buzzer"... else do nothing.

I'm sure this is simple...
Guest
 

Postby Guest » Fri Mar 18, 2005 5:26 am

you could try .... the system sound function ... that works .... as far as the soundbuzzer or playtone functions ... I can't get them to work either ... I seems to me alot of stuff don't work in nb5 for some reason.
Guest
 

Postby Sam Cox » Fri Mar 18, 2005 5:31 am

Hi domino,

In the Jigsaw Puzzle pub, edit the DragDrop code in one of the puzzle pieces to read (for example):
Code: Select all
SetVar "[DropAccept]" "True"
If "[DropTarget]" "=" "LowerRight"
SoundBuzzer
Endif

instead of just
Code: Select all
SetVar "[DropAccept]" "True"

That should do it for you.

And ... SoundBuzzer and Playtone are working on my copy of NB5 running WIN2K SP4.

-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Guest » Fri Mar 18, 2005 5:31 am

Taken from NB5 sample file US Presidents.pub:

Code: Select all
If "[DropTarget]" "=" "LincolnDrop"
  ShowObject "Lincoln" "None" "0"
  PlaySoundFile  "Ding.wav" "Normal"
Else
  If "[DropTarget]" "=" "Rectangle1"
    HideObject "Lincoln" "None" "0"
  Else
    PlaySoundFile  "Error.wav" "Normal"
  EndIf
EndIf
Guest
 

Thanks...

Postby Guest » Fri Mar 18, 2005 5:43 am

Thanks...

I was too quick to post..

I hadn`t spotted the new predefined global variables and to further compound my shame.. there is a good explanation in the help file...

I`ll put on my hair shirt now :oops:
Guest
 


Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 1 guest

cron