Adobe ExtendScript debugging - adobe

There's a dearth of info in the supporting PDFs and on the web. I happened to come across a post in a blog that mentioned that $.write() or $.writeln() will write a string to the javascript console. Quite useful. Does anyone know if this $ object has any additional properties or methods?

I just answered my own question. JavaScript Tools Guide CS4.pdf. Chapter 8 ExtendScript Tools and Features has all I need. Just getting started with Adobe scripting and I'm a bit overwhelmed with the huge array of elements in a CS4 install.

Bits of Photoshop are implemented in ExtendScript. If you look in the folder
[apps folder]/Adobe Photoshop CS4/Presets/Scripts/
You'll find several scripts that may be useful as sample code.

Related

Realtime Web Based Rich Text Editor

Does anybody know of a web based Rich Text Editor like TinyMCE or FCKEditor which supports realtime collaboration? I know of systems like EtherPad, but I'm interested in finding something I can embed into another application, rather than something that works standalone.
Ideally something open source, and works on the .NET platform would be great.
Cheers
Matt
There are
beweevee, using .NET, but it is not open source.
collabedit
While there are several all in one solutions they often tend to be a bit lacking in features. I believe this to be because building a great editor and a great collaboration infrastructure are both very difficult and require different skill sets. It's very hard to do both very well. On the other hand if you find one that meets your needs it might be the simplest approach. ProseMirror comes to mind as a good example that does it pretty well.
I prefer to take a great editor with a great API and pair it up with some real time collaboration technology. Currently Quill and CKEditor 5 are great editors that have sufficient API's to enable real time collaboration. Both of them were built with collaboration in mind. You can pair them up with a realtime back end like the Google Drive Realtime API by Google or Convergence offered by Convergence Labs (full disclosure, I am a founder at Convergence Labs). Or if you are looking for an open source alternative you can look at Together JS or ShareDB.
For a fully javascript based solution try etherpad!
There is a .NET Client example on HTTP API and a page on other examples
Also refer this jQuery demo that can be embedded into your existing solution on the .NET Platform

Any pointers to good AS3 code snippets/samples?

I am newbie in AS3 and learning day by day. I am looking for good AS3 code snippets/samples/small projects which I can use for learning purpose and for reference (with no dependency on Flash IDE because I use Flex SDK and Flash Develop). Also, I am specifically looking for tutorials/articles about Audio/Video streaming, creating own audio/video player, playing audio/video files and working with other media (such as images) and creating special effects. If there's any good websites(other than adobe.com) would be really really really thankful.
Thanks in Advance.
Adobe.com stinks for most documentation (Flex in a Week isn't bad). Here are a few flex/actionscript websites I use or have used:
http://actionscript.org/ Has a lot of ActionScript tutorials.
http://www.flexafterdark.com/ - some good tips and tricks.
http://active.tutsplus.com/ has some good information.
http://www.lynda.com (subscription based) has very good videos that can help you get started.
I would also highly recommend a few books. Flex 3 Bible/Flex 4 Bible/ActionScript 3.0 Bible
Google and Flex in a Week.
I recommend you to take a look at Flex Examples blog. It contains really great and really simple samples to learn.
Senocular is a great when it comes to explaining AS3. Check out his site below:
http://www.senocular.com
In particular his tutorial on AS3 is fantastic - it goes through everything new or challenging about AS3 like display lists and event listeners. It was the perfect primer for me when I stepped across to AS3.
http://www.senocular.com/flash/tutorials/as3withflashcs3/
Sencular is really popular on the http://www.kirupa.com forums (another good set of tutorials are there) plus I believe he works for Adobe now.
Otherwise checkout Grant Skinners work, recently he has been doing a lot JavaScript stuff, but do a search of actionscript and you will find a lot of stuff, especially around memory management.
http://gskinner.com/

Flex UI testing automation

We have a flex based UI whose functionality (eg: login, logout) needs to be tested periodically in IE 7. Manual testing takes a lot of time and hence we want to automate it.
EDIT: We dont have the source code of this app uder test so cannot use something like FlexUnit. Is there a way to automate this testing?
I have heard of FleXmonkey, but have read negative reviews of it and hence wary of trying it.
EDIT: source of negative review:
Automated testing of FLEX based applications
(Comment by Ryan H)
Please suggest if theres a way to go about it.
EDIT: An open-source solution is preferred.
Thank you.
You won't get very far in your development adventures if you avoid reviewing things just because you read negative reviews. ( Please provide a source for said negative reviews ). I've also read bad things about Flex and Flash Builder and the Flash Player. Yet, you still ended up using Flex?
That said, I strongly suggest checking out Flex Monkey.
RIATest is another option.
I believe you can also do this sort of testing with QTP. I couldn't find a specific source for QTP info, but there are a few links if you google.
http://www.learnqtp.com/does-quicktest-professional-support-flashadobe-flex-applications/
http://vishnuagrawal.blogspot.com/2009/04/flex-automation-testing-with-qtp.html
Without recompiling the source code, it is not possible to test Flex in all cases. Saucelabs IDE claims that it can test Flex without recompiling the code. You may check that.
I think FlexMonkey is pretty cool and worth judging on your own. Most of these tools use the same underlying automation framework provided by Adobe, and thus have many of the same pains and challenges. We've actually done a lot the last few months to make it easier to work with and have been working to provide more documentation on dealing with common challenges.
If you do have problem, you will find that our Forums are very active with questions and answers: http://www.gorillalogic.com/forum/7
-Jon Rose -
Gorilla Logic, Inc
Some Flex automation tools support testing of Flex applications without requiring to recompile it.
RIATest definitely supports it (called runtime loading) and if I am not wrong QTP does it as well. AFAIK there are no open source tools that support it.
Beware though that runtime loading is not for every application. If for example you are using custom html wrapper you cannot use it with runtime loading.

How should a programmer go about getting started with Flash/Flex/ActionScript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
What is the shortest path between zero (ie no flash related development software on my computer or information about where to obtain it or get started) to running a "hello world" ActionScript?
I'm hoping for an answer that gives step by step instructions about exactly what software is needed to get started, an example of some "hello world" code, and instructions for compiling and running the code.
I've spent more time than I think should be necessary researching this question and not found much information. Hopefully this question will be found by programmers like me who want to get started with Flash/Flex/ActionScript (After my morning of researching I still don't even know what terminology to use so I'll just throw it all out there).
ActionScript tutorials I've found are focused on programming concepts, ie logic, branching, OOP, etc, and some even have code examples to download, but not a single one I've found explains how to compile and run the code. They all seem to assume you have an IDE standing by but no knowledge of programming, exactly the opposite of the position I'm in.
Here are the most related SO questions I've found:
What is Adobe Flex? Is it just Flash II?
Getting Started with Flex 3 UI ActionScript Programming
https://stackoverflow.com/questions/2123105/how-to-learn-flex
If you're a programmer, go down the Flex route. Flex is completely free to use and you can get a Hello World SWF in no time. You can use the FlexBuilder demo or the freely available but sometimes less helpful FlashDevelop. (Actually I think the only problem with FlashDevelop is it doesn't have a good debugger, or didn't, last time I checked).
That said, I would strongly advise against using Flex, Flash, or any Adobe product really, because in my experience Flex is a horrible API and ActionScript is a horrible language. Flash is still the best platform for RIA just because of its penetration, so if AJAX can't solve your problems by all means learn Flex. Certainly it's not impossible to work with. But Flex is like the Java library re-interpreted by a team of people who took one Java class in high school.
Anyway,
1) Get the FlexBuilder demo from Adobe: http://www.adobe.com/products/flex/flexdownloads/
I'm pretty confident it comes with the Flex SDK.
2) Start a new Flex project.
3) A basic MXML program is already written. Add <mx:Label text="Hello world" /> in the <mx:Application> tag
4) Run->Run YourProjectNameHere
5) Read the horrible Adobe documentation and Flex API reference.
The shortest path from zero to displaying a "Hello World" is probably the Flash IDE. Simply start the program up, enter something in the first keyframe like
trace("Hello World");
on the timeline and then click publish.
Of course you have to pay for the Flash IDE and if your just doing pure programming and not drawing complicated animations then there are free alternatives. The one that I and a few others keep pushing is Haxe. A free opensource language based on AS3 that can then be compiled and target to different platforms including Flash SWF. I use the free program FlashDevelop for coding and which supports Haxe.
An example (taken from the http://haxe.org/doc/start/flash website):
Define/create this class in a file named Test.hx
class Test {
static function main() {
trace("Hello World !");
}
}
Create the file compile.hxml in the same directory with the following content.
-swf9 test.swf
-main Test
Execute the compile.hxml, in FlashDevelop just right click on it, and you are done
That is all there is to it :)
I would recommend you to use FlashDevelop + Flex SDK.
It is free, easy to use and nice for small and big projects.
Simple answer to your question:
I learned everything I needed to know to get started programming in Flash at http://www.gotoandlearn.com
Most of his free 20-minute video tutorials use the Flash IDE, but you can download a free trial that'll work for a month if you are just starting out. The first half or so examples he has are in AS2, so I'd disregard those unless you know you'll have to work on older projects - start with the "Using the Document Class" video. It's funny because he goes from a really shitty coder showing basic examples to a pretty advanced developer with nuanced tutorials. Watch his stuff and you'll get a good sense eventually of how this stuff works in Flash.
Another option that you have available to you is Adobe's "Flex in a Week" series - if you are more into programming and understand OOP concepts then maybe you'd rather not mess around in the Flash IDE. Jump right into Flex, which you can download for free for 60 days (or forever free if you're a student or unemployed) and then watch the videos here, they'll catch you up to speed:
http://www.adobe.com/devnet/flex/videotraining/
Between those two links you should have enough free video training to qualify you to do work in the field. Use what you learn there and practice and you'll be good at it in no time.
Cheers,
myk
This should give a good start on learning this technologies:
Adobe Flash Tutorial
Adobe Flex Video Training
Adobe ActionScript Tutorial
also, I know that adam flater and a friend of his were writing a blog around the time that flex3 was released called 'learning flex from scratch.' It might be a good starting point.
There's a short Hello World tutorial on Senocular's blog, which deals with compiling AS3 code... might be a useful starting-point?
http://www.senocular.com/flash/tutorials/as3withmxmlc/

Code snippet library for a team [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I would like a general purpose code snippets library, that I could use to store bits of code for any language, organized in folders. When any developer on the network adds a snippet, it should get transferred to others.
How can I do this simply? Any app that could be used for sharing libraries of text should be okay too.
That's called "a wiki".
We use a Sharepoint Wiki page for exactly this purpose ... that way code instructions and examples can be included in the same place.
A wiki is definitely the way to go but why stop there? Why not go with an issue tracking system that adds wiki functionality?
I have first hand experience with Trac and Redmine and openly recommend both of them. We've recently switched from Trac to Redmine where I work and I think I like it a little more than Trac, and use the wiki functionality almost everyday.
Update:
If you are looking for something smaller scale, there was a previous discussion here on SO that looks like it has some interesting links.
You might be interested in snip2code.
They do exactly what you are talking about... searching, collecting and sharing snippets of any language. It solves the problems I had for similar issue.
Hope it may help
Code Warehouse is the most extensive source code snippets manager. Code Warehouse is multi-user ready, which means that an organization’s entire development team can share a central code library and benefit from code that is already written and tested.
alt text http://www.xcca.com/cwbig.png
Please have a look at gist.github.com. This is definitely much better than a wiki sharepoint.
Plus you can reuse snippets from other user.
Wiki were designed to share any type of content. Some tools have been specifically designed to share code snippets. Some IDEs also have snippet features.
A wiki is definitely not the best match because it will not integrate with your IDE requiring you to have a separate tool open.
I'm going back and forth between a few Mac applications (haven't decided on one yet but I have tried quite a few). Most of these options allow you to host your snippet library on Dropbox or another network storage location so you can share your library with others. I don't know of any that provide any sort of live changes monitoring though.
Text Expander
Though not designed as an actual code snippet application, I used this for that purpose for a while and was quite content with it. You can share your library with others whether they're on Mac or Windows because there is a compatible alternative for Windows (i forget the name of the Windows alternative but it's easily found on Google I'm sure)
Finally decided to move on because I just wanted something a bit more robust. But may be an option to consider for some.
Codebox
Dash
I just learned about this one and actually only just started trying it. So far it's pretty good and I haven't decided whether or not I'll stick to this or go back to Codebox. I really like the documentation library functionality it has but as far as storing snippets, with my limited experience thus far, all I can say, is I'm rather disappointed in the codehighlighting. It also doesn't have additional fields to write comments like some of the other applications do so your comments have to actually be written with the code. I can't say that bothers me though, it's actually a good thing.
Snippets
I was using this one for a while and liked it quite a lot but wanted something that I could not only store small snippets in but also full source files like a few self contained javascript libraries. I attempted to store a large javascript file and the program not only couldn't handle it, but it actually corrupted my entire snippet library which I was hosting on Dropbox. Not sure if it was a self contained problem because I immediately uninstalled the app after that. But overlooking that i
A few others I may try but have no opinion about thus far
Code Bank (open-source)
Code Collector Pro
Last but not least.. I've actually just been using Gist more and more lately. I'm not aware of any desktop application for Gist (there's a browser app for Chrome I think and a couple of third party applications on the AppStore but I haven't tried them)

Resources