Jump to content

move image.png to mouseClick


erich.wanker

Recommended Posts

hi ..

 

i search a javascript for somthing like this:

 

http://preview.codecanyon.net/item/virtual-chat-phpjavascript-avatar-chat-room/full_screen_preview/10396170?_ga=1.217482576.732271885.1492700635

 

.. i want to move a uniImage ( png with transparent)  .. let´s call it "avatar" over a background-image - if i click on background-image .. 

 

at the start of uniForm - the avatar should stand in the center of Background ...

 

i need no collision, no animated image ..  just a smooth move of the image to the clicked point ..

 

 

 

i will make the rest with delphi-code ( i need just the coordinates x and y  of the click ..:)

procedure backgroundImageMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

Has someone the Pleasure to help ???  .. i am very very poor in Javascript ...

 

ThanX  :-)

 
 
Link to comment
Share on other sites

Hi Developer ...

 

i got it   :)  :)  :)  :)  :)  :)

 

procedure TMAINFRAME_STATUS.UniImage3MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin


UniSession.AddJS(UniImage4.JSName + '.animate({ duration: 300, to: { x: '+inttostr(x+300)+', y: '+inttostr(y-13)+', opacity:100 }});');
 
 
 
 
 

 

a very short demo what i made ...  :rolleyes:

 

( i cannot upload mp4 ???? )

 

animate.zip

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...