Hide a Button in AS3?
I have a button called myBtn In my actions in Frame 1 I have tried both: myBtn.visibility = false; myBtn.enabled = false; Both give me the error: 1120: Access of undefined property myBtn. ...
I have a button called myBtn In my actions in Frame 1 I have tried both: myBtn.visibility = false; myBtn.enabled = false; Both give me the error: 1120: Access of undefined property myBtn. ...
Is it possible to generate multiple thumbnails from a FLV using only as3? The flv is on the same server as the swf so I'm not using any dedicated streaming server. I'd imagine that as long as the flv has load the video you'd be able to pull bitmapdata from a specific time of the flv. My idea is to pull around 8 images from every flv, co...
Most of my applications are a combination of VB.NET and Adobe Flash, such that the VB application is displaying a Flash file inside the main form (using Adobe's COM object). The VB application is communicating with the Flash file via the ActionScript ExternalInterface and FSCommands (using XML strings). I'm having a hard time debugging ...
Basically I am making a game where the enemy comes after the hero when He is in sight. What I do to achieve this is var distx = hero.px - px; var disty = hero.py - py; moveX += distx * .00005; moveY += disty * .00005; Now I had to multiply it by .00005 because anything higher, makes him come up on the hero pretty quick. I want the ...
Hello everyone, today I'm trying to get the URL where my Flash movie is sitting on. I found a similar question here, which was answered with a link to Flash's LoaderInfo method, but I'm not sure I'm using it correctly as the textField in my test movie here: http://leongaban.com/stackoverflow/getUrl/ does not display the URL Updated! WO...
How do I create a custom event class similar to ActionScript? What I mean by that is a class that I can use to fire off my own events, send the necessary data. I don't wanna use third-party libraries like YUI or jQuery to do it. My goal is to be able to send a event that looks like this. document.addEventListener("customEvent", eventHa...
MOUSE_OUT events are, evidently, handled differently for X and Y mouse moves when leaving a Sprite. How do I fix this or work around it? Where is this documented? MOUSE_OUT occurs when x==0, but not y==0 (you need to go to y==-1): private var _sp:Sprite; public function test( ):void { stage.align = StageAlign.TOP_LEFT; sta...
I have a button in Flex that has mx:skin set to an image, but i want to set it so that when i change the language the image change as well. The code is something like the following: <mx:Button id="btnMain"> <mx:skin>@Embed(source='main/resources/images/ABA_MAIN_IDLE.png')</mx:skin> The way i handle i18n is by using a class called ...
I'm extending the AS3 class Rectangle with a class called Bin. I want to override the Rectangle clone() method with a method that returns a Bin object, not a Rectangle object. If I try to override the clone method but specify Bin as the return type, I get a #1023: Incompatible override error. Here's my Bin class: package { import f...
I've been working on an application (with ComboBoxes) that requires scaling the entire application based on screen resolution. I thought it would simply require changing the "scaleX" and "scaleY" properties of the top-level application, but discovered that the ComboBox dropdown doesn't appear to scale accordingly, as in the following ex...
Excuse me if this is an obvious question, How can you use SWFobject to automatically redirect to another URL - NOT add an a href but physically load another URL ? I'm using SWFobject 2 at the moment . -- the SWFobject code ... swfobject.embedSWF("MYSITE.swf", "myAlternativeContent", "850", "700", "9.0.0", false, flashvars, params...
I'm making a simple Box2D game ( http://iwanttobeacircle.com ), where you start off as a triangle and bounce off bigger shapes to gain sides. I'm having a bizarre bug with my walls... both are created from the same class, yet the left one works and the right doesn't. If I only add the right one, then it works, but for some reason adding...
Need to find a way to send a delete method from Flash Player (Flex). Currently it's not done by default (except for from AIR), but I am sure someone has augmented the URLRequestHeader to get it to work properly. I've tried this, it isn't working: request.requestHeaders = [new URLRequestHeader("X-HTTP-Method-Override", DELETE_REQU...
I would like to create some text on the stage that does not respond to mouse activity. I've found that after adding a piece of text to a class I am using to draw, it covers up some of the mousing area of my class and disables the user from being able to roll over the other graphical elements... Is there something like: var t:TextField...
Hi, EDIT: Ah ha! The solution to my problem was simple afterall! I'm an idiot :D I was so focused on why it was taking so long, that I was blinded by the fact that my object pool allocate() function is lazily evaluated. i.e. It won't allocate until it's called. But my timer test was around alloc, so obvious the first time through, th...
Slight problem i have been pondering on, i have a class that loads a text from a url as a means to sync the time. The swf file can be on the same page multiple times, but i want it to check to see if one of the swf is sync'ing, if so then wait for it to complete and load its sync'd value (rather then query the url itself), so that they ...
I'm trying to trap the degrees that are X distance (fig: 45) away from a given degree (fig: 15). I'm getting caught up in the 360/0 wrap around. The given degrees are all normalized 0-360. Can someone please show me how to do this? I've included a graphic that illustrates my lacking aptitude. I swear on Michael Jackson's grave that I sc...
On my stage I have a dynamic text field (instance name = lives). In my actionscript I have created a number variable called livesnum. And then beneath that I'm setting the textfields value to be the livesnum variable but I get the following error: 1067: Implicit coercion of a value of type Number to an unrelated type String. My actio...
I have a list control that uses a custom itemRenderer and custom itemEditor. The itemRenderer/Editor are textarea controls with at least 3 lines of text each. The default scrolling nature of a list control is by Item, rather than by some number of pixels, the way a VBOX scrolls. I want my list control to have more of a word-processor ...
Hi everybody! For an ongoing project i have to implement a Flash-"Welcome" screen similar to this. I know how to create these two buttons (left and right with the two hotels on them) but i don't know how to make this smooth transition when hoovering over a hotel from one state (mouse not over button) to the other (mouse over state) WIT...