Table of contents for Adobe Flash CS3 - Creating a simple application
- Adobe Flash CS3 - Creating a simple application
- Adobe Flash CS3 - Creating a simple application Pt.2
- Adobe Flash CS3 - Creating a simple application Pt.3
We can do that with RTP because it needed data provider and then we add items to it. So dp add items and object that has a label and the first one I am going to add is tomatoes.
And I will save some time here click and paste few of these. Instead of having four tomatoes lets have some thing else. Lets say turn up, a blueberry and a carrot. So now we can connect the data provider with our list by calling my list.Data provider it goes dp. Now if we test this movie we can see the contents in my list. We can even select them. Now the next step is to add listeners so we are going to add an event listener to mylist for listening to event. Change. This happens every time you click.
So now select the function. And also every time you select it we also get the opportunity to remove it from the list. So we are going to call that eat item and we are going to listen to mouse event. Click and then create a function. Announce select and this is going to expect an event which will call eat.. And eat item is the other function which is also called eat but it is the mouse event…and now what happens when we select the item we just trace out. So you have selected an item and then we can give the name of the item by calling mylist.Select….select an item…and a label…and we can save some time here by copy here and paste that in to the eat item..
And instead of saying you have selected it I can say have eaten it and…One thing more lets remove it from the list by calling dp which is our data provider remove item.mylist.selected item. Now if we test this we can see as we select an item in the list it announces you select or turn the blueberry or carrot and as you hit the eat item button it removes it from the list and traces out also.
That is a pretty simple application which shows you to the basic of using events in action script.
In case you didn’t see the video in part 1 of this series… here it is again.
Tags: maze game flash tutorial, adobe flash comments, macromedia flash player vista, download adobe flash player, free flash tutorials, slide event flash flv tutorial, adobe flash certification exams
Related Articles
1 user responded in this post
[…] Pt.2Adobe Flash CS3 - Creating a simple application Pt.3 We can do that with RTP because ihttp://www.learn-flash.net/flash-tips/adobe-flash-cs3-creating-a-simple-application-pt3/Flash Commodore C64 emulatorFC64 is a low level Commodore C64 emulator written in AS3, requires […]
Leave A Reply
Please Note: Comment moderation maybe active so there is no need to resubmit your comments