Basically I have an project where I would like to modify some text in a XML file rather than in the document itself.
I've had a Google and all the tutorials lead to AS2 which doesn't work in Flash CC. I've also downloaded some templates off ActiveDen but they are all in AS2.
Anywho is there any good starting points to do this? I'm a total noob at AS but what I'm asking for doesn't sound too hard.
Cheers,
You can always Google using keywords, like writing your question's title, I found this tutorial
Try to follow step by step and I'm sure that you will learn and solve your issue.
Related
So, I was just wondering if anyone could give me a succinct answer on why exactly it's better to code mostly in an AS3 file as opposed to most on the timeline?
I've heard a lot of people answer questions with a cop-out "don't put so much code in your timeline". I've tried both ways and found some pros and cons on each, but it just seems silly to me for so many people to parrot the general good coding practice techniques.
Another thing about that is that a lot of times I'll be searching for help on coding, and people will give such complicated responses, and half the time I'll use little snippets of code as well as incorporate a small portion into my projects. Also, the AS3 API site also gives waaaay overcomplicated coding examples. Why do people do this? I could figure out some of my issues much more quickly if people just simplified the code examples.
Three good reasons not to put it on the timeline:
Your code will be stuck inside a binary file, not allowing you to use version control nor review changes to it.
You're going to hide code behind menus, making it hard to review in an instance. When it's all in one place you can easily refactor it, and change it.
By putting code on your timeline, you're making your code be dependent on the Animate compiler. (Animate is going to take your code and inject it into your document class using the undocumented function addFrameScript to make things work). The code isn't easy to migrate in this form, if you ever feel the need to re-code in another language.
Please use an IDE when coding. It will help prevent mistakes and even suggest ways to make your code simpler. (To name a few IDEs: FlashDevelop, VSCode, IntelliJ Idea Ultimate (paid).)
To clear up any confusion, writing code in an AS3 file instead of the timeline doesn't mean make things less organized or put code where it doesn't make sense to put it.
What you should be doing is creating a new AS3 file for every MovieClip that you need scripted, then going into the Symbol Properties of your movieclip and selecting Export for ActionScript and set the class name to your AS3 file. The runtime will automatically declare the instances in your file at compile time. What you can do is actually declare them yourself in the file, to have full completion capability in your IDE.
What I like doing is first setting the movieclip to export for actionscript, publishing my project, then opening the compiled swf using Free Flash Decompiler, and copy paste the generated class into a new AS3 file. (You'll want to only copy paste the class and generated instance variables.) Then you can code in your AS3 file with all the symbols contained within the MovieClip already referenced.
Is there anywhere a GOOD tutorial page where I can learn ActionScript 3 ? Or can you help me out ?
I don't use a GRAPHICAL DESIGNER and I don't want to. All I need is code.
For example: things I need to learn quick:
Buttons and TextFields (basic form stuff)
Drawing canvas (like the html5 canvas)
Using FlashDevelop + Flash SDK, no plugins, no nothing. I just got it to work (compile, build and start a blank piece of nothing) and now I need to see what I can do with the ActionScript code.
Solved: Thanks to Dannyw the 2 items above could be solved directly (with minor additions)!
Julian's answer is very helpful too. Since I also wanted to browse through all standard classes in Flash:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html
I have some tips for you to become a great flashdeveloper:
Drop everything you know, start fresh. You have strange assumptions of how the workflow should be. If you want to become professional, you should be open for other workflows.
If your coming from actionscript 2, Dont think as2 is like as3, so don't try to do the AS2 thing with AS3. Again, drop everything you know.
Read & Learn the Adobe LiveDocs
Learn how the display list works.
Learn AS3 coding standards, learn to write clean readable code, later try to learn design patterns.
Learn how to use common actionscript libraries, TweenLite, Gaia framework, RobotLegs, Temple Library, Pure MVC, Away3D, as3corelib etc.
Dont try to reinvent the wheel, dont create your own framework, because you think there is none like yours, most starters step into that trap.
Code never inside the Flash IDE actionspanel, there are really nice actionscript editors like FlashDevelop, FDT, FlashBuilder, IntelliJ. But dont lose yourself in code, there is a lot visual stuff that can faster be build using the Flash IDE, so find a nice workflow, instead of limiting yourself.
if you like video tutorials; videos on gotoAndLearn.com, most have common practices.
If you like to learn from opensource projects: find as3 projects on github.com or wonderfl, check out how they did it.
if you like to read blogs: feeds.adobe.com is full of nice relavant blogs. Learn from the best.
Last but not least: there is no ultimate guide to become a flashdevelop-code-only-flash-developer. Like sport, you have to train and just experiment right away. So be open, use google alot, try to challenge yourself with excercises and fun experiments.
For buttons:
http://www.how-to-code.com/as3-actionscript3/as3-buttons/as3-button.html
For Textfields:
http://www.republicofcode.com/tutorials/flash/as3text/
For Drawing:
http://www.republicofcode.com/tutorials/flash/as3drawvectors/
I learnt actionscript the same way you intend to, just by reading tutorials on the internet and picking bits up as I went along. I eventually bought myself a big old actionscript bible too (Essential Actionscript 3.0 by Colin Moock), but can safely say that the internet was my most valuable resource!
Have fun with the tutorials :)
Use this:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html
BTW, You should almostly declare this website as holy when programming in AS3.
Using adobe flash or macromedia is recommended, follow these tutorials I learnt everything about flash from this website.
http://www.lynda.com/Flash-CS5-tutorials/flash-professional-cs5-essential-training/59964-2.html
I am really astonished by the Story of send from Google.
Could anyone tell me how does it work under the hood? Where should I start to learn this set of techniques to build such a nice and great website?
Where should I start? Is it purely HTML5&CSS3?
Here are some discussion on hacker news thread:
Very well, that’s how. A quick look reveals that each scene is a section, the assets are linked with data attributes, and the rest is fancy combinations of TweenJS and Three.js animations, coordinated by /assets/js/main.min.js (which also handles the invisible history).
It also appears that Swiffy, the SWF-to-HTML converter (http://www.google.com/doubleclick/studio/swiffy/) was used for helping to generate some of those animations.
Still can figure it out how it works, thank in advance!!!
Guides / Useful sites:
Basics - http://www.w3schools.com/html5/
Advanced - http://www.html5rocks.com/en/tutorials (This is a google project)
Demos - http://html5-demos.appspot.com/
From Apple - http://www.apple.com/html5/
swiffy: I have tried for one of my mobile apps, it worked well. But there is a limit of 1mb for swf file.
storyofsend: yes, Its is using three.js
I'm very new to flash and as3 design patterns. But I can read and write as3 quite ok, i've created small widgets with that. I've developed several web sites using php and also python.
Now for a educational cd-rom project i'm working on, i've basically designed all templates (A home page, a generic page with navigation and a sidebar - kind of like a wordpress blog). I have all the data for the cdrom on word files, which i intend to place on xml files.
My question is what is the best way to start a project like this? Can anyone guide me to a template or something that can be used for kickstarting this? kind of like a wordpress (without the admin)? Or am i on this all wrong? Can someone please help
The Gaia Framework may be useful to you for this project.
As I was working on this project for a friend of mine who is terrified of changing from HTML to flash, I realized that maybe there could be a bridge between them. So I started working on a flash project that would grab the HTML from his page and parse it to display it in flash. Although I am sure there are resources available for this already, I figured that the experts on SO might be willing to suffer through the logic of one user trying to develop this script.
So basically, I am not asking for an answer, I am asking for some step-by-step direction that could be posted so other people could see the logic behind breaking down this project. I think it would be really useful (not just for me, but for anyone wanting to learn more about objects and oop).
So, much like the thread between primarily Senocular and Rampage, this would be a thread where I would be the student asking the questions in a logical step-by-step manner and someone else (or someones else) could provide guidance.
Let me know if you are interested and I can start by posting what I have already written. We can go from there and I am sure it will prove insightful to anyone who reads it. If no one is interested, or no one has the time or inclination, no problem.
Best wishes,
Jase
Who in their right mind would change from html to flash for displaying a simple website? I don't see the logic behind it, it's more like you are trying too hard. Flash has its function in the web, as well as html does. If it's just for simple displaying, using flash is just the wrong way and won't make your website any better but worse because its loading time will be too long.
Goole Search retrieved these:
HTMLWrapper
Groe.org HTMLParser
There is an article about the 1st on *drawlogic. I think the seconds' home is on sourceforge here.
Thing is, browsers already do a fine job at parsing html code. Having the flash player parse html files not only does away with any accessibility advantage your markup can offer but it also feels like reinventing the wheel. If you need to display html content, leave it to the browser.
Slightly offtopic - Flashpaper can convert most HTML pages into swf format.
Given properly "disciplined" HTML, you can use the XML parser in the player for the basic parsing. Are you really talking about writing an HTML renderer in Flash though? Or just being able to pull information from HTML dynamically?