Home Register Members List Search Today's Posts Mark Forums Read

Go Back   TechFuels Forum > Technology Jargons - What is ....? > Software Jargons > Programming

Reply
 
LinkBack Thread Tools
Walker
Junior Member
 

Walker is offline  
Old 10-27-2008, 09:41 AM
  #1 (permalink)
Creating a basic " Hello World " Program

Now let us go through the Hello World application. This Hello World is a single line text that is displayed on screen. It uses a single object-oriented class that is named as Greeter. This Greeter can be used from within a Flash document. A Greeter can also be used ina Flex application. Our first task is to create a basic version of a Flash application. Once it is created, our next target will be to include some new furictiomility by using which the user can insert a user name, at the same time the inserted user name can be checked against a list of other available users. Now let us see how we can create a

Hello World program using the ActionScript:
First you have to click on the File menu. Here a drop-down menu will appear and from this drop down menu you can select the New option. This will open the New Document dialogue box. You then need to select the Flash File (ActionScript 2.0/3.0) and then click OK. A new Flash document will then be displayed. Again, you need to click on the File option and then select the Save As option from the drop-down menu that appears. The document will then be saved with your desired file name. Say you save this document with the name Hello World.fla Here fla is the file extension for Flash CS3. In the Flash Tools palette you then have to select the text tool and you must drag this across the Stage so that you can define a text field.
This text field needs to be approximately 300 pixels wide and 100 pixels high. Next, in the Properties window, just type mainText as the instance name of the Text Field. Now you should navigate to the Timeline and here you have to click on the first frame of the Timeline. You then need to open the Actions panel. Here you have to click on the Window option and from the Window drop down menu you can select the Actions option this is needed for typing the code. Lets us learn how we can display the string "Hello World" using Action Script.

Follow these steps for creating the application:

• Open a Flash Document. If the new document needs to be opened in Flash
Actionscript 2.0, it should be set here
• Right Click on the 1st key frame
• Choose Actions
• Now type the following code

createTextField("greet", 0, 0, 0, 100, 100); greet.text "Hello World";

• With this code a text area will be created with depth 0 and position (0,0)
• The dimension of the created Text field will be 100,100 (pixels)
• In that text field the string Hello World will be displayed
• Press [Ctrl] + [Enter] to run the application

Name:  Creating a basic Hello World  Program.jpg
Views: 190
Size:  32.0 KB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limnor new "visual program" jack01 Programming 0 07-01-2008 02:22 PM
Google adds "OpenSocial Apps" to Orkut poulharis Everything Else 0 05-19-2008 09:17 AM
Managing Windows Aero from the context menu "Explorer" techno23 Windows Vista 0 02-23-2008 08:41 AM
Microsoft admits the existence of "legitimate threat" to Windows Vista techno23 Windows Vista 0 02-20-2008 01:13 PM
8500GT type GDDR3 memory - is the "path" Limit? techno23 Motherboards & Memory 0 02-07-2008 10:08 AM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright Techfuels


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98