Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become an Expert!

Join 416,727 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,950 people online right now.Registration is fast and FREE... Join Now!



Hello World?

#1 Dilerious  Icon User is offline

  • D.I.C Regular
  • Icon

Reputation: 1
  • View blog
  • Posts: 277
  • Joined: 30-December 05


Dream Kudos: 365

Share |

Hello World?

Posted 17 February 2006 - 11:45 AM

I have viewed other programming languages and they all seem to have a beginner "Hello World" tutorial
One tutorial it said that it is a traditional thing for all languages
But i have never seen one for flash?
Does anyone know why there isn't one?
Or can someone contribute it :)
Was This Post Helpful? 0
  • +
  • -


#2 WMIIII923  Icon User is offline

  • D.I.C Head
  • Icon

Reputation: 1
  • View blog
  • Posts: 101
  • Joined: 10-February 06


Dream Kudos: 185

Re: Hello World?

Posted 17 February 2006 - 11:52 AM

Maybe its because flash is more object oriented unlike other languages flash doesnt need to be programmed to display text.
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • Icon

Reputation: 622
  • View blog
  • Posts: 18,448
  • Joined: 17-March 01


Dream Kudos: 1650

Expert In: Web Development

Re: Hello World?

Posted 17 February 2006 - 12:26 PM

There are various ways to do hello world in flash, the easiest would be to just type "Hello World" as text on the stage.

From a programatic standpoint, you'll probably want to drag a text field on the stage, name it field1 or whatever, then in the first frame type: field1.text = "Hello World"

That should do it.
Was This Post Helpful? 0
  • +
  • -

#4 theRemix  Icon User is offline

  • D.I.C Regular
  • PipPipPip

Reputation: 11
  • View blog
  • Posts: 434
  • Joined: 19-October 05


Dream Kudos: 0

Re: Hello World?

Posted 17 February 2006 - 11:49 PM

a faster way for the programmer to see "Hello World!" would be:

on the first frame (press f9 for actionscript panel)
trace("Hello World");



then try
var hello:String = "Hello World of variables in AS 2.0";
trace(hello);


Was This Post Helpful? 1

#5 pioSko  Icon User is offline

  • still.dreaming
  • Icon

Reputation: 18
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03


Dream Kudos: 225

Re: Hello World?

Posted 18 February 2006 - 03:51 AM

trace() is the best way to test the value of a variable. However, it's only a tesing/debug output that is only seen while working in Flash.

If you want a "Hello World" to be seen on stage and therefore the exported SWF, you need to have an object with which to do it with. This object in it's most basic form is a text field to which you send the string "Hello World"... (like skyhawk said). You can place that text field on stage manually or using actionScript.
Was This Post Helpful? 0
  • +
  • -

#6 Dilerious  Icon User is offline

  • D.I.C Regular
  • Icon

Reputation: 1
  • View blog
  • Posts: 277
  • Joined: 30-December 05


Dream Kudos: 365

Re: Hello World?

Posted 18 February 2006 - 06:16 AM

I asumed there would be more than one possible way to display "Hello World" I was just wondering why it is never displayed in a tutorial.
Was This Post Helpful? 0
  • +
  • -

#7 pioSko  Icon User is offline

  • still.dreaming
  • Icon

Reputation: 18
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03


Dream Kudos: 225

Re: Hello World?

Posted 18 February 2006 - 07:42 AM

Usually the "Hello World" tutorials show the first and basic steps of a programming language or whatever you're doing. In Flash, there are certain things you need to learn before you even start actionscript.. like getting around the program, tools, the library and symbol/instance concept, timelines ..etc etc.

By the time you get to actionscripting objects, you have a basic idea of how it will work, but even then there are other simpler things in actionscript that precide the "Hello World" lesson. At first tutorials start with the play(), stop(), gotoAndPlay() and gotoAndStop() functions... which is working with objects and animations.

It's when you get to describing the different types of variables, and start talking about Number and String variables, that the "Hello World" comes in.

:)
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users