Dynamic animation in flash and actionscript
longtime fan.
I wish to create a dynamic animation engine for my major creative project
in my current fine arts diploma. I have some programming experience in the
past but not specialized in the fields I'm currently researching.
I am wondering whether the idea I have is feasible and if so what
language/etc I would require to achieve it.
I realise this is a big question so I'll try to be as specific and
descriptive as possible
I am currently looking at using Flash and Actionscript 3.
The current simple description of operation is as follows:
User is presented with a drawing input whereby they can draw using just
black. Once they have finished their drawing they click a submit button
and the drawing becomes a frame in an ongoing animation.
However each frame that is submitted is analysed by the program and its
compared to all other frames currently in the animation. The program then
sorts the new frame (and possibly all or any appropriate other frames)
into the animation in an order where the pixel data is closest to the
frames either side of it.
The program could possibly do this resort in the background, or at
interval times or any way that works really.
The animations frame rate would also speed up partially over time as more
frames are added making the animation longer and faster (to a point
perhaps).
Perhaps:
framerate = totalFrames / n
or something along those lines
My current thoughts are:
I realise the most difficult aspect is the analysis, comparison and
re-sorting of frames in terms of their pixel location data. I feel it
could be possible through somekind of bitmap analysis.
As I am new to the question asking process if anything is unclear or bad
practice please pull me up and I will try to correct asap.
Thank you kindly.
Butzen
Sunday, 1 September 2013
Sharing URL On Facebook using Addthis
Sharing URL On Facebook using Addthis
we have a news website and using AddThis plugin to share news on Facebook
, sometimes when we try to share news on Facebook it doesn't detect the
page info (title ,desc , image ) and when we put the same URL on Facebook
debugger every thing running correctly and page info detected , and when
return to the web site and use the same URL we can share it normally .
the web site created using asp.net 4.0 + SQL server 2008 + iis 6 and the
website behind a firewall
thanks
we have a news website and using AddThis plugin to share news on Facebook
, sometimes when we try to share news on Facebook it doesn't detect the
page info (title ,desc , image ) and when we put the same URL on Facebook
debugger every thing running correctly and page info detected , and when
return to the web site and use the same URL we can share it normally .
the web site created using asp.net 4.0 + SQL server 2008 + iis 6 and the
website behind a firewall
thanks
How to add HTML5 custom data-* attribute to Laravel 4 blade template?
How to add HTML5 custom data-* attribute to Laravel 4 blade template?
This line:
{{ Form::open(['action' => 'AnyController@hello', 'class'=> 'hello']) }}
Will result to:
<form method="POST" action="http://localhost:8000/hello"
accept-charset="UTF-8" class="hello">
However, I wanted to add HTML5 custom data-* attribute, such:
<form method="POST" action="http://localhost:8000/hello"
accept-charset="UTF-8" class="hello" data-abide>
How do I do that?
Thanks in advance!
This line:
{{ Form::open(['action' => 'AnyController@hello', 'class'=> 'hello']) }}
Will result to:
<form method="POST" action="http://localhost:8000/hello"
accept-charset="UTF-8" class="hello">
However, I wanted to add HTML5 custom data-* attribute, such:
<form method="POST" action="http://localhost:8000/hello"
accept-charset="UTF-8" class="hello" data-abide>
How do I do that?
Thanks in advance!
Saturday, 31 August 2013
Unix: How to sort a dat file and keep original line numbers
Unix: How to sort a dat file and keep original line numbers
I have a large data file containing over a thousand entries. I would like
to sort them but maintain the original line numbers. For instance,
1:100
2:120
3:10
4:59
Where the first number is the line number, not saved in the data file,
separated by a colon from the real number. I would like to sort it and
keep the line numbers bound to their original lines, with an output of:
2:120
1:100
4:59
3:10
If possible, I would like to do this without creating another file, and
numbering them by hand is not an option for the data size I'm using.
I have a large data file containing over a thousand entries. I would like
to sort them but maintain the original line numbers. For instance,
1:100
2:120
3:10
4:59
Where the first number is the line number, not saved in the data file,
separated by a colon from the real number. I would like to sort it and
keep the line numbers bound to their original lines, with an output of:
2:120
1:100
4:59
3:10
If possible, I would like to do this without creating another file, and
numbering them by hand is not an option for the data size I'm using.
Explain: jQuery Caching Code
Explain: jQuery Caching Code
This snippet of code will return an element from a cache if it has been
selected previously or select, cache, and return the element. It is useful
for updating contents of elements which are never significantly changed
(i.e, the parent of a counter seen by the user where the number changes
but the parent does not). The code is as follows:
var $$ = (function() {
var cache = {};
return (function (selector) {
return cache[selector] || ( cache[selector] = jQuery (selector) );
});
})();
You can use it like so:
$$('#id')
Now... how the heck does this work? How does $$ have access to jQuery
selector? It has nothing to do with $$ starting with $, you could just as
well do var foo. How does $$ map what is passed into it to selector. I
would expect to see var selector = argumentName inside of $$. Also, to me
it does not appear that $$ is setup to receive arguments (e.g.,
function(input){} ) but it readily does?
This small piece of code is incredibly confusing to me and some clarity
would be greatly appreciated. Thanks!
This snippet of code will return an element from a cache if it has been
selected previously or select, cache, and return the element. It is useful
for updating contents of elements which are never significantly changed
(i.e, the parent of a counter seen by the user where the number changes
but the parent does not). The code is as follows:
var $$ = (function() {
var cache = {};
return (function (selector) {
return cache[selector] || ( cache[selector] = jQuery (selector) );
});
})();
You can use it like so:
$$('#id')
Now... how the heck does this work? How does $$ have access to jQuery
selector? It has nothing to do with $$ starting with $, you could just as
well do var foo. How does $$ map what is passed into it to selector. I
would expect to see var selector = argumentName inside of $$. Also, to me
it does not appear that $$ is setup to receive arguments (e.g.,
function(input){} ) but it readily does?
This small piece of code is incredibly confusing to me and some clarity
would be greatly appreciated. Thanks!
GLSL fragment shader struct out
GLSL fragment shader struct out
i have a problem with my GLSL shader. When i want to compile the fragment
shader part, i get the following error:
0:24: error(#181) Cannot be used with a structure: out
error(#273) 1 compilation errors. No code generated
So the problem lies around my out variable, i assume. Here is my fragment
shader:
#version 410
uniform mat4 gWVP;
uniform mat4 gWorld;
uniform sampler2D gColorMap;
in VSOutput
{
vec3 WorldSpacePos;
vec2 TexCoord;
vec3 Normal;
} FSin;
struct FSOutput
{
vec3 WorldSpacePos;
vec3 Diffuse;
vec3 Normal;
vec3 TexCoord;
};
out FSOutput FSOut;
void main()
{
FSOut.WorldSpacePos = FSin.WorldSpacePos;
FSOut.Diffuse = texture(gColorMap, FSin.TexCoord).xyz;
FSOut.Normal = normalize(FSin.Normal);
FSOut.TexCoord = vec3(FSin.TexCoord, 0.0);
}
As i know it should be possible to output structs in OpenGL 4.0+,
shouldn't it? So I dont get the error, is it a driver problem or something
like that? I'm running on a Radeon HD 6950 with 13.4 drivers.
greets
i have a problem with my GLSL shader. When i want to compile the fragment
shader part, i get the following error:
0:24: error(#181) Cannot be used with a structure: out
error(#273) 1 compilation errors. No code generated
So the problem lies around my out variable, i assume. Here is my fragment
shader:
#version 410
uniform mat4 gWVP;
uniform mat4 gWorld;
uniform sampler2D gColorMap;
in VSOutput
{
vec3 WorldSpacePos;
vec2 TexCoord;
vec3 Normal;
} FSin;
struct FSOutput
{
vec3 WorldSpacePos;
vec3 Diffuse;
vec3 Normal;
vec3 TexCoord;
};
out FSOutput FSOut;
void main()
{
FSOut.WorldSpacePos = FSin.WorldSpacePos;
FSOut.Diffuse = texture(gColorMap, FSin.TexCoord).xyz;
FSOut.Normal = normalize(FSin.Normal);
FSOut.TexCoord = vec3(FSin.TexCoord, 0.0);
}
As i know it should be possible to output structs in OpenGL 4.0+,
shouldn't it? So I dont get the error, is it a driver problem or something
like that? I'm running on a Radeon HD 6950 with 13.4 drivers.
greets
Determining when a WPF window is being moved
Determining when a WPF window is being moved
I'm working on a class derived from the WPF Window class that behaves as
an applicaton toolbar window called AppBarWindow. I have been able to find
various WinForms implementations, but no WPF implementtions.
I've got a lot of the code working, but I need to know when the user
starts dragging the window around the screen and when they stop, as the
window's behavior will differ. The default WPF handling isn't quite right,
so I've implemented my own Window Procedure and installed it using an
HwndSource object.
I've got this working in an applicaton at work that does not have a
non-client area. In that case, there's a LeftMouseButtonDown event handler
that sets a flag to true, then calls the DragMove method which drags the
window around. When that method returns, I set the flag to false.
Everything works.
But I'm working now on a general class that won't use the DragMove method.
I can add another LeftMouseButtonDown handler for the window, but I don't
believe that will get called if the mosue is in the non-client area.
How am I going to detect that the user is dragging thw window and when
they've stopped in this case?
I'm working on a class derived from the WPF Window class that behaves as
an applicaton toolbar window called AppBarWindow. I have been able to find
various WinForms implementations, but no WPF implementtions.
I've got a lot of the code working, but I need to know when the user
starts dragging the window around the screen and when they stop, as the
window's behavior will differ. The default WPF handling isn't quite right,
so I've implemented my own Window Procedure and installed it using an
HwndSource object.
I've got this working in an applicaton at work that does not have a
non-client area. In that case, there's a LeftMouseButtonDown event handler
that sets a flag to true, then calls the DragMove method which drags the
window around. When that method returns, I set the flag to false.
Everything works.
But I'm working now on a general class that won't use the DragMove method.
I can add another LeftMouseButtonDown handler for the window, but I don't
believe that will get called if the mosue is in the non-client area.
How am I going to detect that the user is dragging thw window and when
they've stopped in this case?
Subscribe to:
Posts (Atom)