Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Flex Dynamic keyword

Have Programming Question? Ask it here!
 
 
 


bikrantsingh
Dynamic keyword
1 Answer(s)      3 years and 11 months ago
Posted in : Flex


hi.......
What is the dynamic keyword used for in flex?

give me the answer ASAP

Thanks

Advertisement
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



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
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
Java keyword
Java keyword  Is sizeof a keyword
super keyword
super keyword  super keyword explain
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
final keyword
final keyword  why is final keyword used in java
DYNAMIC BINDING
DYNAMIC BINDING  WHAT IS DYNAMIC BINDING
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
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
static keyword with real example
static keyword with real example  static keyword with real examplestrong text
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 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 jquery statement
dynamic jquery statement  dynamic jquery statement
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
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
transient keyword - Java Beginners
transient keyword  what is transient keyword in java.? plz explain with example
why using static keyword
why using static keyword  why using static keyword
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 query
dynamic query  DECLARE QUERY VARCHAR2(32767); FIN_QUERY VARCHAR2(32767); CURSOR C IS (select distinct PORTFOLIO from MPE_TEST1); CURSOR C2 IS SELECT DISTINCT PORTFOLIO_LEVEL, PORTFOLIO FROM MPE_TEST1 ORDER
The volatile keyword
The volatile keyword       The volatile is a keyword defined in the java programming language. Keywords.... The volatile keyword is mostly used to indicate that a member variable
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
create dynamic array in javascript
create dynamic array in javascript  How to create dynamic array in javascript
static keyword in interface
static keyword in interface  Could any one explain,why static keyword implict (or explict ) come in interface? I asked lot of persons about this question, but nobody did not answered clearly. please explain clearly and say what
The extends keyword
The extends keyword In this section you will learn about extends keyword in java. The extends is a keyword in java which is used in inheritance. It is used to specify super class in a class declaration. Using this keyword a subclass
The extends Keyword
The extends Keyword       The extends is a Java keyword, which is used in inheritance process of Java. It specifies the superclass in a class declaration using extends keyword
how to add dynamic data
how to add dynamic data  how to add dynamic data to an existing web application
dynamic web pages in html
dynamic web pages in html  How to create Dynamic web pages in HTML
static page and dynamic pages?
static page and dynamic pages?  what is the static page and dynamic pages
static page and dynamic pages?
static page and dynamic pages?  what is the diff between static page and dynamic pages
static page and dynamic pages?
static page and dynamic pages?  what is the static page and dynamic pages adv and disadv
Dynamic include jsp
Dynamic include jsp  I need dynamic include jsp page with an example
The byte Keyword
The byte Keyword       The byte Java Keyword defines the 8-bit integer primitive type.  The keyword byte in Java is a primitive type that designates with eight bit signed
dynamic image change javascript
dynamic image change javascript  How to display images in JavaScript dynamically
Super - keyword
Super - keyword       super keyword super is a keyword in java that plays an important role in case of inheritance. Super keyword is used to access the members of the super class. Java
Dynamic Array iPhone
Dynamic Array iPhone  Dynamic Array iPhone How can i add NSMutable array dynamically into my iPhone App
The boolean Keyword
The boolean Keyword       The boolean Keyword in java avails one of the two values that are true and false. Java have the boolean type so literal values true and false. 
while Java Keyword
while Java Keyword       The while is a keyword defined in the java programming language... to a compiler in java programming language likewise the while keyword indicates
Dynamic polymorphism - Java Beginners
Dynamic polymorphism  Develop with suitable hierarchy, classes for point, shape, rectangele, square, circle,ellipse, triangle, polygon, etc. Design a simple test application to demonstrate dynamic polymorphism.. Thanks
Advertisements
 

 

 

DMCA.com