actionscript-2

Result Update Database from Flash

妖精的绣舞 提交于 2019-12-02 23:03:12
问题 I want to update database with flash (text input) Here is my php code <?php mysql_pconnect ("localhost", "root", ""); mysql_select_db ("adaptasi"); $isi = isset($_POST['OutData']); $query2 = "UPDATE materi SET isi='$isi' WHERE id = 1"; $result2=mysql_query($query2) or die("Query Failed : ".mysql_error()); ?> Here is my Actionscript 2 function SubmitData() { trace("Sending"); var OutData = new LoadVars(); text_morfologi.text = OutData.OutData; filepath = "http://localhost/adaptasi/"; OutData

ActionScript2.0 : Drawing arc for Triangle's angle

ぃ、小莉子 提交于 2019-12-02 16:21:43
问题 how can I draw arc in randomize created triangle's angle with flash actionscript 2.0. Thanks all.alt text http://www.freeimagehosting.net/uploads/8289d7feff.png I would like to draw red arc at every triangle's angle. Note: The triangle will be created randomly. 回答1: One simple way would be to draw a circle in each corner, then use a copy of your triangle to mask the circles so only the interior arcs are visible. For example, make a movieClip in your library named "circle" containing an

Result Update Database from Flash

。_饼干妹妹 提交于 2019-12-02 14:09:11
I want to update database with flash (text input) Here is my php code <?php mysql_pconnect ("localhost", "root", ""); mysql_select_db ("adaptasi"); $isi = isset($_POST['OutData']); $query2 = "UPDATE materi SET isi='$isi' WHERE id = 1"; $result2=mysql_query($query2) or die("Query Failed : ".mysql_error()); ?> Here is my Actionscript 2 function SubmitData() { trace("Sending"); var OutData = new LoadVars(); text_morfologi.text = OutData.OutData; filepath = "http://localhost/adaptasi/"; OutData.sendAndLoad(filepath + "editmorfologi.php", OutData, "POST"); } btnsave.onRelease = function() {

Placing AS3 code on stage/MC timelines a la AS2 instead of in classes

依然范特西╮ 提交于 2019-12-02 13:39:04
I'm aware that ActionScript 3.0 is designed from the ground up to be a largely object-oriented language and using it means less or even no timeline code in Flash documents. I'm quite experienced with OOP and am comfortable writing classes. However, since I mostly use Flash for animations, I hardly ever need to write ActionScript code other than for preloaders, subtitles, quality controls, website links and so on. In fact, I still set my Flash movies to use AS2 to this day because I'm used to gotoAndPlay() / gotoAndStop() , AS2 preloaders, subtitles, quality controls and even getURL() . Of

ActionScript 2 Moving an object

社会主义新天地 提交于 2019-12-02 12:40:38
I have very little knowledge of ActionScript. I have a movie clip. I want it to move along the x-axis when i press down on a button(button or movie clip) I do not know what code to use as it needs to be Action Script 2. Is there a Tutorial or something that can accomplish this? I have found a tutorial that moves the object around when you press a button. I am trying to get the same effect when you click down on a button: http://www.kirupa.com/developer/actionscript/xymove.htm Thank you for any help UPDATE The button is called btn and the object that moves is mctransparent I have managed the

Dealing with infinite/huge worlds in actionscript 2

强颜欢笑 提交于 2019-12-02 11:06:54
How are infinite/huge procedural generated worlds achieved with minimal lag in actionscript 2? In a game like Terraria or Minecraft for example. What would the best way to go about handling huge world like this be? Obviously looping through every block and moving them that way won't work. I've tried placing blocks into 50x50 'chunks' and then moving each of the chunks, but the result isn't anywhere near as smooth as it should be. Is there any way to completely disable sections of the map if the player isn't near them? Would it be possible to simply store them in memory and load them when

ActionScript2.0 : Drawing arc for Triangle's angle

那年仲夏 提交于 2019-12-02 10:37:07
how can I draw arc in randomize created triangle's angle with flash actionscript 2.0. Thanks all. alt text http://www.freeimagehosting.net/uploads/8289d7feff.png I would like to draw red arc at every triangle's angle. Note: The triangle will be created randomly. Richard Inglis One simple way would be to draw a circle in each corner, then use a copy of your triangle to mask the circles so only the interior arcs are visible. For example, make a movieClip in your library named "circle" containing an unfilled red circle centred on the clip's insertion point (make sure you tick "Export for

Parsing XML/XHTML in Actionscript

主宰稳场 提交于 2019-12-02 08:22:06
问题 Is there anything similar to getElementById in actionscript? I'm trying to make a prototype of a flash page wich gets it's data from a xhtml file. I want to have both an accessible html version (for search engines, textreaders and people without flash) and a flash version (because the customer insists to use flash even though a html-css-ajax solution would do quite nicely). What I need is a simple way of getting the text or attributes from the html with a certain id, like <h1 id=

How to pass variables into inline functions in Action Script 2

时光毁灭记忆、已成空白 提交于 2019-12-02 05:18:46
问题 I have the following function, but I can't seem to get the myVar variable into the inline function. What am I doing wrong here? What I would like to have happen is when I click on myMc, it should print myVar to the console ("hello computer"). function doSomething():Void { myVar = "hello computer"; myMc.onRelease = function(){ trace(myVar); //prints as "undefined" } } ps. - I cannot declare myVar as a global or static variable because in the real code, I'm parsing XML and the myVar is

Actionscript 2 large tile-based maps creating lag

家住魔仙堡 提交于 2019-12-02 02:53:45
问题 I'm wondering what the best way to go about creating large, tile-based maps in flash with actionscript 2 would be. With my current code, any maps over 35x35 (1225 movieclips) start to lag. The maps are created from a simple multi-demensional array, eg. var map = [[95,23,25,23,16,25],[95,23,25,23,16,25],[95,23,25,23,16,25]]; The program simply creates a movieclip of a tile, goes to the appropriate frame and places the tile relative to the player's location. Each tile has one property, that is