i'm missing something fundamental here. i have a very simple custom class that draws a circle and a checkbox, and only allows dragging of that circle sprite if the checkbox is checked. a checkbox component is manually added to the library in my .fla.
from my .fla project's actions panel:
var ball:DragBall = new DragBall();
addChild(b...
I have two Sets. Set b is the subset of Set a. they're both very huge Sets.
I want to subtract b from a , what's the best practice to do this common operation ?
I've written to many codes like this , and I don't think it's efficient. what's your idea ?
pseudo code : (this is not Java API) .
for(int i = 0 ; i < a.size(); i++) {
...
Let's say this page
www.example.com/mypage
returns some html that I want to parse in Actionscript.
How do i call this page from Actionscript while getting back the response in a string variable?
...
interface If { ... }
class Impl implements If { ... }
function test(type:Class, obj) {
return obj instanceof type;
}
test(If, new Impl());
The call to test on the last line returns false, but it should be true. How can I do this check right, with the requirement that it must be inside the function?
Real code:
public function...
I have embedded my font using the embed meta tag, along which the entire range of Unicode characters... here is my CustomTextField class:
[Embed(source='../assets/fonts/Arial.ttf',fontName='CustomFont',fontWeight='regular',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+01...
I was recently searching for a way to call the print function on a PDF I was displaying in adobe air. I solved this problem with a little help from this fellow, and by calling postMessage on my PDF like so:
//this is the HTML I use to view my PDF
<object id="PDFObj" data="test.pdf" type="application/pdf"/>
...
//this actionscript live...
Hi all,
I'm building a small flash-based language translator. I am cross-referencing children of an XML parent node once the user types in a word or phrase into the text field. The result will be a translation of that word or phrase returned to the output_txt text field.
The problem is, Flash gives me this error regarding the value typ...
I'd like to keep an object appear to remain in the same place while moving the camera.
I'm using this script http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/ to orbit an object using a mouse drag. But I have an object in the scene that I would like to keep still. How to I do this?
Thanks,
Josh
...
I'm running an HTTPService with the following request:
<mx:request xmlns="">
<view>{myViewStack.selectedChild.name}</view>
</mx:request>
The idea being to pass which child is selected on the viewstack to the php page, and then get that back so I can run some logic based on which child of the viewstack was selected at the time.
Ev...
My example imports XML and has an object rotating on stage. The rotating object is called enemy corresponds to ENEMY in the XML. How do I set the rotation variable to receive values from XML?
REASON
It seems more difficult to set up variables using external data. I want to understand it better.
rotation.fla
//LOAD XML
var myXML:XML;...
Say I have this AdvancedDataGrid:
<mx:AdvancedDataGrid id="grid"
height="384"
width="100%"
styleName="aStyleName"
displayItemsExpanded="false"
groupItemRenderer="SomeRenderer"
draggableColumns="false"
defaultLeafIcon="{null}"
folderClosedIcon="{null}"
folderOpenIcon="{null}">
<mx:columns>
<!-- a bunch of AdvancedDatagridCol...
Warning: school assignment.
For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class ...
I'm using Flex in Flash Player 10 on Windows, using FileReference to load a file into memory, as below.
My issue is that when a file is locked by Windows, my FileReference is not giving me any feedback that the file is inaccessible--it simply never dispatches any events after my calling load().
Does anyone have insight into how to tell...
I'm updating the start and end points of a Line3D object in Papervision3D. The end result works fine but there seems to be a lag from when I move the objects and for the line to redraw in the right position. I'm using the following code:
connectingLine.v0.x = startDisObj.sceneX;
connectingLine.v0.y = startDisObj.sceneY;
connectingLine.v...
I need to display a character symbol (Not alphanumeric, or on the keyword)
textField.text = ???;
I have the unicode for that char, how do I use it?
...
I have the unicode for that char, how do I display it?
0x023D2A
textField.text = ???;
i have have the name of the character.
can I reference it by name?
...
I have a NumericStepper declared as a UIComponent:
<![CDATA[
private var component:UIComponent;
component = new NumericStepper();
]]>
I need to change the .maximum value of the NumericStepper but due to the UIComponent not having a .maximum property the following code fails with the error: 1119: Access of possibly undefined property m...
Hi all,
I have a Flash web app which displays user submitted PNG files. Files are uploaded to the server via some API prior to being displayed. I'd like to make sure no "bad" files are served to Flash, where "bad" is entirely unspecific. Is there a way to validate PNG files against the PNG specs (this would catch corrupted files)? Or an...
i have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite.
i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bo...
Hi,
I'm loading an swf say "test.swf" which gets loaded in imageLoader , so I can get its content by :
imageLoader.content
So if I wanted one of the movieClips inside it I would do this :
imageLoader.content.testMovie.transform.colorTransform = someTransformation;
But when I do this, since the movie is not loaded the file is not ...