Some Director folks out there created a brand new Director site, Adobe Director Online, for Adobe Director 11.
A New Director Community
Adobe Director Online is aiming to become one stop for all director needs. The content shared or viewed is supported by many expert Director users who will help to build a more stronger Director community. So if you’re interested to write a tutorial post, you’re welcomed to submit it to them.
To get a value of arc cosine in Adobe Director is pretty hard. That’s because only atan() function is provided in Lingo script. But with the only atan() function provided, we’re able to obtain the value for arc cosine too with some extra code added:
arccosine = atan(sqrt(1.0-(ratio*ratio))/ratio)
To convert it to degree, just multiply the answer to 180/pi(), or
To delete unneccessary Zero(eg. 2.000, 2.10100) after a decimal point, you can apply the following function:
on deletefloat output
——————delete float————–
repeat with k = member(output).char.count down to 1
if member(output).char[k] = “0″ then
put “” into member(output).char[k]
else
exit repeat
end if
end repeat
if member(output).char[member(output).char.count] = “.” then
put “” into member(output).char[member(output).char.count]
end if
——————delete float————–
end
The “output” is the your text member’s name.
Have fun!
One of the great thing of Adobe Director is user can apply flash components in a director movie. Unfortunately, the Director documentation is not really describe all the flash components’ properties and methods that are to be used in details.
Tree Component
The Tree component allows a user to view hierarchical data. The tree appears within a box like the List component, but each item in a tree is called a node and can be either a leaf or a branch.
By default, a leaf is represented by a text label beside a file icon and a branch is represented by a text label beside a folder icon with a disclosure triangle that a user can open to expose children. The children of a branch can either be leaves or branches themselves.
The data of a tree component must be provided from an XML data source.
Step 1: Where do we get the tree component in Director?
Go to “Library palette” -> “Component”, drag a tree component and drop it in your cast.
Have you ever trace a log file of your director application? It is very useful if you want to debug your application or “steal” other’s application code. TraceLogFile is not only can be applied in director movie, it can be created as an external .ini file to trace the global variable, values and script that ran by the application.
How to create an internal Tracelogfile
_movie.traceLogFile = _movie.path & “Trace.txt”
How to create an external Tracelogfile
In your notepad type this,
on startup
the tracelogfile = “Trace.txt”
the trace = true
end
then save it as *.ini (eg. Lingo.ini)
After that, put it at the same path with the projector.exe. After the director application is closed, a Trace.txt that recorded down all the global variable, values and script will be generated.
Stop Tracing My Application!
To prevent people from reverse engineer your application or “code stealing”, add this script in your director movie.
on startmovie
the traceLogFile = EMPTY
the traceLoad =0
end
*If you know any other methods to read/debug the code, please kindly share it with me.
the tracelogfile = “Trace.txt”
the trace = true
end
What can we do if we want to scroll a long text+image+flash animation? Except of using “scroll together” or “drag together” method, I will choose to use flash scrollpane in director. You can use a scroll pane to display any content that is too large for the area into which it is loaded. For example, if you have a large image and only a small space for it in an application, you could load it into a scroll pane. It is very useful if you want to insert an animation or image in your text and make it scrollable.
You can either link a swf (which include animation, text and image) or a jpg/png/gif in scrollpane for display purpose.
To delete an item in a string, you can use the function “delete”. However, if you straight apply this function on a text member, the output might be not the one you wish to get. (Delete Item (a))
Download File: Delete Item.dir
(Right click and select save target as)
In order to delete the item with the comma, you need to add extra script to make it works perfectly.(Delete Item (b))
In adobe director, to get the angle between 2 points is not difficult.
Try this code:
on getangle
pt1= point(100,100)
pt2 = point(100,20)
sl = pt2 - pt1
myangle = atan(sl[2],sl[1]) * 180 / pi
put myangle
end