You can create menu in your flash application using the following code, however, you need to note one thing that you need to import mx.controls.*; mx.data.binding.*; (if you need to create Menu using databinding) here is the code var mm:Menu = Menu.createMenu(Me); mm.addMenuItem({label:”All”}); if (aIndustry.length > 0 ) { aIndustry.sort(); for (var i=0;i if (aIndustry[i] [...]
Posted on September 18th, 2007 by Sumit Gupta
Filed under: Flash, Programming | No Comments »
Recently making a Flash in which I need a user input in a popup window to complete user action. For this I need to ask user some more value. Hence I use this code to show user another modal window. Â var nw = PopUpManager.createPopUp(_root,mx.containers.Window,true,{_width:150,_height:110,_x:((Stage.width-150)/2),_y:((Stage.height-125)/2)}); Â nw.title = “Choose Industry”; Â nw.createClassObject(mx.controls.ComboBox, “cb”, nw.getNextHighestDepth(), {_x:25, _y:40}); Â nw.cb.addItem(“All”); Â if [...]
Posted on September 18th, 2007 by Sumit Gupta
Filed under: Flash, Programming | No Comments »
This is just a bookmark for now to following great article http://www.flash-creations.com/notes/dynamic_xml.php Will explain this some day.
Posted on September 3rd, 2007 by Sumit Gupta
Filed under: Bookmarked, Flash, Links | No Comments »
To remove all child from a given movie clip simple loop through its all object and remove the type of object you want. Following code does the same for related_mc.sp_related name movie clip: for (obj in related_mc.sp_related){ // root.mc1[obj] instanceof MovieClip same as typeof(_root.mc1[obj])==”movieclip” Â Â Â Â if (typeof(related_mc.sp_related[obj])==”movieclip”){ Â Â Â Â Â related_mc.sp_related[obj].removeMovieClip(); Â Â Â Â } } this loop through all child of [...]
Posted on August 22nd, 2007 by Sumit Gupta
Filed under: Code Snippets, Flash | No Comments »
Yet again I have been given job to create a Flash component that will be displayed on homepage of site, and it has to list all content of site. For this I ask for a XML backend that provide the data to Flash. Since we have lot of data I opt to use XPath API [...]
Posted on August 18th, 2007 by Sumit Gupta
Filed under: Flash, Programming | No Comments »
Since one last month I am working on Action Script 2.0 with Flash 8. It all started well and I gain my confidence and start liking coding in AS 2. But today I found few things in action script that prove one of two things: Â Either I am not a good programmer OR Â Flash AS2 [...]
Posted on May 29th, 2007 by Sumit Gupta
Filed under: Flash, Programming | No Comments »