Dynamic keyword

Ads

 
 

Share on Google+Share on Google+

bikrantsingh
Dynamic keyword
1 Answer(s)      7 years ago
Posted in : Flex
hi.......
What is the dynamic keyword used for in flex?

give me the answer ASAP

Thanks
Ads
View Answers

October 15, 2010 at 12:02 PM


Ans: Dynamic keyword-> Specifies that instances of a class may possess dynamic properties added at run time.
For example: In Java, if you?ve created an object from a particular class, you can use only properties and methods that were defined in this class. For example, if the following class:

class Product{
String name;
}

you can only manipulate with the name property:

Product p = new Product();
p.name = ?colddrink?;
System.out.println(p.name);

ActionScript dynamic classes, which allow you to programmatically add new properties and behavior to classes during the run-time. Just add the magic keyword dynamic to the class definition:

dynamic class Product{
var name:String;
}

Now let?s add dynamically two variables name and price and the function printme() to the object of type Person:

Person p= new Person();
p.name=?colddrink?;
p.price=12;
p.printMe = function () {
trace (p.name, p.price);
}
p.printMe(); // colddrink 12


Ads









Related Tutorials/Questions & Answers:
Dynamic keyword
Dynamic keyword  hi....... What is the dynamic keyword used for in flex? give me the answer ASAP Thanks  Ans: Dynamic keyword... during the run-time. Just add the magic keyword dynamic to the class definition
What is this keyword?
What is this keyword?  What is this keyword
Advertisements
Keyword - this
Keyword - this       A keyword is a word having a particular meaning to the programming language. Similarly, this keyword is used to represent an object constructed from a class
Java keyword
Java keyword  Is sizeof a keyword
The if Keyword
The if Keyword         The if is a keyword, which is used to perform the selection... that are executed in case, the test condition specified by the if keyword evaluates
super keyword
super keyword  super keyword explain
final keyword
final keyword  why is final keyword used in java
DYNAMIC BINDING
DYNAMIC BINDING  WHAT IS DYNAMIC BINDING
The for Keyword
The for Keyword       The for is Java keyword that is used to execute a block of code... statement increments the value of i by one. The for keyword may not be used
transient keyword
transient keyword  how to use transient keyword?   Hi Friend, The transient keyword is used to indicate that the member variable should not be serialized when the class instance containing that transient variable
Return keyword
Return keyword  how do we use return in methods?   Java use of return keyword import java.util.*; public class ReverseString{ public... at Return Keyword
dynamic report
dynamic report  i need complete code for generating dynamic report in jsp
static keyword
static keyword  please give some detail about Static keyword.   Static Variables Static variables are class variables that are shared by all instance of class .. 1)It is a variable which belongs to the class
SQL as Keyword
SQL as Keyword       The SQL Key word used in SQL are createTable,Insert into,select,delete... keywords like, create table keyword is used to create a table Stu_Table
dynamic polymorphism
dynamic polymorphism  Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism
static keyword with real example
static keyword with real example  static keyword with real examplestrong text
The final Keyword
The final Keyword       The final is a keyword. This is similar to const keyword in other languages. This keyword may not be used as identifiers i.e. you cannot declare
dynamic polymorphism
dynamic polymorphism  give an example for dynamic polymorphism?   Dynamic polymorphism is where a class overrides a superclass method... seen at runtime, so they are considered dynamic. Here is an example
this java keyword
this java keyword       "this" is a keyword defined in the java programming language. Keywords... in java programming language likewise the this keyword indicates the following
dynamic jquery statement
dynamic jquery statement  dynamic jquery statement
why using static keyword
why using static keyword  why using static keyword
transient keyword - Java Beginners
transient keyword  what is transient keyword in java.? plz explain with example
dynamic textfields
dynamic textfields  Hi, I am a fresher and joined recently in one company. they gave me a desktop application project using swings.here is my detailed spec Screen 1 - The user enters the ingredients from a food product, saves
Dynamic form
Dynamic form  I need to make a dynamic form using jsp for example, i will need a list of items which when we select one option another list is modified ( like 2 lists of countries and citys ), and also a radio button wich once
The void keyword
The void keyword       The void is a keyword defined in the java programming language. Keywords... programming language likewise the void keyword indicates the following
The While keyword
The While keyword       While is a keyword defined in the java programming language. Keywords... programming language likewise the while keyword indicates the following
dynamic form
dynamic form  I need to make a dynamic form using php, for example, i will need a list of items which when we select one option another list is modified ( like 2 lists of countries and citys from a dtabase ), and also a radio
dynamic calender
dynamic calender  hi i need the code to "insert date using GUI"   Hi Friend, Try the following code: import java.awt.*; import java.awt.event.*; import javax.swing.*; class DatePicker{ int month
PHP Dynamic CheckBox
PHP Dynamic CheckBox  Help with Dynamic Checkbox in PHP
php dynamic array checking
php dynamic array checking  php dynamic array checking
php dynamic array checking
php dynamic array checking  php dynamic array checking

Ads

 
Advertisement null

Ads