macromedia flash actionscript scripting, php, remoting, webservices, c#, javascript
PHP5 was released yesterday the 13th of July 2004. And there are some really nice new features.
http://www.php.net/
So i have downloaded the windows-binaries.
http://www.php.net/downloads.php#v5
And the HelloWorld-Program still works as expected...;-), but mostly i am interested in the completely redone xml-support. There is a new default-extension which is called SimpleXml and should enable easily accessing and manipulating XML as PHP objects.
http://de2.php.net/manual/en/ref.simplexml.php
Here you can see and download my test of the SimpleXml-Extension.
view
download
With SimpleXml you could also using xPath-Syntax to retrieve a specific node, but i have not found any support for adding nodes to the xml-document. That is really not sad because, there is another great extension, the dom-extension. With this extension we are enabled to use the same dom-api for dealing with xml-documents, as we are still using with macromedia-flash-xml-objects.
http://de2.php.net/manual/en/ref.dom.php
Posted by hOk at July 14, 2004 07:06 PM
Another article in the series of scite-extending-articles. With this article i am trying to explain how to extend the editor that we get a little bit support for jsfl-files.
The first improvement for the scite-jsfl-support is generate an api-file for jsfl. With an configured api-file the scite-editor will autocomplete keywords and more important it will show us the parameters needed to call a method. This is an easy task, if we use the help_search_index.xml-file from the JavaScriptDictionary. You can download the JSAPI-Help-Update from the following page:
http://www.macromedia.com/support/documentation/en/flash/
To generate the api-file i used the following flash-script:
view
download
generated jsfl.api
Now that you have the needed api-file. You could edit your scite-properties-file:
api.*.jsfl=$(SciteDefaultHome)/jsfl.api
In this case the api-file must stay within the scite-installation-directory. If you done this you should get autocomplete for jsfl-keywords by pressing STRG+SPACE within any jsfl-file.
Maybe you would like to have support-for-context-sensitiv-help on the F1-Key. I have explained the needed steps in more detail within the following article:
Integrating context sensitiv help in scite editor
You will need the vbs-file for launching the jsfl-help:
view
download
To tell the scite-editor that it should use this file for the context-help within jsfl-files, we could add the following lines to scite-editors-properties-files:
command.help.*.jsfl="$(SciteDefaultHome)\jsfl-dictonary.vbs" "your path to the help-files" $(CurrentWord)
command.help.subsystem.*.jsfl=2
(Attention these are only two lines starting with command)
In this case the jsfl-dictonary would stay within scite-installation directory. You have to replace "your path to..." with the correct path. Afterwards the help should be usable with the F1-key.
Posted by hOk at July 12, 2004 02:49 PM
If we are developing web-applications or web-sites, we often need to open the files we are editing within our localhost-webserver. In this article i am trying to explain how we could extend our favourite editor, in my case the scite-editor, to give us a handy shortcut(F7-key) for doing this. I think you could transfer this solution easily to your favourite editor.
So, what is the challenge? If we edit a php-file or any other file that belongs to a webserver, we edit it on the physical-file-path of our system. This file-path totally differ from the virtual path that the file has on our webserver. Because of that it is not possible to launch the file directly. We need to translate the physical-file-path to the virtual-file-path first.
I have choosen, once again, vb-script for doing this task. But the task is so easy that it should be no problem to translate the script into any other scripting language. So first take a look to the script:
The script does the following. Get the three arguments: physical-path of the file which is edited, physical-path to document-root and virtual-web-path to document-root. Then the directory-seperator-chars are converted from windows-system-style(backslash) to web-style(slash). Then the physical-path to document root of the edited-file is replaced with the virtual-path to document root. This was the translation, now we could launch the file with the default application, in my case this is the mozilla-browser and it works fine, don't know if other browser work the same. Ready with the script.
The launch-configuration within the scite-properties-files would look something like that, if the vbs-file stays direct within the scite installation-directory.
command.build.$(file.patterns.php)="$(SciteDefaultHome)\open-with-localhost.vbs" "$(FileDir)\$(FileNameExt)" http://localhost D:\xampp\htdocs
command.build.subsystem.$(file.patterns.php)=2
(Attention this are only two lines, starting with command)
As you can see, "http://localhost" is my virtual-web-path and "D:\xampp\htdocs" is my physical-web-path.
Posted by hOk at July 11, 2004 01:20 PM
With this article i am trying to explain how we can integrate an context sensitive help within the scite-editor. The help should then appear on the F1-key and should show the help-topic corrosponding to the word, on which the cursor is pointing.
To customize scite you need a basic understanding of the scite-properties-files. There is an extra section in the help-topics that is targeting this topic:
http://scintilla.sourceforge.net/SciTEDoc.html
The easiest way to integrate an context help could be done by using windows-chm files. The command in your properties-file could look like:
command.help.$(file.patterns.php)=$(CurrentWord)!$(SciteDefaultHome)\php_manual_en.chm
command.help.subsystem.$(file.patterns.php)=4
(Attention this are only two lines and the lines starting with command)
This command integrates an php-context-help. In this case the chm-file stays direct in the scite-direcory, which absolute path is stored in the variable: "SciteDefaultHome". The subsystem defines which type of application should used:
- 0 the default is for command line programs,
- 1 for programs which create their own windows,
- 2 for running by using ShellExecute,
- 3 for running in an internal extension or director extension,
- 4 for running HtmlHelp on Windows, and
- 5 for running WinHelp on Windows.
(When using subsystem 4 or 5, the command has two parts separated by ! with the first part being the topic to search for and the second the name of the help file).
If want to integrate flash-context-help we could search the web for an window-helpfile like chm or we could build a chm-file by our self from the html-help-files. This would be easy but didn't worked for me, because i did not found an ready to use helpfile and have no experiences by building chm-files by my self. So i had to spent some time to find a solution. I have found an vbs solution:
This vbs-file contains an dictonary-object which holds the flash-html-help-file-names by the command which they are describing. You could copy this vbs-file to your scite-editor-directory and then custimize your properties-file like i show you in the following:
command.help.$(file.patterns.flash)="$(SciteDefaultHome)\as-dictonary.vbs" "C:\Programme\Macromedia\Flash MX 2004\de\First Run\HelpPanel\Help" $(CurrentWord)
command.help.subsystem.$(file.patterns.flash)=2
(Attention this are only two lines and the lines starting with command)
Then you could use the F1-key to open a context-help for the current word. The vbscript will try to open the help-file with the default application. In my case is this the mozilla-browser and it works like a charm. But i did not know if this works with other browsers.
Posted by hOk at July 10, 2004 01:04 PM
I like to code the most of my stuff in the Scite-Editor.
http://scintilla.sourceforge.net/SciTE.html
[edit]
See the comment of Danielle Ugoletti, he did a great work and has compiled a ready to use version of flush which supports both flash-mx and flash-mx-2004.
www.ugoletti.com/go/flush
[/edit]
Before we can start coding actionscript with the editor
we need some actionscript-syntax-files. These files can
be found in various distributions of the Scite-Editor.
http://www.bomberstudios.com/sciteflash/
http://www.meychi.com/scite.php
Maybe you are likely to use one of these distrubtions.
Otherwise you have do configure the properties- and
api-files by your own.
Scite comes with an great launching framework, which
could used in various way's for various usage cases.
One usage is launching Robin Debreuils flush.exe to force
macromedia flash mx testing the current movie.
If you want to use flush.exe with macromedia flash mx 2004
you need to modify flush and compile with the borland
compiler again(other compilers should also work, but i
did not testet it with them). The flush-source can be found here:
http://www.debreuil.com/phpBB/viewtopic.php?t=241
The borland compiler can be found here:
http://www.borland.com/products/downloads/download_cbuilder.html
You can compile flush with the command:
bcc32 -I "c:\Borland\Bcc55\include" -L "c:\Borland\Bcc55\lib" -tW flush.cpp -o flush
If you want to use flush for macromedia flash 2004 you
have to change the source.
Search for: 33371
and Replace with: 32901
This will correct the sendMessage-command-number that is needed to send the test-movie-command to flash 2004.
Flush has also the feature to grap the output, i don't know if this will
work, because i did not use this feature. I use scite mostly with the
c-Option:
flush -c
This will only test the current movie.
To integrate Flush.exe in Scite you could simply put Flush.exe in the
same directory in which Scite.exe resist. And than add the following
line to your flash-property file:
command.go.$(file.patterns.flash)=flush.exe -c
Now you should able to test youre movies by pressing F5 within Scite.
Posted by hOk at July 9, 2004 05:44 PM
