CreateJs Range slider function - createjs

Trying to create a range slider
similar to:
http://foundation.zurb.com/docs/components/range_slider.html
it has to follow the mouse, so no onclick
and needs to output values between 0 (left side)
to 100 (right side) does anyone know the best way to go about this?
thanks

The EaselJS download actually includes a simple slider that is used by some of the examples. You could likely use that as a starting point and build on top of it.
https://github.com/CreateJS/EaselJS/blob/master/_assets/js/Slider.js
The Transform.html and Filters_input.html samples in the examples directory use it if you'd like to see it in action.
http://www.createjs.com/demos/easeljs/transform

Related

How to interact with objects inside of a SWT_Window0?

I have been having an issue where i need to automate the interaction with objects inside of a SWT_Window0. Within this Window I have a list of objects which need to be clicked and dragged to another part of the screen. I have attached a picture of the SWT_Window0.
 
The aim I have is to click on "Crosstab" and drag it to the right handside of the screen. The issue I have is UFT only recognises the entire window as one object and does not recognise anything inside it, Crosstab, Spreedsheet etc. And because of this I am having great difficultly getting UFT to click on the "Crosstab" label. Could anyone with more UFT experience potentially share some ideas about how to go about clicking the labels within the SWT_Window0?
I've tried a couple of different ways of trying to click any label within the SWT_Window0 but with no luck. Closest I can get is just using UFT's record which gives:
Window("Designer").WinObject("SWT_Window0").Click 64,34
But i cannot use this is I do not want to use X,Y coordinates in my test as they are not reliable  
"Window("Designer").WinObject("SWT_Window0").Click" Just clicks middle of the window.
I've also tried other things like
.Click 2,  
.Click "Crosstab",   .Press "Crosstab" etc but of no avail
I will also attach the properties of the SWT_Window0
"Class Name:=WinObject",
"abs_x:=1925",
"abs_y:=118",
"attached text:=",
"enabled:=True",
"focused:=True",
"hashscroll:=False",
"hasvscroll:=True",
"height:=417",
"hscrollpagesize:=",
"hscrollposition:=",
"hwnd:=69930",
"leftscrollbar:=False",
"maxhscrollpos:=",
"maxvscrollpos:=1142",
"minhscrollpos:=",
"minvscrollpos:=0",
"nativeclass:=SWT_Window0",
"object class:=SWT_Window0",
"regexpwndclass:=SWT_Window0",
"regexpwndtitle:=",
"rightaligned:=False",
"righttoleftlayout:=False",
"righttoleftreading:=False",
"text:=",
"visible:=True",
"vscrollpagesize:=418",
"vscrollposition:=0",
"width:=376",
"window id:=0",
"windowextendedstyle:=1048576",
"windowstyle:=1445003264",
"x:=13",
"y:=126"
 
SWT is a Java toolkit (Standard Widget Toolkit).
I suggest you try using UFT's Java addin.
If that doesn't help, you can try using Insight (image based testing).
Before going on with other solutions, contact the HPE(Microfocus) support and make sure they do everything possible to recognize these objects as Java Objects. If the cannot help you recognize the Objects as Java Objects then your possibilities are:
1. Mercury.DeviceReplay
DragAndDrop Method. You will need to know the coordonates of the source and destination (This requires a static resolution)
2. Virtual Objects
Create 2 Virtual Objects on the areas you need. On the source OBject call the Drag method, on the Target the Drop. Restriction is again the resolution.

Kinect game in Unity: How to do background removal

