actionscript-2

POST Login with ActionScript 2.0

寵の児 提交于 2019-12-29 02:09:16
问题 I have created a pretty basic Flash website for a client and am having an issue programming a Client Login feature that he would like. Currently, if I navigate to the site and click Client Login, it takes me to a login page. The way I need this to work is -- within the Flash, using ActionScript 2.0 -- have the user enter their UserID and Password and click to login, which submits POST vars to the form action of the Client Login website. Is this possible/legal to do from a different domain?

HitTest trigger new scene

[亡魂溺海] 提交于 2019-12-25 12:48:32
问题 This is my code: onClipEvent(enterFrame){ if(_root.char.hat.hitTest(this)){ _root.gotoAndStop(6); _root.char._y +=50; _root.grav = 20; } } How to make the hitTest trigger new scene ? 回答1: To go to another scene , you can use gotoAndPlay() or gotoAndStop() : gotoAndPlay([scene:String], frame:Object) : Void. gotoAndStop([scene:String], frame:Object) : Void So your code can be like this, for example : onClipEvent(enterFrame) { if(_root.char.hat.hitTest(this)){ // ... gotoAndPlay("Scene 2", 1); }

actionscript 2 to actionscript 3

倖福魔咒の 提交于 2019-12-24 20:52:21
问题 so I have a lot of classes in actionscript 2. But I need to modify my application to use the soundchannel object for audio monitoring. as far as i know this is only in actionscript 3. so it it possible to write one class in AS3 and leave the rest in AS2? if not is there a conversion tool which can make the process easier? 回答1: The language the ActionScriptBridge site uses is sort of misleading: "Use flash AS2.0 flash components in AS3.0 projects." And then tells you how it works: "Technically

Center movieclip on point

孤街浪徒 提交于 2019-12-24 17:25:03
问题 I'm dynamically loading movie clips (SWFS) into attached clips (from the library). The loaded movies don't all have center points, meaning that their registration point isn't directly in its center. This poses a problem when I load them into the attached clips, because they don't center on the attached clips, which is what I want them to do. Is there a way to center a movieclip based on width and height instead of registration point? Thanks in advance! 回答1: Use getBounds. var bounds:Rectangle

How to refer to object from other keyframe

和自甴很熟 提交于 2019-12-24 10:19:58
问题 I want to get information of an object from a previous keyframe. _root. works only for objects on the same keyframe as the code right? 回答1: Your object doesn't exist one you leave the keyframe that created it, unless the object was added with ActionScript. You'll have the place the object on its own layer and extend the keyframe to reach the point where you're trying to access it, or as mentioned create it with ActionScript. 来源: https://stackoverflow.com/questions/8934346/how-to-refer-to

Setting Actionscript Object Keys

Deadly 提交于 2019-12-24 07:13:04
问题 If I have an array, I can set the keys by doing the following: var example:Array = new Array(); example[20] = "500,45"; example[324] = "432,23"; If I want to do something with Objects, how would I achieve this? I tried the following: var example:Object = [{x:500, y:45}, {x:432, y:23}]; // Works but keys are 0 and 1 var example:Object = [20: {x:500, y:45}, 324: {x:432, y:23}]; // Compile errors var example:Object = [20]: {x:500, y:45}, [324]: {x:432, y:23}; // Compile errors var example:Object

get a response from javascript in a google's swiffy content? (flash converted to html5)

柔情痞子 提交于 2019-12-22 13:07:35
问题 I am trying to play with google's swiffy to convert as2 content into html5. so far it has been amazing. using getURL, I can make javascript calls. But, will I be able to get sort of response from a server or javascript? 回答1: Yes. You can call stage.setFlashVars('response=10'); from the JavaScript after which _level0.response should be set in AS2. But getURL returns before _level0.response is set. So a you should wait a little bit with setTimeout or onEnterFrame . 来源: https://stackoverflow.com

Test if an object is defined in ActionScript

瘦欲@ 提交于 2019-12-20 16:22:44
问题 In ActionScript, how can you test if an object is defined, that is, not null? 回答1: test if an object is defined This works in AS2 and AS3, and is the most reliable way to test if an object has a value. if (obj != null) { doSomethingWith(obj); } Its also the most reliable way to test an object's property and read it in the same expression: if (arr[0] != null && arr[0]>5) { doSomethingWith(arr[0]); } test if an object is null There's a difference between null and undefined, but if you don't

ActionScript 2 Moving an object

六月ゝ 毕业季﹏ 提交于 2019-12-20 07:37:41
问题 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

Dealing with infinite/huge worlds in actionscript 2

心已入冬 提交于 2019-12-20 07:15:22
问题 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