How Do I - define variables in flash

free web hosting
Open Discussion > CONTRIBUTE > Computers > Multimedia

How Do I - define variables in flash

Mononoko
were doing a course in ICT called multimedia, but i dont know how to define variables
and whenever i ask my teacher he always goes
"were not that far yet"

he doesn't even look at what i have done, assumes I'm not finished, when i am, the only thing i need now is a scoring system

Reply

shadowx
What language are you using? i would assume its visual basic, AKA "VB", if so the usual way to do this is with code like this:

CODE
Dim VariableName As Type

EG:

Dim Score As Integer

And then to assign a value:

Score = "1"


That probably isnt completely right but it will give you an idea, i, sure the first part, "Dim.." is fine but as for the secnd im not so sure, i dont use VB much. If its anther language let us know and someone can help smile.gif

I remember doing multimedia at college... it was dreadful...

Reply

Tetraca
QUOTE(Mononoko @ Jul 7 2007, 02:09 PM) *
were doing a course in ICT called multimedia, but i dont know how to define variables
and whenever i ask my teacher he always goes
"were not that far yet"

he doesn't even look at what i have done, assumes I'm not finished, when i am, the only thing i need now is a scoring system

I'm guessing C++ is the language you are using.
CODE
type name;

Where type is the type of variable. Where name is the name of the variable. The type can be int for integers, float for real numbers, char for characters(it will only store one character if it isn't an array or pointer), and a host of various other types that you might not find useful under normal circumstances at this point. This is the basic way to declare variables in any C-like language(Java, C, C++, mainly) but PHP, and Perl which don't require variables to be defined.

To assign a variable a value:
CODE
name = value;


Remember to put these in your functions like main() or it will be a global variable. Global variables are frowned upon in C.

 

 

 


Reply

galexcd
In the description of the topic is what language he is talking about: "define variables in flash". So I'm guessing you mean actionscript. Now most programing languages are very similar when defining variables. Flash isn't as strict as c++ is so you do not need to put the type of variable when declaring it. To declare a variable in flash all you need to write is
CODE
var variablename;


After the variable is defined, you can then set it the same way you do it as shown above in both c++ and vb (and also pretty much every other language).
CODE
variablename=value;


Value can either be another variable, a string (text, which must be surrounded in quotations ex: variablename="text";), or a number (there are many different value types for holding numbers, when you assign a number to a variable in flash it automatically assigns the variable to the correct type so you do not need to worry about it).

I assume your class will go over this shortly along with all of the different variable types.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. global variables in flash cs3 - 63.25 hr back. (1)
  2. define integers in flash - 76.45 hr back. (1)
  3. habbo.com - 131.82 hr back. (1)
  4. variable is not defined flash cs3 - 258.14 hr back. (1)
  5. flash defining integer variable - 624.56 hr back. (1)
  6. php define variable size - 279.05 hr back. (2)
  7. flash with c var - 671.64 hr back. (1)
  8. assigning variables in flash - 690.47 hr back. (1)
  9. flash define variable - 729.26 hr back. (1)
  10. similiar name variables flash - 738.28 hr back. (1)
  11. flash define vars globally - 741.63 hr back. (1)
  12. define global variable flash - 747.39 hr back. (1)
  13. how to define float type variable in perl - 764.54 hr back. (1)
  14. how to declare int variable in flash - 772.80 hr back. (1)
Similar Topics

Keywords : define, variables, flash

  1. Flash Video Recorder
    (2)
  2. Flash Tutorial Simple Motion Tween
    Introduction to motion tween (0)
    A motion tween is a moving object. In this tutorial we will learn how to make a flash with Adobe
    Flash CS3 Professional to move graphics around. Follow these steps 1. Open Adobe Flash CS3, click
    File New, Selection Action Script 2.0 and click OK (I prefer 2.0 for compatibility) 2. Now you will
    see a blank page like, now we will set the canvas size. Click the background or gray area. 3. Click
    Size button on the bottom Properties page. Enter the width, as this example will be width 400px,
    and height 300px. 4. Click OK 5. Drag a picture from your folder inside the CS3, or ....
  3. Flash Streaming
    flash streaming (4)
    Who what can tell about flash streaming? On mine this is the best way to show the other people that,
    that you can create. Except for that in fact you can use Live and on demand streaming solutions Free
    of charge, but on mine it depends as well on the "companies" to which you address. Not from all you
    can receive 100 %-s streaming. Interestingly to whom you have addressed for flash streaming
    /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> ....
  4. Photoshop, Flash And Fireworks Tutorial Site Links
    This has a huge links of useful sites (2)
    Adobe Photoshop Tutorials http://www.rainworld.com/psworkshop/
    http://www.reality9.com/tutorials.html http://www.spoono.com/
    http://www.stridingstudio.com/tutorials/ http://www.designsbymark.com/pstips/index.html
    http://geda-online.com/tutorials.htm http://www.thewebmachine.com/
    http://www.extremephotoshop.com/tutorials.aspx
    http://www.thinkdan.com/tutorials/photosho...-tutorials.com/
    http://www.designerslounge.org/tutorials/ http://www.eyesondesign.net/pshop/tuts.htm
    http://www.eyeball-design.com/fxzone/tutorial.htm http://user.fundy.ne....
  5. How To: Flash Streaming
    How to (if possible) stream a flash (*.swf) movie over the net (4)
    Hello, Searched through the forum but didn't find any hits on how to do this. I've designed
    a page that has an embeded flash movie (*.swf format). The page works great when I test it on my
    local server but when I post it on the net the movie (about 2 megs in size) takes a while to load.
    Is there any way to stream the movie as opposed to have the browser download it all at once? Any
    other suggestions to speed the loading of the page? Thanks in advance.....
  6. Steal Flash
    Easy? Too easy? (15)
    I do not like how stealing flash is so easy. I mean people do not even ask for permission anymore.
    It is so easy! I mean Cmon! I mean all you need to is get Firefox and boom steal anyone hard
    work! I some people like the people who made Ebaumsworld, just steal all of there content. I
    have tried to ask the creators if I could use there animations but they do not answer me so I take
    it. But it is the thought that counts right? I have heard something that protects it your site
    content from people like that is this true? Well I do not like how all sites are the s....

    1. Looking for define, variables, flash

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for define, variables, flash

*MORE FROM TRAP17.COM*
advertisement



How Do I - define variables in flash



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE