XWidgetSoft Forum
https://www.bbs.xwidget.com/

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

Author:  qiancang [ June 16th, 2012, 8:15 am ]
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 1971 times

Author:  Dagedee [ August 25th, 2012, 9:46 am ]
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 [ September 2nd, 2012, 2:49 am ]
Post subject:  Re: 3 cool animate effect examples

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

Author:  BijaN-R [ April 15th, 2013, 4:48 am ]
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 [ April 16th, 2013, 5:19 am ]
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 [ February 21st, 2016, 3:47 am ]
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 1302 times

Author:  Jimking [ February 21st, 2016, 4:49 am ]
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 [ March 16th, 2016, 5:23 am ]
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 [ March 16th, 2016, 7:17 am ]
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 [ March 16th, 2016, 7:41 am ]
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 [ March 16th, 2016, 8:05 am ]
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 [ March 16th, 2016, 12:46 pm ]
Post subject:  Re: 3 cool animate effect examples

Got it!

Author:  yereverluvinuncleber [ March 16th, 2016, 1:55 pm ]
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/