Monday, December 28, 2009

In ActionScript I got 5 labels named x1 -> x5. How do I assign values with a loop not creating array ?

I tried this:


for (i = 1; i %26lt; 6; i++) {


x[i].text = i;


}





Not working though.In ActionScript I got 5 labels named x1 -%26gt; x5. How do I assign values with a loop not creating array ?
Try the following


for (i = 1; i %26lt; 6; i++) {


lab=eval(';_root.x';+i);


lab.text=i;


}

What actionscript can I use to get it to stop?

First, I'm new to flash. But as I'm creating animations and movies, when I preview them, they play over and over again. Is this because it's preview mode or will it do this unless I add some actionscript or something to get it to stop? TY.What actionscript can I use to get it to stop?
click on the frame you would like your animation to stop and press F9, this will open the Actionscript panel, type on the first line the following -





stop();





This action will stop at the end of the frame.What actionscript can I use to get it to stop?
Solution:





1. Click on the 1st Frame of the Timeline of your animation and notice that it is now black in colour with a small white circle.


2. Open up the Action script editor window by pressing F9.


3. Click your mouse on the line1 and type this: stop();


4. Test your movie again this time it will play once and stop.





Hope this helps.

How can I learn actionscript 3.0? Is that the latest version for actionscript?

I google for actionscript 3.0 tutorials and they all suck. Is that I guess the newest version of ActionScript. I'm just lost and confused and want to learn actionscript sp I can build a website on Flash. Can you recommend a book or website to help? Thanks.How can I learn actionscript 3.0? Is that the latest version for actionscript?
Yes, AS 3.0 is the latest one out. If you don't mind paying for a service and learn well with videos, Lynda.com is a great place to start, whether you're learning ActionScript 3.0 from scratch or from prior knowledge of AS 2.0.





You can also continue to use AS 2.0 without any issues if you'd like to build a website. As there aren't a ton of resources out there for AS 3.0, I would suggest sticking to AS 2.0 if you have little prior knowledge of ActionScript/Flash in general. A lot of web design firms are still coding with 2.0 as well.
  • facial peels
  • cleanses
  • serum cream
  • numbering
  • How long does it take to become an Actionscript 3 Guru??

    Let's say if I study 5 H per day?? How many months will it take me to achieve that goal?How long does it take to become an Actionscript 3 Guru??
    Studying it for 5 hours per day will make you proficient in a few months. Using it for a few months will make you even better. Honestly, it's a rule of thumb in the computer industry that you need to use a technology for 10+ years before you're truly an expert.How long does it take to become an Actionscript 3 Guru??
    well, probly need training discs too, you cant just learn it out of nowhere....probly about a year

    What is the best way to learn flash actionscript?

    i know flash very well but im not a programmer,i just want to know actionscript that use in macromedia flashWhat is the best way to learn flash actionscript?
    They have a tutorial on their website for free. It has several examples. Take those examples apart and you will see how it works. Before you do be sure you understand the timeline and layers well.What is the best way to learn flash actionscript?
    best site is her:


    http://www.webdevelopersnotes.com/tutori鈥?/a>

    How do I make an object move it's self in actionscript/flash?

    I have a graphic, converted to a symbol. I am sure there is a way to simply move the object along a vector, but I am not at all familiar with action script. If someone can point me in the direction of how to execute a function each time a frame ticks by it would help me out.How do I make an object move it's self in actionscript/flash?
    kk, on macromedia flash there are a few ways 2 do it. after u ave converted the object to a sybmol if u just want it to go in a straight line all u do is look at the timeline at right click somewhere around 30 and select insert keyframe. so on 0 put the object where u want it to start and on 30 where u want it 2 end. on 15 right click and select insert motion tween. control%26gt;play. if u want it to go somewhere else after that, go right click somewhere around 60 and select motion tween. On 60 select whee u want it to end. somewhere around 45 right click and selct insert motion tween. if u want two put in another shape moving in other directions. hide the layer u have already made (right click where it says layer one, hide layer) and right click and make a new layer (right click near layer 1, add new layer). draw shape%26gt;convert to symbol%26gt;repeat the previous steps. if u want to go even more complicated and turn one shape into another, do the same steps but make the last frame, a different shape from what u started on. at the bottom of the screen click properties. select shape tween (this will only work if u have clicked the timeline). control%26gt;play. should work. if u want to export the file click file%26gt;export%26gt;export as movie. save file, click ok. go into ur documents where it has been saved drag it onto a blank internet page and voila u wiill see it.





    hope i helped and that its not 2 hard to undersand





    if ur struggling just send me a message and i'll help u.How do I make an object move it's self in actionscript/flash?
    Here is your code - just copy and paste it to first frame of your flash document (CS3)


    use arrow keys to move the object


    :-)





    ////////////////////////////////////


    var UrShape:Shape = new Shape();


    addChild(UrShape);


    UrShape.x = 100;


    UrShape.y = 100;


    UrShape. graphics. lineStyle (3, 0x00CC99);


    UrShape. graphics. beginFill (0x000000, 1);


    UrShape. graphics. drawRect (0, 0, 100,100);


    UrShape. graphics. endFill();


    stage. addEventListener (KeyboardEvent.KEY_DOWN, MoveRectangle);





    function MoveRectangle (keyEvent: KeyboardEvent): void {


    switch (keyEvent.keyCode) {


    case 37 ://left arrow


    UrShape.x--;


    break;


    case 38 ://up arrow


    UrShape.y--;


    break;


    case 39 ://right arrow


    UrShape.x++;


    break;


    case 40 ://down arrow


    UrShape.y++;


    break;


    default :


    break;


    }


    }


    /////////////////////////////////////








    Anil


    anilkumarnd@gmail.com

    With Actionscript how do you control movieclips that are created at runtime?

    So you make a bunch of movieclips with the command CreateEmptyMovieClip and a name of (';movie'; + i). How could you then change their _x position in another section of the code?With Actionscript how do you control movieclips that are created at runtime?
    This is an Example:


    ////


    i=1;


    _root.createEmptyMovieClip(';movie'; + i, i);


    trace(_root[';movie';+i]._x);


    ////





    so you can call your Movie Clip of number i





    _root[';movie';+1]





    and for use any property like _x





    _root[';movie';+1]._x








    Good Luck