header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Priyanka Kshirsagar
Points:0
Posts:0
Answered

8/9/2011 4:06:25 AM

Title: How to make any class as singleton class in flex4?


Can anyone tell me how to make any normal class as singleton in flex 4?
like for example my class name is model. so how i will convert this class singleton pattern?
Please reply me as soon as possible.



1
Shridhar
Points: 0
Posts:0
Accepted Answer
8/10/2011 1:53:33 PM



Hi Priyanka,
Here is a code to define singleton class in flex

private static var _instance:anyModel;
public static function getInstance():anyModel
{
if(_instance == null)
{
_instance = new anyModel();
}
return _instance;
}

2
Priyanka Kshirsagar
Points: 0
Posts:0
8/11/2011 12:07:55 AM



Thank you Shirdhar,but I already got the solution.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions