I’m a complete beginner in HTML/JS, though I’ve written a lot of games in Flash, which I’d like to convert, or at least be able to re-use most of the graphical assets when converting them.
Flash CC proposes to do just that, using the CreateJS libraries, and provides a very basic tutorial, but somehow I cannot make it work (http://blog.gskinner.com/archives/2015/04/introduction-to-the-flash-cc-html5-canvas-document.html#comment-376140).
Can somebody give a step-by-step set of instructions for the first time you try to run a canvas app produced with Flash CC? something like: Do I have to set up some plugIn in the browser? how do I do it? do I have to download stuff? what? where do I put it?
Related
So there's this simple game, http://www.zigzagphilosophy.com/, that I've enjoyed playing around with every once in a while for a few years. However, I recently learned it was written in Adobe Flash, meaning its unplayable on most browsers currently and will be completely unplayable in a few months. Since it's a simple game, I decided I would try to port it to JavaScript by looking at its source code. However, the file index.swf that makes up the game simply downloads to my computer, where it cannot be opened by any means. How would I go about opening that file and being able to read the source code in a compiled form (e.g., looking like lines of code instead of just data)?
i have very little experience with javascript, though i read through the comments on your question and as you don't mind rewriting it yourself, i can recommend an swf decompiler for you. it's called jpexs flash decompiler and is accessible here. pretty sure it requires java and the gui looks pretty crappy but i can tell you from personal experience that it works well.
you can extract audio, images, basically whatever's there, as well as exporting to an fla or exe file.
i'm sorry i couldn't be of any more help than this, but i hope what i've written is at least useful :)
My plan was to create an interactive map thingy using .swf file that I'd make in Flash CS4 and perhaps incorporate it in my Visual C++ application, add some components and make an .exe file out of it. I obtained the platform from Adobe. My further plan was to get familiar with all the tools, learn ActionScript 3.0 and pick up some stuff from Visual C++ 2010 that I'll need along the way.
Later I was browsing the Web and read that Flash is getting pretty old and that everything is going towards HTML5, described as the latest HTML standard that uses CSS and some other stuff + JavaScript.
My questions are: Can I create my application like above described?
Can you make these kind of interactive applications (for offline usage) in HTML5?
If so, should I switch to it and what programming languages would I be obligated to learn? JavaScript? HTML syntax?
I am familiar only with the basics of C++ programming and I want to learn everything else I'll be using for my project along the way. I also apologize if my English is terrible, or if my question is badly put together.
Please help.
Have a look at the node-webkit project. In my opinion this is very promising: https://github.com/rogerwang/node-webkit
I need a good javascript library that can render musical notation to a browser page. VexFlow seemed promising, but it doesn't look like it could support multiple staves like are done in the piano or larger group orchestrations, and frankly a lot of things about it seem shaky.
What I'd really love is to have an interface to render Musescore, but my looking around their site doesn't seem very encouraging, because of their use of the qt framework. Any advice? Methods for porting the musescore codebase into a js file? Or even recommendations of other libraries? I'm hoping to not have to extend VexFlow myself, but I will if I have to.
I had created an HTML5 Canvas WebGL game in January for the Mozilla Game On 2010 competition (pretty late, I know - I never released it until yesterday). Now I want to port it to Flash ActionScript 3.0 for a college assignment.
I'm well versed with both static languages like C/C++ and Java; and dynamic languages like Python and JavaScript. However I don't know ActionScript, but since it's a subset of ECMAScript it should be pretty easy to understand.
I want to learn programming in ActionScript 3.0 so that I may be able to port my game in Flash. To be more specific, I want to know more about:
How is ActionScript different from Browser and Server-Side JavaScript, and basics.
OpenGL programming in ActionScript (including loading textures, shaders, etc).
How to create a HUD in Flash using a 2D HTML5 Canvas like API (in my game I have 2 canvases, one for the 3D game and another overlaying it for the heads-up display).
Support for vector and matrix calculations in ActionScript.
How to load assets like audio and sprites in Flash.
I would appreciate it if you would provide me a link to a page from where I can learn more about these topics. A more direct hands-on approach would be preferable.
It would be even more helpful if you would check my source code in JavaScript and suggest the best possible way for me to tackle this problem.
The code for the main game engine and the game itself may be found in my Github repository.
ActionScript and JavaScript are very similar at their core. In some ways you can think of ActionScript as more like a robust library layered on top of ECMAScript. There are a few differences (namely ActionScript likes to think of itself as a class-based oop, where as JavaScript is prototype-based), but if you are comfortable with one, then you should be pretty at ease with the other.
ActionScript has a class based inheritance system and supports interfaces (but you can still do some prototypical magic if you want, but its not recommended). It also supports strongly-typed objects.
var object:MovieClip = new MovieClip();
This will strongly type the object variable as a instance of the MovieClip class.
If your game is very 3D intensive, then you'll want to look into the new Flash 11 Stage3D and Context3D classes. These expose a low level GPU accelerated API that before Flash 11 wasn't possible. You can do interesting 3D stuff with Flash 10, but you are usually using drawTriangles(), which was not hardware accelerated. Flash 11 is currently in beta, but it should be out very soon. There are beta versions of the Flex SDK that should let you compile targeting the Flash 11 player.
There are also quite a few 3D libraries that are built on-top of these low-level api. If you goggle around for them, they are easy to find. But I would recommend getting a solid understanding of how ActionScript works before diving into the 3D libraries.
The HUD stuff in flash is simple whether you go with Flash 11 or Flash 10. For "classic" flash, you'll want to get familiar with the display tree concept they use in flash. Just make sure the display order is correct, and your HUD DisplayObject will always be "on-top" of your rendering DisplayObject
For Flash 11, StageVideo and Stage3D objects sit directly above the stage, but behind all normal flash DisplayObjects that are attached to the stage. So in that case, I would let the Stage3D api take care of all of your heavy rendering lifting, and use the traditional display stack for your HUD elements.
You'll probably also want to grab yourself Flash Builder over Flash CS5.5. If you are a programmer (which I am assuming you are since you are posting here), it wont make your eyes bleed trying to code. FB is based off eclipse, and its pretty decent but not perfect. But if you grab yourself the free Flex SDK, and don't mind using the command line, you can get started compiling swfs pretty quick and cheap (aka free).
Also, look into FlashDevelop. I haven't used it in a while, since switching to FB for its built in profiler, but it might be of use to you.
Importing images and audio is pretty straight-forward with the Flex SDK.
[Embed(source="logo.gif")]
public var LogoBitmapData:Class;
and then later instantiate the class:
var bitmapData:BitmapData = (new LogoBitmapData()) as BitmapData;
And then use it where ever you want to.
Just a note about the Flex. Flex is a set of UI libraries built on top of the normal Flash API, the Flex SDK includes the libraries and tools to compile MXML and ActionScript code files. So, despite it sounding like you should use the Flex SDK to compile Flex apps, you can use it to compile straight ActionScript code as well.
There are built in classes for Vector3D and Matrix3D.
As far as tutorials or references, I don't have any to offer really. I've found that most of the information on the internet about ActionScript programming is pretty hit or miss (when you can find something thats not written by a graphic designer). I'd dig around in here and see if you can find anything that makes sense to you.
There is obviously a lot more I could go into about this stuff, but hopefully this will give you a push in the right direction.
Welcome to AS3 :)
#32bitkit beat me to the IDE info, but I'd absolutely recommend Flash Builder. It's a real tool and worth the money if you're going to be doing any real AS3 work.
As far as actual tutorials, Senocular is known for writing some of the best content out there. He has a number of great tutorials here, but the following two are especially excellent introductory tutorials for AS3:
AS3 Introduction in Flash CS3 This tutorial is good because it explains the differences between AS2 (very JavaScript-like) and AS3. Ignore the fact that it's based on using the Flash "IDE."
AS3 Introduction Without Learning Flex This one is useful because it give more of an introduction to the language itself, without all of the trappings of the IDE or the Flex framework. It will help you understand the language itself.
As shown in that second tutorial, an AS3-based project will inherit from the flash.display.Sprite class. You can view the docs for that here. Perhaps it sounds silly, but you'll honestly learn quite a lot about AS3 by just browsing the AS3 Reference docs. Adobe has done a good job with those.
Another thing to be aware of in AS3 is how events are handled. This tutorial explains how the EventDispatcher class functions as the base of the event management. You can use the built-in events or dispatch your own.
HTH!
I'm playing a flash game on facebook. I know I can decompile it to find out all the commands and would like to make scripts to automate the game by calling procedures in the actionscript of the game. So I guess I would like to make a plugin also that would insert this console into any flash app and this would be handy for a lot of things. Then if anyone wants to hack a new game, u just decompile it and make a handbook of methods for people to make scripts with. So how would I go about making this console? I don't know if I could make a swf interact with the game or if it has to be compiled into the game's swf. Or if it is easier with javascript, that is cool too. maybe we can make a javascript library just for this. anyone can tell me more?
Sorry, but you can't do this, the Flash security model won't allow it.
The console would need to be compiled into the original SWF, which you could only do as the original swf author.
Well, you could interact with the original game servers as the flash (.swf File) does it.
I tried it too, but it is pretty tricky because some parts of the package content is being encrypted.
I don't know how to decompile the game files so you could maybe write the same algorithm inside your program and communicate with the servers. Clientless.