-
Creating Menu at runtime using Flash 8/ActionScript 2.0
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]…
-
Creating popup Window using Flash
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…
-
Using XML File with Flash in better way
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.
-
How to remove all child movieClip through AS 2.0 Code
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(); …
-
Xpath in ActionScript 2.0
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…
-
Flash 8 : Action script 2.0
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…