Vivek's profileVivek LakhanpalPhotosBlogListsMore Tools Help

Blog


    September 22

    Modularization of Flex Applications

    I was being asked for some days to give an online public session on http://www.WiZiQ.com/public/ related to Flex technology. Although I know I am not a good teacher but I thought why not share some knowledge. It might be of some help to beginners who just entered or are entering Flex development.

    So after thinking for few days i come up with a topic "Modularization of Flex Applications". Flash apps being heavy in content animation/graphics are always the contender for modularization be it in old Flash days when we use to create separate swf files and load them dynamically or now in Flex by creating modules, which creates separate swf files that can be loaded dynamically at run-time.

    I am posting the link of the session, which you can join if you are a beginner in Flex. Sorry for posting it a bit late. But there's still more then 24hrs to go.





    July 25

    Flash player with ExternalInterface call and it’s use inside form tag

    This article is an update to the previous one i have written i.e. picking up domain name….
    It’s a new problem i noticed while using ExternalInterface in flash file and embedding that swf file in asp.net web pages and within form tags

    The problem starts when we have our flash player (with External Interface call) embedded inside a form tag that is mostly in ASP.net web pages which use runat server controls. Most of IE version 6 and IE 7 starts giving error:’try { flashplayer.SetReturnValue(__flash__toXML(window.location.hostname.toString()) ); } catch (e) { flashplayer.SetReturnValue(”"); }’ or ‘flash player id undefined’
    Looking at various websites and finally on livedocs I was able to find the solution/workaround to the problem: Just add following line after your flash file embed code in which you are using any ExternalInterface call.

    window.[flashplayer id used in embed code] = document.getElementById(['flash player id used in embed code']).

    This will add a window level pointer to the movie so that it can be referenced directly using id/name. As this is only required in case of IE you can put condition for it’s execution only in case of IE.

    June 27

    Flash embed tag for spaces.live.com

    Few days back I tried to paste some of my flash presentations from one of the community website (www.authorstream.com), which provides embed tags you can paste in your blogs. It didn’t work.

    In spaces.live.com blog you can paste your video or flash embed tag using “Embed videos” at the bottom of message editor. I simply copied the code provided by the website and pasted it in pop up input box which I received after clicking on “Embed videos” button. When I clicked save button I received following error: “The embed code you've entered is not supported by Spaces. Only Flash video players are allowed.” After some analysis I came to know that spaces.live.com only allow embed code of the whole provided object code or auto generated flash embed code. So when I put flash embed code in the provided input box it just strip of the object part of the code and retain only embed part of the code. Now type value must be present in the embed code for it to be worked in spaces i.e. type="application/x-shockwave-flash" otherwise you will get above mentioned error. After I updated the code and put type in embed code it worked fine.

    June 23

    authorSTREAM has just added a new feature

    Here is a new feature from authorSTREAM.

    Actually it's not a new feature; it's an extension or shall i say enhancement to the existing feature, which is used to convert a user's presentations (only specific presentations) to video and make them available to download as mp4 or for podcast.

    Being in a developing country, the Internet speed is terrible sometimes or it's a bit costly compared to US and European countries (although the situation has changed in the last few months). So like everyone i also wanted that my content should be viewable/viewed by as many people around the world as it can be.

    So if you have your content as video, everyone knows the authority of YouTube and the visibility it brings to your work. But downloading it from one website and then uploading it to another was a bit of a pain--both time-wise and cost-wise. So this new extension from authorSTREAM is a very nice offering, which solves some problems of people like me. You can directly transfer your content to YouTube and enjoy the publicity.

    The presentation below by TechGuy describes how you can move your video content to YouTube directly from authorSTREAM.:
            


    The above presentation as video on Youtube:
           





    June 15

    Picking up the domain name where your flash file/player has been hosted

    This problem was bugging me for a long time and I was not able to find the solution until recently when I dug into few internet blogs again for sometime and was able to crack the problem. Actually this was a request that came up to me last year for tracking the IPs or domain name where our flash application/player is blogged or embedded. The only solution then I was thinking of was _root._url. But that was of no use as the flash player was being picked from our website and it was returning the URL of our website then the website where it was embedded. I even thought of getURL but it was not useful in this solution. I never worked with ExternalInterface much at that time and never thought it will be of any use as such for me as I thought its functionality is almost like getURL so it will be same as getURL. So I never dug deep into ExternalInterface at that time and I just thought whenever we try to send some variable to through sendAndLoadVar to our domain for tracking the visit count why not try to read the request header. Maybe request header will have the domain information in http-referrer or somewhere. But when we tried to dig deep into that we found that it's the client ip information which we receive in the request header not the domain information so that solution was too ruled out. This year again when I was approached for the solution I thought do some more search & research. I came across this blog of abdul qabiz; there in one thread I found some useful information and came across a mention of another website Flex Pasta. There I found the solution to my problem that I can useExternalInterface to get this domain information and many other information variables like port or URL parameters. So here I found the solution. I created a small code snippet to test it and see how it’s working on a different domain; I created 2 text fields on stage in AS2 file:
    ActionScript 2:

    import flash.external.ExternalInterface;

    try{
    txtDomain.text = ExternalInterface.call("window.location.hostname.toString");
    }catch (myError:Error) {
    txtError.text = ("error: "+myError);
    }
    So it worked locally for me. But when I hosted this file on one website and pasted embed code in one blog, I got null as the value in the textfield. Then I tried to look into the Adobe help docs; there I found that if any error occurred it will return null. So I just tried to do some checkup on the Internet and then I found that allowScriptAccess must always be set as always; then only it will return the value. So I am again stuck in the middle! I will be able to return the track of only those blogs, which will allow me to embed the code with allowscriptaccess as always but due to security threats many of the major blogs have already changed it; they have set it's value as never so you can't embed any third party swf file into these blogs with allowscriptaccess tag with value other then never. So does that mean you can't get domain name track backs from these blogs? I tried to do try catch as you see in the above code but nothing was returned in AS2 other then null. So I read one comment in the Abdul Qabiz blog that he got a security error back in try catch and in that string he got where it was occurred along with the swf file path. I tried that in ActionScript3/CS3 file something like this:
    import flash.external.ExternalInterface;

    var loc:*;
    try{
    loc = ExternalInterface.call("window.location.href.toString");
    }catch (e:SecurityError) {
    test.text = ("error caught: "+e);
    }
    txtDomain.text = String(loc);
    I mentioned the variable type of loc as "*" because I read a comment from senocular on Flashkit that the variable returned by ExternalInterface.call is of type "*". When I tried to assign that value to textfield it gave me an error: TypeError: Error #2007: Parameter text must be non-null. So there I have to typecast the variable as String to remove the error. Now when I published the file and tried that with 'allowscriptaccess' set to 'never' in embed code, I got a flash player error alert popup which said that the following swf can't access the following html file in which it is embedded. Now as html page is hosted on the domain for which I was looking i.e. I can parse out the domain name from that error but an alert is not something a visitor likes to see. I put that call in try catch and got the error trace which has domain name in html page reference in catch block. Similarly if you want to do it in Flex application you can do it something like:
    import flash.external.ExternalInterface;

    private var dom:*;
    private function init():void{
    try{
    dom = ExternalInterface.call("window.location.hostname.toString");
    }catch(e:SecurityError){
    dom = "error: " + e.toString();
    }
    }
    Init method can be called up on creation complete event of application. Another problem which I came across this whole process was that during my tracing I noticed that although I can trace up external interface call in Firefox and Safari but Internet Explorer was not responding to the call. When I dug upon it a bit I found on one of the forums that specifying the flash file id along with classid in Object tag is a must to make sure your ExternalInterface call go through and return you a value. For e.g.<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' id='player' width='481' height='402' >


    March 10

    Some hard facts...


    * You can't tell which way the train went by looking at the tracks.

    * There is absolutely no substitute for a genuine lack of preparation.

    * Happiness is merely the remission of pain.

    * Nostalgia isn't what it used to be.

    * Sometimes too much drink is not enough.

    * The facts, although interesting, are irrelevant.

    * Someone who thinks logically is a nice contrast to the real world.

    * Things are more like they are today than they ever were before.

    * Everything should be made as simple as possible, but no simpler.

    * Friends may come and go, but enemies accumulate.

    * I have seen the truth and it doesn't make as much sense as you think.

    * Suicide is the most sincere form of self-criticism.

    * If you think there is good in everybody, you haven't met everybody.

    * All things being equal, fat people use more soap.

    * If you can smile when things go wrong, you have someone in mind to blame.

    * One-seventh of your life is spent on Monday.

    * By the time you make ends meet, they move the ends.

    * Not one shred of evidence supports the notion that life is serious.

    * The more you run over a dead squirrel, the flatter it gets.

    * There is always one more imbecile than you counted on.

    * This is as bad as it can get -- but don't count on it.

    * Never wrestle a pig. You both get dirty and the pig likes it.

    * The trouble with life is, you're halfway through it before you realize it's a do-it-yourself thing.

    * The first rats off of the sinking ship are the best swimmers.
    December 24

    Answer these Questions

    1. If all the nations in the world are in debt (I am not joking. even US has got debts), where did all the money go? (Weird)

    2. When dog food is new and improved tasting, who tests it? (To be given a thought)

    3. Who copyrighted the copyright symbol? (Who Knows?)

    4. Can you cry under water? (Let me try)

    5. Why do people say, "Youve been working like a dog" when dogs just sit around all day? (I think they meant something else)

    6. Why are the numbers on a calculator and a phone reversed?

    7. Do fish ever get thirsty? (Let me ask and tell)

    8. Can you get cornered in a round room?

    9. What does OK actually mean? (OK, I don't know)

    10. Why do birds not fall out of trees when they sleep? (Tonight I will stay and watch)

    11. If corn oil is made from corn, and vegetable oil is made from vegetables, then what is baby oil made from? (No comments)

    12. What should one call a male ladybird? (No comments)

    13. If a person suffered from amnesia and then was cured would they remember that they forgot? (Can somebody help?)

    14. Why is it called a "building" when it is already built? (Strange isn't it)

    15. If you were traveling at the speed of sound and you turned on your radio would you be able to hear it? (Got to think scientifically)

    16. If you're traveling at the speed of light and you turn your headlights on, what happens? (I don't have a change to try)

    17. Why is it called a TV set when there's only one? (Nice one)

    18. If a person owns a piece of land do they own it all the way down to the core of the earth?
    December 05

    Attitude is Everything

    With a Positive attitude you can do everything and anything in this world.

      

    April 20

    Macromedia Captivate and SCORM

    by Tom King Manager, Elearning Integration Macromedia toking@macromedia.com

    Cool collection of pictures from Himachal Pradesh

    Checkout this cool collection of pictures from Himachal Pradesh
                                   
                    

    April 19

    Peer to Peer SIP

    Peer to Peer SIP authored by David Bryan.
    This presentation contains information about Peer to Peer SIP

    April 12

    Illusion & Unknown Friend


    Illusion

                                   


    Unknown Friend
                                   
    April 11

    I Believe!!!

    A cool presentation.

    It's about the belief one shall have about himself.



       
    March 14

    My Profile

    Vivek Lakhanpal

    SUMMARY

     

    • 5+ years experience with Action Script 1, 2 & 3 programming - including object orientated coding, events, class/package structures
    • 8+ years experience with HTML, CSS and JavaScript
    • 1 years experience in Flex programming.
    • 3+ years experience with streaming media.
    • FMS administration and programming.
    • Adobe FLEX and Flex builder experience
    • Adobe Flash CS3 IDE experience.
    • Ability to maintain high Quality standards, self learner and have the drive to Innovate.
    • Excellent verbal and written communication skills
    • Excellent organizational, problem-solving, and research skills
    • Ability to learn software quickly, and willingness to keep up with internet technology
    • Strong communication skills
    • Ability to work independently and in a team environment
    • Enjoy excellent rapport with my present & past employers
    • Experience in software development life cycle.

     

     

    PROFESSIONAL EXPERIENCE

     

    • June 2002 to Present

    Working as a Sr. Software Engineer for authorGEN Pvt. Ltd. Chandigarh. This company is an offshore development center of authorGEN Technologies Raleigh, NC located in North Carolina (http://www.authorgen.com). The authorGEN Technologies US is acting as the marketing agency for the authorGEN Pvt. Ltd. We are into product development, software development and e-Learning solutions. In January 2004 we have launched the first product developed by the company by the name of authorGen now named authorPoint. In the process company has also developed a new product named authorLive.

     

    Job Responsibilities:

    §      Acted in various roles for the company in last 4 years. Developer, Project Leader for web based and eLearning projects.

    §      Presently I am working in capacity of Sr. Software Engineer handles most of the new technologies in Flash domain like FMS, Flash Remoting upgrading projects from AS1.0 to AS2.0.

     

    • June 2000 to June 2002

    Worked as a Software Developer for Regal International Limited, Sector 39B, Chandigarh, INDIA

     

    Job Responsibilities:

    §      Design and development of latest projects that company acquired from several of its clients worldwide.

     

    • January 2000 to May 2000

    Worked as a Sr. Faculty at Hartron (Harayana Electronics) franchise at Sector 35-C, Chandigarh. INDIA.

     

    PROFESSIONAL QUALIFICATION

     

    Bachelor degree in Computer Science from Indira Gandhi National Open University, INDIA

     

    TECHNICAL SKILLS

     

    ·      Languages

    Action Script 1.0, 2.0 & 3.0, Flash Remoting scripting, Flash Media Server scripting, JavaScript, XML, HTML, ASP.NET with C#, ASP, DHTML, XHTML, VBScript.

    ·      Database Servers

    MS SQL Server 2000

    ·      Web Servers

    Internet Information Server 5.0 & 6.0, Flash Communication Server, FMS2(Administration), Apache Web Server, Helix Server

    ·      Tools

    Macromedia Flash from 5 onward, Flex 3.0 plug-in with Eclipse, Dreamweaver, Visual Source Safe 6.0, Visual Studio.NET, Microsoft Project

    ·      Skills

    508 and ADA compliant websites and eLearning course & quiz in Flash, SCROM compliance eLearning courses. Flash Action Scripting, Managing Flash Media servers, Team leading, troubleshooting.

     

    EXPERIENCE

     

    End Client: Rising Stream Media (http://www.risingstream.com/) (Offshore)

    January, 2008 - In Progress

    Project: All Flash/Flex/FMS related projects.   

    Role:

    • I am working as a consultant/developer to Rising Stream Media for all it’s Flash/Flex Projects
    • Do all discussion on technical feasibility aspects of the project and suggesting the best approach for getting product output.

     

    Environment:             

     

    Flash AS1.0/AS2.0/AS3.0/Flex, FMS2

     

    End Client: Unisona & Webstudy (http://www.unisona.com, http://www.unisona.cz, http://www.webstudy.com) (Offshore)

    August, 2006 - In Progress

    Project: Webstudy online virtual classroom   

    Description: Webstudy online virtual classroom is a Flash Application to connect host with the attendees live. Presenters can deliver their audio/video live they can share or explain problems by writing on whiteboard.

    Role:

    • I am working as a technical consultant and offshore developer to Unisona team based in Chezc Republic handling all technical problems related to flash stuff and related to this application.
    • For last 2+ years I am solving all the bugs/improvement in this already designed application.
    • Just released next version of application in which there is live Powerpoint presentation sharing feature.

     

     

    End Client: authorGEN Pvt. Ltd (http://www.authrolive.com) (Offshore)

    Sep, 2004 - In Progress

    Project: authorLive   

    Description: authorLIVE is a Flash media application to connect host with the attendees live. Presenters can deliver their audio/video with PowerPoint presentation live. Any number of attendees can join the presentation.

    Role:

    • I did the initial R&D into this project with the requirement inputs from the sales team and management team at US.
    • Designed basic structure of the application in the start.
    • Working on the application with the team as a r&d engineer.
    • Recently moved the whole project from AS1.0/2.0 to Flex with AS3.0. Did the initial r&d for all the technical aspect required to move from Flash AS1.0/2.0 to AS3.0 and Flex.
    • Module creation and communication within modules.

     

    Environment:                 

     

    Flash AS1.0 & AS2.0, FCS/FMS2 now it’s in Flex with AS3.0.

    Windows web server IIS 6, FCS/FMS.

     

    End Client: Duke TIP (http://www.tip.duke.edu) (Offshore)

    April, 2004 - In Progress

    Project: Duke TIP eLearning course

    Description: This project required preparation of a course designed in Flash with Lecturer Video moving on stage explaining mathematical concepts packed into an installable CD. Each chapter include a three set of quiz designed in Flash. It was designed in such a way that user will get the question he failed in his initial attempt. In third attempt he is provided with the feedback on the questions he failed to pass. C# was used to maintain user status in each quiz.

    Role:

    • I was the PL of this project and did all the communication with client.
    • I did the R&D into this project with the requirement from the client.
    • Designed basic structure of the application in the start. Programmed all quizzes and designed their flow logic.

    Environment:                 

     

    Flash AS1.0 & AS2.0, C#, Windows OS.

     

    End Client: Sales Team Live (http://www.salesteamlive.com) (Onsite/Offshore)

    July, 2004 - In Progress

    Project: Salesteam Live Website 

    Description: It’s a real estate investor website. Details can be seen at http://www.salesteamlive.com/resources/SalesTeamLivev2.3Datasheet.pdf

    Role:

    • I was PL in Release Version 1 & 2 of the project.
    • Handled all communication with the client from this end. Finalize all the requirements with the client.
    • Designed/developed a full Flash Remoting Lead/property evaluation calculator application.

     

    Environment:

                          

     

    ASP.net with C#, HTML, Flash AS1.0 & AS2.0, Flash Remoting, MS Project.

    Windows web server IIS 6

    Firefox, Netscape 6 & 7, IE 5 and above, Opera 7.

     

    End Client: authorGEN Pvt. Ltd. (http://www.authorgen.com) (Onsite/Offshore)

    Nov, 2003- In Progress

    Project: AuthorGEN PPT presentation 

    Description: authorGEN is a desktop software tool that turns Power Point into a high-impact presentation and training tool by converting PowerPoint content to FLASH, SMIL or HTML with audio/video support and navigation features. It converts the presentation to Flash format that is viewable on Pocket PCs and Desktop.

    Role:

    • Research and development of HTML Player using JavaScript and Windows Media 9 Series SDK.
    • Scripting for Flash Player functionality on both Pocket PC and Desktop. (http://www.authorgen.com/agPlus/).

     

    Environment:

                          

     

    JavaScript, Windows Media 9 Series SDK, HTML, C#, VB.Net, Adobe Photoshop, Flash MX, Power Point, Action Scripting, XML, MS Project.

    Windows 2000/XP/2003

     

    End Client: Skyward Design Inc. (http://www.skywarddesign.com/) (Offshore)

    1st April, 2004- 20th April 2004

    Project: Floor planning

    Description: This application is responsible for designing customized floor plans. There will be room or office architecture designed on the board. User can duplicate the furniture for number of copies he wants. He can rotate it place it where he wants to place that furniture in the map. He can delete if he wants to delete any furniture item. Mouse over help for all furniture items, And Print map after design functionality.

     

    Role:

    • Research and development of Flash output using AS1.0.

    Environment:

                          

     

    Flash AS1.0, Flash MX.

    End Client: Spore Inc (http://www.patentmatrix.com/spore/home/) (Onsite/Offshore)

    Jan, 2004- June 2005

    Project: Patent Matrix

    Description: This application is responsible for drawing diagrams which have the information about the searches conducted by the client on the US patent database. The application was developed in C#.NET and output was shown in Flash Player.  The diagrams provide graphical Patent Claims Mapping and competitive Landscape Diagrams with evolutionary trends analysis.

    Role:

    • Research and development of Flash output using flash drawing API and xml file input.

    Environment:                     

     

    Flash Action Scripting 1.0, C#, ASP.NET, XML, Flash MX, MS Project

    Windows 2000/XP/2003

     

    End Client: North Carolina State University, Raleigh, NC, USA http://www.ncsu.edu/   (Onsite/Offshore)

    June, 2003 – Jan, 2004

    Project: E-Learning course

    Description: This eLearning course has been developed for Space Biology NASA department using Real streaming video & SMIL.

     

    End Client: MDeverywhere, Durham, NC, USA http://mdeverywhere.com/Home/index.aspx  (Onsite/Offshore)

    Feb, 2003 – July, 2003