STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228071
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/27039827?noj=FRM27039827-28DC" width="1" height="1"></div>

Stereoscopic test.swf

This is the info page for
Flash #58310

(Click the ID number above for more basic data on this flash file.)


Text
distance between the cubes

3D DEPTH
(distance between your eyes)

-HOW TO USE THIS MOVIE-

Look between the two rotating cubes,
Cross your eyes and focus until you see three cubes.
Try to focus the middle cube
until you see it perfectly clear.
If you're having trouble focusing,
try tweaking the distance between the cubes
using the upper slider,
or try tweaking the angle offset between
the cubes using the bottom slider.
If you're still having trouble,
try searching the web for:
"how to view stereoscopic images"

(*) CLICK on this window to continue

ActionScript [AS1/AS2]

Frame 1
function DuplicateAndShiftCube(src, dest, ang) { ang = ang * deg2rad; if (!is_cross_eyed_mode) { ang = ang * -1; } var _local2 = new djo.Matrix3x3(); _local2.SetRotY(Math.sin(ang), Math.cos(ang)); var _local1 = src.length; while (_local1-- , _local1 > -1) { dest[_local1] = _local2.MulVector(src[_local1]); } } function getSliderValue(minValue, maxValue, Slider) { var _local1 = 0; _local1 = Slider._x / 100; _local1 = (_local1 * (maxValue - minValue)) + minValue; return(_local1); } function Plot(mc, C, a, b) { var _local1 = 5; var _local4 = 100 / (100 + a.z); var _local3 = 100 / (100 + b.z); var _local8 = 100 - (((a.z + b.z) + 10) * 2); var _local9 = 2; mc.lineStyle(_local9, 16777215, _local8); mc.moveTo(C.x + ((a.x * _local1) * _local4), C.y + ((a.y * _local1) * _local4)); mc.lineTo(C.x + ((b.x * _local1) * _local3), C.y + ((b.y * _local1) * _local3)); } function Render(mc, CoordStart, cube) { Plot(this, CoordStart, cube[0], cube[1]); Plot(this, CoordStart, cube[1], cube[2]); Plot(this, CoordStart, cube[2], cube[3]); Plot(this, CoordStart, cube[3], cube[0]); Plot(this, CoordStart, cube[4], cube[5]); Plot(this, CoordStart, cube[5], cube[6]); Plot(this, CoordStart, cube[6], cube[7]); Plot(this, CoordStart, cube[7], cube[4]); Plot(this, CoordStart, cube[4], cube[0]); Plot(this, CoordStart, cube[5], cube[1]); Plot(this, CoordStart, cube[6], cube[2]); Plot(this, CoordStart, cube[7], cube[3]); Plot(this, CoordStart, cube[8], cube[11]); Plot(this, CoordStart, cube[9], cube[10]); } function rotateCube(cube) { var _local1 = cube.length; while (_local1-- , _local1 > -1) { cube[_local1] = m.MulVector(cube[_local1]); } } fscommand ("allowscale", false); var deg2rad = (Math.PI/180); var eye_angle = ((new_eye_angle = 5.9)); var x_angle = ((y_angle = (z_angle = 0))); var eye_distance = ((new_eye_distance = 212)); var is_cross_eyed_mode = false; var axis = (new djo.Vector3D(1, 0.7, 0.9)).Normalize(); var m = (new djo.Matrix3x3()); m.SetRotXYZ(Math.sin(x_angle), Math.cos(x_angle), Math.sin(y_angle), Math.cos(y_angle), 0, 1); var cubeRight = new Array(new djo.Vector3D(10, 10, -10), new djo.Vector3D(10, 10, 10), new djo.Vector3D(-10, 10, 10), new djo.Vector3D(-10, 10, -10), new djo.Vector3D(10, -10, -10), new djo.Vector3D(10, -10, 10), new djo.Vector3D(-10, -10, 10), new djo.Vector3D(-10, -10, -10), new djo.Vector3D(-10, 5, 5), new djo.Vector3D(-10, 5, -5), new djo.Vector3D(-10, -5, 5), new djo.Vector3D(-10, -5, -5)); var cubeLeft = new Array(); DuplicateAndShiftCube(cubeRight, cubeLeft, eye_angle); var Center = (new djo.Vector3D(275, 200, 100)); var LeftEyeCenter = (new djo.Vector3D((-eye_distance) / 2, 0, 0)).Plus(Center); var RightEyeCenter = (new djo.Vector3D(eye_distance / 2, 0, 0)).Plus(Center); onMouseMove = function () { x_angle = ((_xmouse - Center.x) / Center.x) * 0.08; y_angle = ((-(_ymouse - Center.y)) / Center.y) * 0.08; m.SetRotXYZ(Math.sin(y_angle), Math.cos(y_angle), Math.sin(x_angle), Math.cos(x_angle), 0, 1); }; onEnterFrame = function () { this.clear(); Render(this, LeftEyeCenter, cubeLeft); Render(this, RightEyeCenter, cubeRight); rotateCube(cubeLeft); rotateCube(cubeRight); if (eye_distance != new_eye_distance) { eye_distance = eye_distance + ((new_eye_distance - eye_distance) / 8); LeftEyeCenter.Set((-eye_distance) / 2, 0, 0); LeftEyeCenter = LeftEyeCenter.Plus(Center); RightEyeCenter.Set(eye_distance / 2, 0, 0); RightEyeCenter = RightEyeCenter.Plus(Center); } if (eye_angle != new_eye_angle) { eye_angle = eye_angle + ((new_eye_angle - eye_angle) / 8); DuplicateAndShiftCube(cubeRight, cubeLeft, eye_angle); } };
Instance of Symbol 7 MovieClip in Frame 1
onClipEvent (load) { this.Slider._x = ((_root.new_eye_distance - 50) / 250) * 100; } onClipEvent (mouseDown) { this.pressed = true; } onClipEvent (mouseUp) { if (this.pressed) { _root.new_eye_distance = _parent.getSliderValue(50, 300, this.Slider); } this.pressed = false; }
Instance of Symbol 7 MovieClip in Frame 1
onClipEvent (load) { this.Slider._x = ((_root.eye_angle - 3) / 12) * 100; } onClipEvent (mouseDown) { this.pressed = true; } onClipEvent (mouseUp) { if (this.pressed) { _root.new_eye_angle = _parent.getSliderValue(3, 15, this.Slider); if (!_root.is_cross_eyed_mode) { _root.new_eye_angle = _root.new_eye_angle * -1; } } this.pressed = false; }
Instance of Symbol 13 MovieClip in Frame 1
on (release) { getURL ("http://artbit.deviantart.com", "_blank"); }
Frame 45
stop();
Instance of Symbol 15 MovieClip in Frame 45
on (press) { _root.nextFrame(); }
Frame 46
play();
Frame 61
stop();
Symbol 3 MovieClip Frame 8
stop();
Symbol 4 MovieClip Frame 7
stop();
Symbol 5 Button
on (press) { startDrag (this, false, 0, 0, 100, 0); } on (release, releaseOutside) { stopDrag(); }
Symbol 22 MovieClip [__Packages.djo.Vector3D] Frame 0
class djo.Vector3D { var x, y, z, last_time; function Vector3D (ix, iy, iz) { x = ix; y = iy; z = iz; last_time = 0; } function Copy(v) { x = v.x; y = v.y; z = v.z; } function Set(ix, iy, iz) { x = ix; y = iy; z = iz; } function Reset() { x = 0; y = 0; z = 0; last_time = 0; } function Dot(v) { return(((x * v.x) + (y * v.y)) + (z * v.z)); } function Cross(v) { var _local3 = new djo.Vector3D(0, 0, 0); _local3.x = (y * v.z) - (z * v.y); _local3.y = (z * v.x) - (x * v.z); _local3.z = (x * v.y) - (y * v.x); return(_local3); } function Length() { return(Math.sqrt(((x * x) + (y * y)) + (z * z))); } function Plus(v) { x = x + v.x; y = y + v.y; z = z + v.y; return(this); } function Minus(v) { x = x - v.x; y = y - v.y; z = z - v.z; return(this); } function MulScalar(s) { x = x * s; y = y * s; z = z * s; return(this); } function Distance(v) { var _local4 = x - v.x; var _local3 = y - v.y; var _local2 = z - v.z; return(Math.sqrt(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2))); } function Normalize() { var _local2 = Math.sqrt(((x * x) + (y * y)) + (z * z)); x = x / _local2; y = y / _local2; z = z / _local2; return(this); } function Magnitude() { return(Math.sqrt(((x * x) + (y * y)) + (z * z))); } function ProjectTo(v) { var _local5 = Dot(v); var _local4 = v.Magnitude(); var _local3 = new djo.Vector3D(0, 0, 0); v.Normalize(); _local3.x = (_local5 / _local4) * v.x; _local3.y = (_local5 / _local4) * v.y; _local3.z = (_local5 / _local4) * v.z; return(_local3); } function UnitVector() { var _local2 = Magnitude(); return(new djo.Vector3D(x / _local2, y / _local2, z / _local2)); } function Angle() { return(Math.atan2(y, x)); } function Plot(mc, thick, rgb, alpha, startPt) { } function toString() { return(((((("Vector3D : \n[ " + x) + " , ") + y) + " , ") + z) + " ]"); } }
Symbol 23 MovieClip [__Packages.djo.Matrix3x3] Frame 0
class djo.Matrix3x3 { var m; function Matrix3x3 () { m = new Array(3); Identity(); } function Identity() { m[0] = new Array(1, 0, 0); m[1] = new Array(0, 1, 0); m[2] = new Array(0, 0, 1); } function Copy(M) { var _local2 = M.m; m[0][0] = _local2[0][0]; m[0][1] = _local2[0][1]; m[0][2] = _local2[0][2]; m[1][0] = _local2[1][0]; m[1][1] = _local2[1][1]; m[1][2] = _local2[1][2]; m[2][0] = _local2[2][0]; m[2][1] = _local2[2][1]; m[2][2] = _local2[2][2]; } function MulScalar(s) { var _local4 = new djo.Matrix3x3(); var _local2 = _local4.m; _local2[0][0] = m[0][0] * s; _local2[0][1] = m[0][1] * s; _local2[0][2] = m[0][2] * s; _local2[1][0] = m[1][0] * s; _local2[1][1] = m[1][1] * s; _local2[1][2] = m[1][2] * s; _local2[2][0] = m[2][0] * s; _local2[2][1] = m[2][1] * s; _local2[2][2] = m[2][2] * s; return(_local4); } function MulVector(v) { var _local3 = new djo.Vector3D(0, 0, 0); _local3.x = ((v.x * m[0][0]) + (v.y * m[0][1])) + (v.z * m[0][2]); _local3.y = ((v.x * m[1][0]) + (v.y * m[1][1])) + (v.z * m[1][2]); _local3.z = ((v.x * m[2][0]) + (v.y * m[2][1])) + (v.z * m[2][2]); return(_local3); } function mulMatrix(M) { var _local4 = new djo.Matrix3x3(); var _local3 = _local4.m; _local3 = M.m; _local3[0][0] = ((M.m[0][0] * m[0][0]) + (M.m[1][0] * m[0][1])) + (M.m[2][0] * m[0][2]); _local3[0][1] = ((M.m[0][1] * m[0][0]) + (M.m[1][1] * m[0][1])) + (M.m[2][1] * m[0][2]); _local3[0][2] = ((M.m[0][2] * m[0][0]) + (M.m[1][2] * m[0][1])) + (M.m[2][2] * m[0][2]); _local3[1][0] = ((M.m[0][0] * m[1][0]) + (M.m[1][0] * m[1][1])) + (M.m[2][0] * m[1][2]); _local3[1][1] = ((M.m[0][1] * m[1][0]) + (M.m[1][1] * m[1][1])) + (M.m[2][1] * m[1][2]); _local3[1][2] = ((M.m[0][2] * m[1][0]) + (M.m[1][2] * m[1][1])) + (M.m[2][2] * m[1][2]); _local3[2][0] = ((M.m[0][0] * m[2][0]) + (M.m[1][0] * m[2][1])) + (M.m[2][0] * m[2][2]); _local3[2][1] = ((M.m[0][1] * m[2][0]) + (M.m[1][1] * m[2][1])) + (M.m[2][1] * m[2][2]); _local3[2][2] = ((M.m[0][2] * m[2][0]) + (M.m[1][2] * m[2][1])) + (M.m[2][2] * m[2][2]); return(_local4); } function Transpose() { var _local2 = new djo.Matrix3x3(); _local2.m[0][0] = m[0][0]; _local2.m[0][1] = m[1][0]; _local2.m[0][2] = m[2][0]; _local2.m[1][0] = m[0][1]; _local2.m[1][1] = m[1][1]; _local2.m[1][2] = m[2][1]; _local2.m[2][0] = m[0][2]; _local2.m[2][1] = m[1][2]; _local2.m[2][2] = m[2][2]; return(_local2); } function SetRotX(sine, cosine) { m[0][0] = 1; m[0][1] = 0; m[0][2] = 0; m[1][0] = 0; m[1][1] = cosine; m[1][2] = -sine; m[2][0] = 0; m[2][1] = sine; m[2][2] = cosine; } function SetRotY(sine, cosine) { m[0][0] = cosine; m[0][1] = 0; m[0][2] = sine; m[1][0] = 0; m[1][1] = 1; m[1][2] = 0; m[2][0] = -sine; m[2][1] = 0; m[2][2] = cosine; } function SetRotZ(sine, cosine) { m[0][0] = cosine; m[0][1] = -sine; m[0][2] = 0; m[1][0] = sine; m[1][1] = cosine; m[1][2] = 0; m[2][0] = 0; m[2][1] = 0; m[2][2] = 1; } function SetRotXYZ(sin_x, cos_x, sin_y, cos_y, sin_z, cos_z) { m[0][0] = cos_y * cos_z; m[0][1] = (-cos_y) * sin_z; m[0][2] = sin_y; m[1][0] = ((sin_x * sin_y) * cos_z) + (cos_x * sin_z); m[1][1] = (((-sin_x) * sin_y) * sin_z) + (cos_x * cos_z); m[1][2] = (-sin_x) * cos_y; m[2][0] = (((-cos_x) * sin_y) * cos_z) + (sin_x * sin_z); m[2][1] = ((cos_x * sin_y) * sin_z) + (sin_x * cos_z); m[2][2] = cos_x * cos_y; } function SetRotAxis(A, sine, cosine) { var _local3 = 1 - cosine; m[0][0] = ((_local3 * A.x) * A.x) + cosine; m[0][1] = ((_local3 * A.x) * A.y) - (sine * A.z); m[0][2] = ((_local3 * A.x) * A.z) + (sine * A.y); m[1][0] = ((_local3 * A.x) * A.y) + (sine * A.z); m[1][1] = ((_local3 * A.y) * A.y) + cosine; m[1][2] = ((_local3 * A.y) * A.z) - (sine * A.x); m[2][0] = ((_local3 * A.x) * A.z) - (sine * A.y); m[2][1] = ((_local3 * A.y) * A.z) + (sine * A.x); m[2][2] = ((_local3 * A.z) * A.z) + cosine; } function toString() { return(((((((((((((((((((((("Matrix3x3 : \n[ " + m[0][0]) + " , ") + m[0][1]) + " , ") + m[0][2]) + " ]") + newline) + "[ ") + m[1][0]) + " , ") + m[1][1]) + " , ") + m[1][2]) + " ]") + newline) + "[ ") + m[2][0]) + " , ") + m[2][1]) + " , ") + m[2][2]) + " ]"); } }

