ActionScript 3.0 :: SWF Communicate With Internet Enabled Location
Aug 26, 2010
I have a SWF, that calls a php script. I set the requestMethod and variables etc.. everything works fine and I get the returned data from the php script. But, this only works when running the SWF inside of flash. When I run the SWF by itself, I get the Adobe Flash Player Security warning message, which says that the SWF in trying to communicate with Internet Enabled location 192.168.0.201. (this IP is specified in the URLRequest). I click settings to go the the adobe page and allow the location/domain. This doesn't seem to work. I have tried the crossdomain.xml and Security.allowDomain(). Nothing seems to work!
At the end of the movie I would like to check if the user is still connected to the Internet (they maybe on an unstable dial-up connection and lost connection). Is there anyway to do that? I mean, is there a way to check if a user is connected to the Internet using ActionScript?
I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.
I created a simple button that displays an error messeage: "error opening 'url" when I test the movie, but does play and opens in browser after publishing. However, it won't open in the browser in a different location. I pasted the html code in a web page but it doesn't work there nor opens in the browser in a differnet location from where it was originally published and saved. Why is that?
How can I move my MC from one location (x, y) to another location (x1, y1) wirh action script..?.. and I would like to have my motion tween rounded to (x,y) so it will look sharp.
I have this application that consists of two phases. Queuing phase and chatting Phase.The chatting uses UDP (a flash-app).So before the user enters the queue phase I want to check if UDP traffic is possible.I could do this both in the ASP.NET app (that wraps the flash-app) or in the flash-app.I'm not sure on how to do this in either of themMy initial thougth is to connect via UDP to some tiny webservice a server, but is there an easier way of doing it
I tried using a .enabled = false; when I already had a click event on that movie clip. I found that you need to remove the eventlistener instead of making enabled false.Why doesn't enabled work when you have event listeners?I'm really more curious than in need of an answer since removeEventListener worked fine.
in the attached file there are 2 MC, I want to activate the ball_mc only when I�m over other MC. I tried multiple things but I can�t manage to find what is the problem.
What will my movie clips not disable here. They are still clickable? I get my trace 24 times. what am i doing wrong. I have 24 cards all named card0_mc - card23_mc
code: function disableCards() { for (i=0; i<24; i++) { trace("in here"); this["card"+i+"_mc"].enabled=false; } }
when I enable my Adobe Shockwave Object my screen will flicker when i move the mouse around the screen. I have uninstalled it and reinstalled but it didn't work.
i have a 3 buttons in library i need: if i click to 1button i see 1mc but can not click to 2button and 3button, just after i close 1mc i can click to 2button and 3button, and sure for 1button again why its not working in my example?
Got a button (imported png defined as a button in the library).The button is dragged onto the stage, given an instance name "btn".Clicking the button fires an eventListener which is doing all the right things, except...
btn.enabled = false;
...only changes the cursor from a pointing finger to an arrow. What?! It is still clickable.My intention is to disable the button so it cannot be clicked. But it can still be clicked. Not good.How do I disable a button and prevent it from being clicked?
I want to make a button disabled if a datagrid is empty and it should be enabled when there is atleast 1 entry. The entries in the grid are made at runtime. I tried this this is the button: <mx:Button id="update" label="Update Contact" enabled="{isButtonEnabled()}"/>
And the function is defined as where dg_contact is the datagrid: public function isButtonEnabled():Boolean { if(dg_contact.selectedIndex==-1) { return false; } else { return true; }}
Flash has the ExternalInterface class which can communicate to JavaScript running in the browser Can you use the ExternalInterface.available property to check if JavaScript is enabled?
I've put text in TextField, set Z coordinate to enable 3D, and placed object close to the screen plane. Text quality is very bad. Is there any way to force Flash draw proper vector text? Fonts are embedded, so it's not a problem.
I'm trying to set the rtBtn to 100% alpha after the tableButton has been pressed by the user. Currently rtBtn is living on the stage and set to 25% alpha. I've gotten all the other parts of this code to work, except the color transform. I imagine I'm declaring it improperly.... any suggestions? Originally I was trying to apply a tint, but that seemed to be only AS 3.0?..[code]
I got a problem while making a fullscreen enabled flv player.I developed a player which will got to fullscreen but the problem comes when the monitor is wide. There comes blanh space left and in the right side of the video.
i dont know how to validate enabled input field by a checkbox.
I got 4 checkboxes each of them enabling/disabling its own input field when checked/unchecked. This for a little explanation of the user's choice. So i need to validate if the enabled input text has some text in it, if not, restrict the submit of the form (by button).
I tried something like this:
Code: } else if (checkBox1_txt.enabled = true || checkBox1_txt.text ="") { status_txt.text = "Please, explain your choice";
I made an AIR app and enabled it so the user can move it around the desktop where they want. One problem is on a page of textfields, if the user tries to select text (click, drag cursor to select the text) the app drags instead.
Any easy solutions other than having to set up listeners for every textfield and "interrupting" dragging?? (AIR 2.7)
I am loading text dynamically into some dynamic textfields. The text I am loading into them overflows. How do I make the textboxes vertically scroll enabled?
I'm currently learning Flex, and am having the hardest time getting scroll bars to work. In short, I'm making a giant form for users to fill out, contained within a viewstack component. The user will type up information in one view, and it will be displayed in the other. But right now in the first canvas I have components that run off the screen and flex doesn't automatically add a scroll bar, so I added 'verticalScrollPolicy="on"' to my canvas. Now, while it gives me a scroll bar, it gives me an empty scroll bar. I still cannot move it up or down, meaning components are still trapped off the bottom of my screen. Am I missing something simpleEdit - I'm using Adobe Flex Builder 3, and the components it lets you drag in. http://img12.imageshack.us/img12/218/problem1f.jpg This is a picture of the problem, and i guess relavent code would be.
If I'm loading images via the <img> tag in a dynamic text field and an IOError is thrown, what would I attach the event listener too? the text field?
I tried this... var textField:TextField = new TextField(); textField.htmlText = "here is some text <img src='image.jpg'> and then some more"; textField.addEventListener(IOErrorEvent.IOError, function (e:Event):void { trace("error caught") }); to no avail...
I have a list that uses a checkbox itemrenderer. The dataprovider is a collection of people. When I load the data from a file, each list item shows the person's name (last, first -- labelFunction), and the checkbox's selected property shows the person's included property. I.e.,Smith, Doug - [x]Williams, Bob - [ ]orris, Anne - [x]However, each person also has an active property. I want to disable the checkbox for people who are inactive (meaning, "you can't include inactive people").to do the same thing in a datagrid. However, none of them work and all the checkboxes are enabled regardless of the person's active status. Here is my basic code:
if mouse events are used instead of touch events on touch enabled devices, does that limit "touch" input to one touch at a time.
if a mouse down event is currently in progress will a following mouse down event simply not register or cancel the previous?
how are mouse events, historically used as single control pointers on desktop systems, handled on touch enabled devices capable of several simultaneous touch points?
event classes have a clone() function typically used to fire multiple events, so i'm assuming MouseEvent is not limited. however, my goal is to actually limit my application to one touch at a time (exclusive touch), but i'm not sure if this will be automatically handled with the use of mouse events.