Table of contents for Tutorial - Adobe Flash CS3 - Righting action script
- Tutorial - Adobe Flash CS3 - Righting action script
- Tutorial - Adobe Flash CS3 - Righting action script Pt.2
- Tutorial - Adobe Flash CS3 - Righting action script Pt.3
First we gonna take out this code, which is made a simple button with it, and we gonna replace that with counter.
“I” will count vertical and J will count horizontal. We will keep track of the positioning of buttons with ‘pause X’ and ’pause Y. You will keep track of button size, actually button size won’t change, they always between 25 with width and height. I’m creating a wild loop now checking to make sure that ‘pause Y’, is lessens stage height, as is on this we going through loop, and in inner side we will make another loop, ‘pause X’, as on it sets less than stage width. And more, enter this loop, each one we wanna make sure the increment its counter. And every time we create a new row, we wanna make sure that the pause X is reset to zero. And J is reset to zero so that we can start from left side.
Pause Y will become the vertical row counter, times the buttons size. On the inner loop now I guess, we set pause X equals to J times the button size. And we have created a button, for B is a new button, we set B size both width and height to button size. Well move it to our Pause X, Pause Y, We will give it a label which is, our get random letter function, which was here before, and we added to the stage. Just move it. One of the advantage of creating buttons using the action script is we can change the button size. And say you wanna double the size, test it again.
And now we accommodate itself by building it just as the way we need it. Also we can change the properties. Again from properties panel we can change the size of a movie. Lest say that we wanna to make it 700X500 this time.
Test is again. And again, the buttons fit pretty well. Now if we doing this all by hand and dragging button this stage.
Even if you would wanna to make the small changes, that can be related yes. So this is gonna event that just you got from creating your buttons using action script.
This is part of a series of posts, you can read the rest of it by clicking on the links for the Table of Contents at the top of this post.
Tags: macromedia flash 6, adobe flash player 8, capture adobe flash videos from websites, test adobe flash player, adobe flash palyer, 6 download flash macromedia player, macromedia flash player
Related Articles
No user responded in this post
Leave A Reply
Please Note: Comment moderation maybe active so there is no need to resubmit your comments