Is there a way to jump to functions inside the code editor in Flash CS4? - actionscript-3

In our Flash AS3 code, we have a lot of really long functions and when we're trying to navigate the code during development, it's so long that we often can't sit there and scroll for two minutes trying to find where an event listener leads to a function. We've figured out a trick with the search tool that makes it a little easier (search for "n functionname" because it will find "function functionname"), but it would be even easier if we could just click on the name of the function to jump right to that function inside the editor. Is this possible? I'm not talking about when the project is published - only in the editor. It's just hard to follow the code and remember everything it does when you also have to go looking for where it goes next. (By the way, we're using Flash CS4.)

Like some of the comments, you are going to want to use an external IDE (Development Environment). FlashPro is not designed for programming, but only basic scripting and thus doesn't include much along the lines of developer convenience.
Any code editor will likely work to simply edit your .as files. Here are some popular ones for AS3 development that can also debug and tell FlashPro to compile:
Flash Builder (Paid, built on Eclipse, made by Adobe)
FlashDevelop (free)
FDT (paid, built on Eclipse)
IntelliJ (Paid - free version doesn't support AS3)
Eclipse with free plugins (free)
And a there's a few dozen others...
My personal recommendation (since you seem to be most interested in free), would be FlashDevelop. It is free, quite mature, and integrates nicely with FlashPro so you can debug in it and not have to switch back and forth for testing code changes. (most of the others listed do this as well)
For your primary concern, it has keyboard shortcuts for jumping to a function/object definition (F4 by default, Ctr+F4 to return to where you were), along with tons of other programming conveniences. (again, all the other IDE's listed can do this to)

Related

Is there any way to run two instances of flash professional debug

After already searching the site for the answer to the question, I've found this:
Is it any way to run two instances of debuggers?
I need the Flash Professional CS5.5 version of the answer to this question.
Basically - I need to know if there's a way to debug 2 different .fla files in Adobe Flash Professional CS5.5 at the same time. One of them implements the Adobe AIR framework (for using the SocketServer class), the other is a standard AS3 project. It'd be nice if I could debug the client-server interaction easily using the IDE rather than using extensive means to do so.
Anyone have any ideas? Thanks.
This is not an answer to your question but a suggestion to take a different approach.
The Flash IDE and it's debugger are inadequate but for most trivial programs. Variable inspection and breakpoints work randomly and it's next to impossible to drill down into more complex objects. Flash IDE is all right for creating the visual resources for Flash programs but for any serious coding, it just falls on its face. The compiler included with the Flash IDE is also very poorly written and generates unoptimized code.
I'd suggest to switch over to using FlashDevelop - it's a free, open source IDE that runs on top of the Flex and Air SDKs and uses a better compiler that performs more optimizations. (You can mark functions for inlining, etc.) The debugger - while not Visual Studio - is much, much better than the IDE: breakpoints work and object properties can be inspected easily.
Because FlashDevelop is geared towards coding, you can create a project in it with multiple source files, define your resources and then compile to multiple platforms. Compilation is usually fast with hundreds of source files (don't import every type in every package) and you can do debug/release builds. If you can port your code from Flash to FlashDevelop, you'll have a much easier time managing your project.

Using BlazeDS with Flash CS5.5 or 6

Officially, BlazeDs can only be used "with Flex and AIR". This comment is puzzling in itself since Flex is a set of Actionscript development tools, while AIR is a "mode" in which Flash can operate.
Ultimately, I am starting a new project and I want to use BlazeDS for a Flash CS5.5 (or CS6)-based project. Is this possible? Has anyone used this combination in the past?
If you actually read the article you linked to, you'll soon find that it is absolutely okay to use BlazeDS with any technology that can communicate with a web socket - its message format (AMF3) is an open standard.
So yes, it can be used with Flash (or rather, pure ActionScript), but it is a little less convenient than with MXML, where everything is set up by the framework, because it takes more "under the hood" configuration to be able to run all the necessary parts for remoting. And you will still need the Flex SDK, of course - there's no getting around that.
Once you have the Flex SDK set up with your Flash IDE, you have to manually initialize the Flex remoting classes needed before you can access a BlazeDS service. There is a sample class that has all the required calls and some additional information in this blog post.
I have also written an extensive tutorial about getting RemoteObject wired up and working, as well as setting up a simple "Hello World" web service on my blog. The article series I wrote is intended for use with FDT and RobotLegs 2, but at least the first part (setting up a Java WAR project to deploy as web service) should be helpful to you, nonetheless.
Finally, I would recommend you rethink using Flash as your primary IDE - in my experience, it... well, frankly, it sucks (pardon my French) for anything but animations and setting up asset libraries. If you don't want to pay for a better IDE, you should consider using FlashDevelop (unless you're on a Mac - OS X is not supported). Or maybe give FDT a try - it is much, much more convenient for coding, even if you don't buy the Max license.

Flash Pro CS5 - expected function parameters and syntax error highlighting

I'm working with actionscript in Flash Professional CS5, and I find it very slow and difficult because of the following three issues:
No way to know what kind of parameters a function needs. When you hover over a function in Visual Studio for instance, it tells you what parameters it takes and what it returns. Same with variables, shows you the type. This makes things go a lot smoother, especially when you're working with other people's libraries or you're just using a flash function for the first time. Right now, I have to publish and see the error message in order to know what parameter types were expected by that certain function. (am I missing something here?)
No variable/function highlighting. In other environments, when you select a variable, all instances of that variable, including the definition, are highlighted throughout the document (like in notepad++). This is not hugely important, but again, makes life easier.
And finally, live syntax error highlighting. Y U no have that, Flash Pro? There's that blue checkmark button that says "Check Syntax", but it never seems to do anything, even when there clearly are "asdfsdg"s in the document.
Is it possible to actually get any of these features in flash pro or do I just have to suck it up and write things notepad-style? I'm also working with Stage3D and FP11, so I can't debug any more and I have to publish every time, which makes everything even slower.
Thanks for any insight on this.
PS: I know about Ctrl+Space
Use Flash Builder to edit ActionScript.
Extending Eclipse, it is a superior code editing environment. It will encapsulate similar functionality as you'd find in Visual Studio with ReSharper.
Flash Builder may be used standalone to compile pure ActionScript projects; or integration with Flash Pro is seamless. You may right-click a symbol with AS linkage in Flash Pro and select "Edit Class" choosing "Flash Builder" as the editor.
Syntax lighting, intellisense / auto-completion, navigating classes, searching keywords, refactoring, auto code generation, override implement methods, indentation, auto formatting, organizing imports, ASDoc - all features you would expect from an IDE are provided by Flash Builder.
As well, Flash Builder includes extensive debugging and profiling functionality far beyond Flash Professional.

Alternative to using Flash Projector as Autorun Interface?

I have been given the task of creating an Autorun installer for a distributable CD, and thought I would challenge the task with Flash. In previous versions of flash it was possible to use fscommand and trickery to run other local exe files, but due to virus creators and what-not, this has been reworked and totally destroyed for others to use.
So as a Flash developer I have hit a bit of a brick wall with this, and am asking out for any alternative ideas anybody may have? I am quite open with learning new languages/programs, and would like any expert advice from people in the know.
Just as a heads up for what features are required:
GUI with simple graphics/buttons
Ability to launch external exe/pdf files
must be able to be compiled to an exe, which can be launched by any windows machine without installing third party software eg Java.
The only simple solution I have thought of is making an html page, but using a browser is something I want to avoid doing!
Please Help :)
Christian
You can continue using flash freely if you want. There is a bunch of projector tools like northcode swf studion, Zink, mProjector and others. You can also create your own tool using any system programing language that produces windows executable - the only thing you will need - is to create an ActiveX instance of Flash Player and set up minimalistic API to allow Flash call required system functions.

Flash ActionScript 3.0 - Any free compiler, tools and tutorials?

I have got an assignment in which I have to implement a AS3 wrapper for any FLV player and I have to expose actionscript functions (External Interfaces?) so that other can be used in other different applications via CallFunction API. I have few questions regarding this -
Are the tools for this are freely available? I know Flex SDK is but I want standalone swf (I means Flash Player 10) that can be used anywhere without any dependency and should contain FLV player embedded or should be able to load it from a particular location by supplying the URL.
Is it possible only with an ActionScript compiler (or any free tools?). My problem is that I don't have flash or flex builder and I don't want to spend money on these because I don't work on it.
As I have almost zero knowledge about it. Can you guys please explain me (if possible with details) that what I need to do. Any resoures on how to create and compile?
If any of you have ever done this it would be really great if you guys can share samples. I've heard that many people have done the same thing for video players.
I can share a bit of my setup
I use Flash (CS5) for creating assets
I use FlexSDK as the compiler
And do all the code in FlashDevelop
Flashdevelop is for PC only for now, it's free and comes since the last few versions now with a debugger
I use FlexSDK to compile and Eclipse with AS IDE or something along those lines, and then preview things in a web browser using an html page with the swf file embedded.
check out projectsprouts. its a pretty nice Flash (as2/3/Flex/AIR) generation tool that can help you stub out your project, compile it, and even create unit tests if you want. pretty simple ruby install (i am a ruby newb, and got is running pretty easily). It was a pretty good support base, and an active mailing list where people will be happy to help you along.
It is important to note that the FlexSDK has very little to do with Flex unless you are linking against classes that are Flex specific. mxmlc does not have anything to do with MXML even though it will also compile MXML.
Here is an article that describes Flash development on Linux. It is pretty old, but the principles are the same. With an Actionscript 3 Compiler (contained in the FlexSDK) and a text editor, you are off to the races. It is a lot easier with Flash Builder 4, FDT 4, Intellij IDEA, Flash Develop, etc ;)