Library Items

Symbol 1 GraphicUsed by:7
Symbol 2 GraphicUsed by:3 4 5
Symbol 3 MovieClipUses:2Used by:5
Symbol 4 MovieClipUses:2Used by:5
Symbol 5 ButtonUses:3 4 2Used by:6
Symbol 6 MovieClipUses:5Used by:7
Symbol 7 MovieClipUses:1 6Used by:Timeline
Symbol 8 FontUsed by:9 10 20
Symbol 9 TextUses:8Used by:Timeline
Symbol 10 TextUses:8Used by:Timeline
Symbol 11 GraphicUsed by:Timeline
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClipUses:12Used by:Timeline
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:Timeline
Symbol 22 MovieClip [__Packages.djo.Vector3D]
Symbol 23 MovieClip [__Packages.djo.Matrix3x3]
Symbol 16 FontUsed by:17
Symbol 17 TextUses:16Used by:21
Symbol 18 FontUsed by:19
Symbol 19 TextUses:18Used by:21
Symbol 20 TextUses:8Used by:21
Symbol 21 MovieClipUses:17 19 20Used by:Timeline

Instance Names

"Slider"Symbol 7 MovieClip Frame 1Symbol 6 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 22 as "__Packages.djo.Vector3D"
ExportAssets (56)Timeline Frame 1Symbol 23 as "__Packages.djo.Matrix3x3"




http://swfchan.com/12/58310/info.shtml
Created: 17/4 -2019 07:18:09 Last modified: 17/4 -2019 07:18:09 Server time: 28/04 -2024 20:00:23