actionscript-3

Random Errors in ActionScript - Memory overflow?

戏子无情 提交于 2020-01-06 21:21:23
问题 We're developing an InDesign CS6 Extension with Adobe Flash Builder 4.6. I got strange errors in a JavaScript Injection, so I converted the JavaScript to Action Script and put it directly into my code. But the errors continue to appear. This is the code: var pageItem:PageItem = (component as BaseComponent).pageItem; var frame:Frame = new Frame(pageItem); var itemIsHidden:Boolean = !pageItem.visible; var tempFile:File; var container:Rectangle = InDesign.app.activeDocument.rectangles.add

How do I allow user to select tint amount in Flash Professional using ActionScript 3?

﹥>﹥吖頭↗ 提交于 2020-01-06 21:11:36
问题 So I was in the middle of making a type of test program where I would take parts of a shirt and the user could customize it with different colors. While I was doing that I realized it wasn't realistic as there was absolutely no fade with the color picker tool (code shown below). Is there any way to allow the user to use possibly a slider to change the level of tint on the color(s) being used on the shirt? import fl.controls.ColorPicker; import fl.events.ColorPickerEvent; import flash.geom

ActionScript3: removeEventListener with function parameter

纵饮孤独 提交于 2020-01-06 20:24:38
问题 how can i remove EventListener from MovieClip in actionscript? Below is my sample code. import flash.events.MouseEvent; import flash.geom.ColorTransform; var color: ColorTransform = new ColorTransform(); color.color = 0x00CC66; colorChange_mc.buttonMode = true; colorChange_mc.addEventListener(MouseEvent.MOUSE_OVER, changeColor(color)); colorChange_mc.addEventListener(MouseEvent.MOUSE_OUT, changeColorToNormal); function changeColor(color: ColorTransform): Function { return function (e:

Issue with making a POST call to a REST service from as3

喜你入骨 提交于 2020-01-06 20:23:47
问题 I'm working with a Jetty based REST service wrote by a 3rd party developer to which I have to make calls from actionscript 3. There are multiple calls available and most of them work, there only one I'm having trouble with: To end a session I have to make a POST request to http://localhost/control/end . I've made a basic test with Simple Rest Client in Chrome and that works: I get a status 200 response In service's console I see a setEnd call made The problem is, when I try the same in

to pass variable from one swf to another swf in as3

ε祈祈猫儿з 提交于 2020-01-06 19:49:25
问题 I have a main swf in as3 and I load another swf in as3 in it. Now I want the main swf to pass variable to loaded swf. Which is not happening ? pls. help! Regards, Sagar 回答1: This can be done by Passing parameters to a loaded SWF application by changing the load parameters and using application.loaderInfo to get the variable. loader.load("SWFLoaderApp.swf?test=hi"); 回答2: Take a look at the LocalConnection class. :-) -EDIT- Apologies. I misread your question. I didn't read that the first swf

How can I create a custom MXAdvancedDataGridItemRenderer in Flex4?

旧巷老猫 提交于 2020-01-06 19:35:07
问题 Well, I created one but it has a bunch of issues: if I click in the rendered column I get an error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Test/clickHandler()[C:\Documents and Settings\NDEGRAEV\workspace-dummy\Test\src\Test.mxml:27] at Test/___Test_AdvancedDataGrid1_click()[C:\Documents and Settings\NDEGRAEV\workspace-dummy\Test\src\Test.mxml:31] the text is stuck to the top left corner of the cell; the cell's background doesn't change to the

Using custom graphical assets in pure AS3 project

北慕城南 提交于 2020-01-06 19:35:01
问题 I created some button states in flash (swc), and I want to use them in a pure AS3 project. They are movie clips with class of neatButton_on and neatButton_off respectively. I call them like this: public class neatButton extends neatModule { private var stateOn:neatButton_on; private var stateOff:neatButton_off; private var modContainer:Sprite = new Sprite(); public function neatButton() { addChild(modContainer); modContainer.x = 200; modContainer.y = 200; stateOff = new neatButton_off();

How to set objects on a androidH runner game

安稳与你 提交于 2020-01-06 19:29:56
问题 I am trying to develop a android runner game for school purpose.. I am still new to this and please I need your assistance.. You guys can view my CS5flash file at >>> http://www.filedropper.com/test_37 The obstacles and coins are on random. But the obstacles and coins are overlapping each other.. Which is very bad for a runner game because it looks very bad and the gameplay gets very very complicated. How can i fix it??. Is there any way to fix it?. And i am also thinking if I can set the

ReferenceError: Error #1065: Variable is not defined when searching for a node by attribute

a 夏天 提交于 2020-01-06 19:27:17
问题 I've done this lot of times, but now I'm missing something.... I'm searching for a node by looking for a value in an attribute. If I try to trace: xmlQuestStructure.page[activePageIndex].label.@priority The trace it's ok, and I can read High, Medium, Low (the values I'm expecting). But if I try to trace this (where calculatedPriority is a String with value High, Medium or Low) xmlQuestStructure.page[activePageIndex].label.(@priority == calculatedPriority) I get ReferenceError: Error #1065:

AS3: Importing classes/Sharing variables between classes

半城伤御伤魂 提交于 2020-01-06 19:10:56
问题 Ok, this is my problem: i have a variable in a class named Mirror public var line:Sprite = new Sprite(); i want to use that variable in another class named MovieClip. I imported the class in the MovieClip class: public class MovieClips extends MovieClip { import Mirror; public function MovieClips(radius:int, _x:int, _y:int,size:int,span:int,addl:Array) {.... but when i try to do something like this: if (Mirror.line.hitTestObject(ball) == true) { speedY *= -1; } It shows up like an error: