Adobe Director Online
 

A list of Tips and Tricks published till date...

 
Docking the Score with Stage after undocking them: By default score and stage are docked together. You can undock them and move them around separately. If you want to dock them again, use the Ctrl key and drag the score on the stage. BTW, did you know that you can dock the score on any side of the stage? Just drag the score on any side of the stage and it gets docked automatically.
 
Bitmap Filters with Director 11
 

Using Perlin Noise effect with Director 11: perlinNoise() method helps you to create great looking noise effect. Following is a simple example of how you can achieve the Perlin Noise effect.

Draw a paint member and name it as 'myMember'
Attach the following script to the Sprite as beginFrame handler and Play the movie.

on beginsprite me
myList = [point(0,1), point(5,5)] --List of Points
member("myMember").Image.perlinNoise(5, 5, 2, 2, true, true, [#channelOptions:7, #grayscale:false, #offsets:myList])
end

 

Antialiasing Text with Director 11: With the antiAliasType property, we can control whether a text cast member is rendered using anti-aliasing to produce high-quality rendering. Following are the available antialiasing options;

Auto – #AutoAlias (Uses the font file information for anti-aliasing.)
Grayscale All - #GrayScaleAllAlias (Enables grayscale anti-aliasing for all text members.)
Subpixel All - #SubpixelAllAlias (Enables sub-pixel anti-aliasing for all text members.)
Grayscale Larger Than - #GrayscaleLargerThanAlias (Enables grayscale anti-aliasing for font sizes greater than the specified threshold.)
None - #NoneAlias (turns off anti-aliasing for the current cast member.)

 
Physics in Director: Intro 1: With the new Physics Engine, we can do lot more using Director. This series of tips/tricks will help the users to understand the physics in a much better way. (First Part of the series of Physics lessons by Abhishesk Ojha)

One can use the mouse to move the rigid bodies around. Some of the physics methods and properties used are as follows:

Init()- initializes the physics world with the specified 3D cast member.
gravity- assigns the acceleration due to gravity in the physics world.
lineardamping- assigns the lineardamping in the physics world.
contacttolerance- assigns the penetration depth between rigid bodies for the collision to be detected.
createrigidbody()- method creates a rigid body with the specified proxy shape.
friction- assigns friction to the specified rigid body if used with a rigid body reference.
restitution-assigns restitution to the specified rigid body if used with a rigid body reference.
position- determines the position of the rigid body.
mass- assigns mass to the rigid body.
linearvelocity- refers to the linearvelocity of the rigid body.
destroy()- stops the simulation of the world and frees all the resources in the world.
simulate()- simalates forward the physics world by some specified time.The step time depends on the timestepmode set during the init call.
getrigidbody()- returns the rigid body specified by the rigid body name.
applylinearimpulse()- applies the given linear impulse at the position specified the vector in rigid body coordinates.If the position is not specified it gets applied at the center of mass.
 

Physics in Director: Intro 2: We can create 3d physics world where rigid bodies with different coefficients of restitution and friction are falling under gravity. One can change the default attributes (coefficient of friction, restitution) of the rigid bodies and observe the effects. Some of the physics methods and properties used are as follows:

Init()- initializes the physics world with the specified 3D cast member.
gravity- assigns the acceleration due to gravity in the physics world.
contacttolerance- assigns the penetration depth between rigid bodies for the collision to be detected.
createrigidbody()- method creates a rigid body with the specified proxy shape.
friction- assigns friction to the specified rigid body if used with a rigid body reference.
restitution-assigns restitution to the specified rigid body if used with a rigid body reference.
mass- assigns mass to the rigid body.
destroy()- stops the simulation of the world and frees all the resources in the world.
simulate()- simalates forward the physics world by some specified time.The step time depends on the timestepmode set during the init call

 

Physics in Director: Intro 3: RAYCASTING is the use of ray-surface intersection tests to solve a variety of problems in computer graphics. It solves the general problem of determining the first object intersected by a ray or all the objects coming in the direction of a ray. It is an image order algorithms used in computer graphics to render three dimensional scenes to two dimensional screens by following rays of light from the eye of the observer to a light source. The high speed of calculation made ray casting a handy method for the rendering in early real-time 3D video games. The idea behind ray casting is to shoot rays from the eye, one per pixel, and find the closest object blocking the path of that ray - think of an image as a screen-door, with each square in the screen being a pixel. This is then the object the eye normally sees through that pixel.

Some of the physics methods and properties used are as follows:

Init()- initializes the physics world with the specified 3D cast member.
contacttolerance- assigns the penetration depth between rigid bodies for the collision to be detected.
createrigidbody()- method creates a rigid body with the specified proxy shape.
mass- assigns mass to the rigid body.
destroy()- stops the simulation of the world and frees all the resources in the world.
simulate()- simalates forward the physics world by some specified time.The step time depends on the timestepmode set during the init call.
Raycastclosest()-returns the reference of the closest rigid body or terrain that is found along the ray from the specified origin and specified direction. The method also returns the point of contact, contact normal, and the distance from the origin of the ray.
Raycastall()-This method will return the references of all the rigid bodies or terrains that are found along the ray from the specified origin and specified direction. The method also returns the point of contact, contact normal, and the distance from the origin of the ray.

 
Physics in Director: Intro 4
 
Physics in Director: Intro 5: A terrain is similar to a bumpy plane that is infinite in two dimensions and defines an elevation along the third. First we create a matrix containing all the possible values of the coordinates of the mesh. The coordinates have x, y, z values.Then we build a mesh using the matrix values. Next we use createterrain () and createdesc () methods to create the terrain out of the mesh we have created.

createdesc (): A terrain descriptor object needs to be created before a terrain is created
createterrain():This method creates the terrain as a static rigid body using the height-map information provided.
 
Physics in Director: Intro 6: Concave Regid Bodies is an Integral Part of Director Physics. This body is created by using the #concave proxy in the createrigidbody() method.

Createrigidbody(): used to create a rigid body.Here a # concaveshape proxy has been used.
Deleterigidbody(): deletes the rigid bodies
 
spacer image
This is not an official site from Adobe. If you need any clarifications, please mail me at info@adobedirectoronline.com