XWidgetSoft Forum
http://bbs.xwidget.com/

3 cool animate effect examples
http://bbs.xwidget.com/viewtopic.php?f=10&t=25
Page 1 of 1

Author:  qiancang [ 2012年 Jun 16日 08:15 ]
Post subject:  3 cool animate effect examples

use least controls and code to show you the animate effect clearly

1.scaleto function example
show the scaleto() function of XWidget. More details in the code

2.move controls example
you can drag the control in the widget window

3.controls go with mouse example
the circle will follow your mouse when your mouse move over the widget

Attachment:
3 cool animate effect examples.rar [9.54 KiB]
Downloaded 776 times

Author:  Dagedee [ 2012年 Aug 25日 09:46 ]
Post subject:  Re: 3 cool animate effect examples

Used your animation script here http://dagestuff.deviantart.com/art/Min ... -323313669 - thank you for sharing it! :D

Author:  vlad [ 2012年 Sep 2日 02:49 ]
Post subject:  Re: 3 cool animate effect examples

qiancang Could you write more scale & matrix transformation & twinning functions ?.

Author:  BijaN-R [ 2013年 Apr 15日 04:48 ]
Post subject:  Re: 3 cool animate effect examples

What if I need ScaleTo for entire widget?
It say : Object doesn't support this property or method.

Author:  qiancang [ 2013年 Apr 16日 05:19 ]
Post subject:  Re: 3 cool animate effect examples

BijaN-R wrote:
What if I need ScaleTo for entire widget?
It say : Object doesn't support this property or method.


put all controls into a layer, and then scale the layer.

Author:  jimking [ 2016年 Feb 21日 03:47 ]
Post subject:  Re: 3 cool animate effect examples

Move controls and save position example by qiancang.

Attachments:
move_controls_and_save_position_example.xwp [7.44 KiB]
Downloaded 164 times

Author:  jimking [ 2016年 Feb 21日 04:49 ]
Post subject:  Re: 3 cool animate effect examples

Alternative script by @meme

Code:
var md,mdx,mdy;
var Text1X, Text1Y;

function widgetOnLoad()
{
text1.Left = parseInt(getinivalue(WidgetPath+"config.ini","Default","Text1X",""));
text1.Top = parseInt(getinivalue(WidgetPath+"config.ini","Default","Text1Y",""));
}

function text1OnMouseDown(Sender,Button,Shift,X,Y)
{
md = true;
mdx = X;
mdy = Y;

}

function text1OnMouseMove(Sender,Shift,X,Y,Dx,Dy)
{
if(md)
{
Sender.left = Sender.left + X - mdx;
Sender.top = Sender.top + Y - mdy;
}
}

function text1OnMouseUp(Sender,Button,Shift,X,Y)
{
md = false;
Setvalue("Text1X",Sender.left);
Setvalue("Text1Y",Sender.top);
SaveAsDefIni();
}

Author:  yereverluvinuncleber [ 2016年 Mar 16日 05:23 ]
Post subject:  Re: 3 cool animate effect examples

It would seem that the move code above from meme has no effect on a layer but only works on a discrete control by itself. So far I have not been able to move separately a layer consisting of a number of controls.

Author:  jimking [ 2016年 Mar 16日 07:17 ]
Post subject:  Re: 3 cool animate effect examples

meme' s script works fine. If there is a problem using layers, don't forget that you can drag drop one element into another. Check one of my "3d desktop widgets " to see it by yourself..

Author:  yereverluvinuncleber [ 2016年 Mar 16日 07:41 ]
Post subject:  Re: 3 cool animate effect examples

Dropping one element/object/component into another creates a 'layer' according to Xwidget terminology. That is what I want to move, the layer, not an element/object/component on its own but a group of them. Meme's scripts works on elements/objects but not layers. I have used this sort of code before on a component and of course it works successfully. However I have tested it on a layer and it seems to do nothing that was my reason for my original post.

If you have managed to move a layer please attach a link or some working code that gives an example, please.

Author:  jimking [ 2016年 Mar 16日 08:05 ]
Post subject:  Re: 3 cool animate effect examples

Quote:
Dropping one element/object/component into another creates a 'layer' according to Xwidget terminology.

No yereverluvinuncleber. When I talk about "layer" I mean the designer's component!
It's different the "layer" from drag-drop components.

Image

And yes, when I made the "3D Desktop" widgets I noticed that there is a problem using "layer" and these scripts (one by meme and two by qiancang). So I think that maybe it is a bug of the designer and that simply doesn't work with the layers. The scrpits are ok.
That's why I used the drag-drop method because 1) works and 2) you can have the same result.

Author:  yereverluvinuncleber [ 2016年 Mar 16日 12:46 ]
Post subject:  Re: 3 cool animate effect examples

Got it!

Author:  yereverluvinuncleber [ 2016年 Mar 16日 13:55 ]
Post subject:  Re: 3 cool animate effect examples

That works perfectly. I think you are correct about there being a bug with respect to moving genuine layers.

What you have done is create pseudo-layers. Those pseudo-layers can then be moved as all objects can be moved.

Thank you!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/