April 23rd, 2011, 07:25 PM
AS1 to AS3
I am new to the forum and looking to get into AS3 more. I have not done AS since AS1 and I have skipped AS2. I am trying to get back into it but most forums like ultrashock and actionscript.org seem to be a dessert. I hope this forum is more lively as I need a lot of help with AS3 and learning it.
How can I convert this code from AS1 to AS3
This code is inside a timeline of a movie clip
This was inside a timeline of another separate movie clip
This was on the preloader movie clip.
April 24th, 2011, 05:38 AM
Hi, the first block of code is quite simple to update since little has actually changed in the syntax:
As for the second block of code, well that's a fair amount to cover and since in explaining each line out I would be robbing you of the chance to learn something new yourself, I think the best thing would be if you read through an AS2 to AS3 migration guide which you can find here. I know you said you skipped AS2 but mostly what that really did was add extra functions and classes to AS1, syntax wise not a lot changed, at least from the level of code you posted.
// Sticking "this." as the prefix helps identify what you are intending to gotoAndPlay.
// The random function has changed so it is now clearly part of the Math package.
this.gotoAndPlay(Math.random() * 30);
scale = (Math.random() * 31) + 70;
// All properties that before were prefixed with an underscore now have none.
// Also, the naming convention has been standardised so the operation comes first (scale) then the property it adjusts i.e. X or Y.
this.scaleX = scale;
this.scaleY = scale;
Quis custodiet ipsos custodes?
April 25th, 2011, 04:05 AM
I believe there is plenty of software available online that can help you with that particular task
April 25th, 2011, 05:57 AM
That's weird. I did not receive a notification that I got a reply. I am subscribed to this thread. I should have received one.
Anyways, thanks for your help.
I am not a programmer but a designer. I do a lot of design and animation work so studying to be a developer is not an option right now. I am not really into programming. The only language I can understand is html, PHP and AS. I am mostly ok with AS but since I have skipped AS2 I thought I would go straight into AS3.
I would like to do things like change a line of code, make preloaders, contact forms and mostly the basic and intermediate stuff like an interactive website. I am not really a developer and would not be getting too deep into AS.
Would you be able to convert that code for me into AS3? I don't think my schedule and hectic work life will allow me to study up on AS3 then convert that preloader to AS3 language.
April 25th, 2011, 06:26 AM
You see, when you open with:
That made it sound like you actually wanted to learn something. I'm not going to convert the last block of code for you as I too would rather spend my time doing other things. I can move the thread to either the "Project Help Wanted" or "Hire a Programmer" forums or you could just search for a ready made AS3 preloader since there are a lot of them out there already.
Quis custodiet ipsos custodes?
April 25th, 2011, 06:38 AM
As I have said, I am a designer and I am trying to get back into it but not as deep as before. Only basic stuff like interaction between movie clips, contact forms etc... Nothing advanced as I used to be with AS1.
Thanks for your help though.