I've been trying to make a Unity game that uses the Xbox One Kinect (V2).
I followed the instructions in this tutorial:
http://www.imaginativeuniversal.com/blog/2015/03/27/unity-5-and-kinect-2-integration/
There are two sample scenes in this zip file: (1) KinectView and (2) GreenScreen.
When I run the first sample (KinectView), the image looks warped, like the right part of the screenshot below:
When I run the second sample (the GreenScreen scene) I get a Null frame error:
Now I'm not really concerned the warping issue in the first scene (KinectView). I am concerned with the Background Removal feature in the second scene (GreenScreen). All I need is to see myself clipped against a custom background.
Can anyone help me figure out how to fix this NULL MSFR Frame issue?
I have uploaded the zipped project in case anyone is interested:
https://www.sendspace.com/file/j2ftqz
Thank you very much.
Update:
I have been messing with some of the Shader options in the Inspector, and noticed that all shader options work except the DX11\GreenScreenShader one. Some of them look like a normal video capture; others are better lit (additive/multiply/alpha blend/etc...).
Why is it that the DX\GreenScreenShader option is the only one that does not work, and instead show nothing more than a pink square.
Screenshot below.
Open the shader in question on your favorite text editor and change these two lines:
1) Line 15. from Texture2D _MainTex; to UNITY_DECLARE_TEX2D(_MainTex);
2) Line 59. from o = _MainTex.Sample(SampleType, i.tex); to o = UNITY_SAMPLE_TEX2D( _MainTex, i.tex );
Updating the shaders as shown above will solve the issue you describe.
Secondary Reference/Source: https://forum.unity.com/threads/kinect-v2-0-sdk-green-screen-demo-for-unity-3d-not-working-why.467687/

Unreal Engine 4 Blueprint

Im new to unreal
I have a problem with the communication from Hud_Blueprint to Level_Blueprint.
I want to have a slider in the Hud which controls the rotation of a cube in the level.
In the Hud_Blueprint i have the slider I made in a Widget_Blueprint.
Works perfect, printline values from 0 to 1.
I tried to use a Interface_Blueprint, like in the following link without success.
https://answers.unrealengine.com/questions/22126/pass-variable-from-hud-blueprint-to-level-blueprin.html
my Blueprints:
https://www.dropbox.com/s/k30ah9fjuwlff6x/zusammen.jpg?dl=0 (404 response)
Seems like i have no connection between the Blueprints.
The function works just in the Hud_Blueprint.
Well, your problem is maybe solved, but someone can find it helpful:
First, create new WidgetBlueprint and name it "Slider".
In Slider editor create Event Dispatcher called "ValueChanged" with float input. In designer, add slider and add it's OnValueChanged. From that node you must call ValueChanged with obtained Value as parameter.
In level blueprint, on EventBeginPlay create SliderWidget and Add (return value) To Viewport. You must promote Slider to variable to use it in next step - Assign ValueChanged with new event which will cover up rotation login in it's execution. See image at Dropbox
If you select your cube in the level outliner and drag that into your HUD_BP you can obtain a reference to the object that way. You can then drag a pin off the object reference and call SetActorRotation

Rebol runtime window control create and update

In the video : REBOL VID demonstration - Nenad Rakocevic demonstrates what seems the basic code to compose a Rebol IDE at runtime.
Can someone provide a working Rebol example on how to create, update / modify faces (widget / control) within a View (window) at runtime.
So far the examples I found allow creating faces into a new window rather than update an existing one.
Thanks
The secret is to use "show" after changing what you want to change. And experiment a lot. There are nice scripts on rebol.org that use VID.
If you meant the interactive nature of the demo, that is (23.34) only 30 lines of 'cod'. I have tried to find that 'cod' but could not find it.
Good luck!
Arnold
Terse example on how to update a face :
rebol[]
view layout [
bx: box teal
btn "ShowTime" [
bx/text: now/time
bx/color: random white
show bx
]
]

How to deep link YUI 3 Tabview?

Im using YUI3 and would like to deep link my tabs. I used tabview + history from YUI. how do i change the value for the url parameter
/#tab-2
replace to
/#tab-description
Thanks in advance.
You can use:
http://developer.yahoo.com/yui/3/api/HistoryHash.html
It has a setHash method which can do that work for you. Under the hood, it just changes what you have above. Ideally, you'll have some sort of infrastructure in history to listen for the hash change events (http://developer.yahoo.com/yui/3/api/HistoryBase.html, history:change) to detect the change and perform you application code)