Flex :: Actionscript Get Location?
Nov 19, 2010How can I get the application itself full path in actionscript?
View 3 RepliesHow can I get the application itself full path in actionscript?
View 3 RepliesI 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.
View 16 RepliesI 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?
View 13 RepliesHow can I change the location of the src folder? Right now I can just move the src folder from the navigator to some other location, but it's not being referenced as the src folder. (it doesn't have the square-ry icon on the folder icon)?
View 1 RepliesI'm working on a build script in the Flash Builder version of Eclipse. This build script needs to import launch configuration .launch files into the user's workspace. However there doesn't seem to be an available ANT var for determining the workspace location. While stepping through the available vars with intellisense I noticed that ${osgi.instance.area} does point to my current workspace but when I tried to echo it back in a running ant script it just spat out "${osgi.instance.area}" and not the path.
View 3 RepliesI have a component that changes its location based on other elements. I'm trying to find its x and y position at different intervals, so I tried compname.x and compname.y.
The x position seems to be working, but the y position is always 0. I need to play with localToGlobal or contentToGlobal or one of those conversions.
I have a requirement to select a file from fileReference.browse(), but I want to browse a file to specific location say D:Dirfile instead of the OS specific (The dialog box is native to the user's operating system).
View 2 RepliesI have successfully generated my web service proxies using the FlexBuilder menus. This particular web service has an internal (or incorrect) "location" specified in its WSDL. This means that when I go to make an actual method call, it fails because the DNS name specified in the location field is wrong. (It shows as "aborted" in fire bug).
How do I set the location attribute on the service object?
update:
The field that needs to be changed is listed below. It is called "WSDL- ndpoint." So the question is: How do I do this programmatically given the generated web service object (the one that extends WebServiceWrapper)?
<annotation name="ServiceConfig">
<item name="DEFAULT_ENTITY_PACKAGE">valueObjects</item>
<item name="WSDL-endpoint">http://eoc7/eoc7/api.asmx</item>
<item name="LINKED_FILE"></item>
</annotation>
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.
View 8 RepliesI have a swf which, for some reason, has four RemoteObjects pointing to the same ChannelId, but they are listing that channel as being at two different spots. In four of the five RemoteObjects, everything behaves as expected, but in the fourth (WidgetService), the version on dev is switching from dev.context.root toloc.context.root. To make matters more confusing, it only does this on the dev server (QA and production are fine, as are local builds).The relevant information from the config files follows:
#This is from build.properties, which is used by Ant
#to build the swf on the server
flex.sdk.dir = /path/to/sdk/flex_sdk_3.2.0.3958
[code].....
I am trying to make it so that when a user launches my air app, it positions itself and sizes itself to whatever it was the last time it was opened.
[Code]....
I'm sending POST request using URLLoader and URLRequest with XML data. Then API sends response with redirect page(Location header) and i want to get this URL. How do I catch this response?
[Code]...
I have this <s:list> with an itemrenderer and arraycollection as dataprovider. Now my problem is I want to be able to drag and drop to reorder those items. To do so I need to know the dragged item index, and the drop location. I have the selected item index but when I want to calculate my drop location using this code in my dragcompletehandler()...
[Code].....
how to give a relative path in URLRequest paramate and download that file.I found it from this particular stack overflow post .now if If give my machine's relative path, C:/sample/DefectList.xls it works.Now I have to access an xls file kept in the server machine or any other machine,say my team mate's machine. The ip address is 172.17.196.124 and the location is C:/sample/test.xls.I tried
var request:URLRequest = new URLRequest"file://172.17.196.124/c:/sample/test.xls");
But it throws the Error#2032.How to mention a remote location as a relative path?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="loadFile()">[code].....
The normal structure is:
project/
bin-debug
html-template
libs
src
I want to change it to:
project/
bin-debug
flash/
html-template
libs
src
I know how to change the libs and src folders, but not html-template. Is it possible?
I am trying to find the best way to improve the user experience when interacting with a context menu in a Flex application. I already know that the context menu in Flex is quite limited in terms of how it is constructed and what it can show.
What I was hoping to do was to implement something similar to what Microsoft Word does in 2010 or later, where when right clicking a little floating palette is displayed above the common popup menu. I was hoping that there was a way to 1) listen for an event that is triggered when a context menu is displayed, and 2) determine the location of the context menu so that I could display a floating palette above the context menu as in Word. So far, I have not found out how to accomplish either of these things.
I suspect that there might be some focus and stage management issues with this approach generally, but I was hoping to at least get to the point where those issues were discovered.
I want to do my stuff on LocationChangeEvent.LOCATION_CHANGE event which is introduced in AIR 2.7 but this event is not getting dispatched.My sample code is below. Please help me know if there is anything wrong that I am doing.
[Code]...
I have a Spark TextArea:
<s:TextArea id="editor">
<s:textFlow>
<s:TextFlow id="_tf" >
<s:p>Lorem ipsum etc.</s:p>
[code]...
But still no joy in inserting into the middle. Also, the above code wouldn't replace highlighted text, but that's not the real concern here.Based on Eugene's link the key to this is EditManager.The following code represents the working updated function:
protected function imageBtn_clickHandler(evt:MouseEvent):void {
var em:EditManager = editor.textFlow.interactionManager as EditManager;
em.selectRange(editor.selectionAnchorPosition, editor.selectionActivePosition);
[code]...
As a first step getting a Hello World Flex-to-Java application to compile and run I followed: [URL] And it ran successfully. However now I wish to automate the build in Maven. How to specify the Flex Server location in the pom.xml?
View 1 RepliesWhen running a flash application that I run locallyie I get to it from a browser but with a file pathNow, most of the time the shared objects are stored in%APPDATA%MacromediaFlash Player#SharedObjectsXXXX#localWithNetBut occasionally, it reverts and thinks this application is running on localhost%APPDATA%MacromediaFlash Player#SharedObjectsXXXXlocalhostwhich means all previous saved settings are gone.I'm wondering if anyone knows how flash decides if the application is infact localhost or localWithNet (local with Network access)
View 4 RepliesWhen running a flash application that I run locally i.e., I get to it from a browser but with a file path
file:///C:/Projects/test/bin-debug/Main.html#
Now, most of the time the shared objects are stored in
%APPDATA%MacromediaFlash Player#SharedObjectsXXXX#localWithNet
But occasionally, it reverts and thinks this application is running on localhost
%APPDATA%MacromediaFlash Player#SharedObjectsXXXXlocalhost
Which means all previous saved settings are gone.
How flash decides if the application is infact localhost or localWithNet (local with Network access). Rebooting can sometimes make it revert, but I've also had it stay localhost for a few days then revert.
I have a task: I need to place about 100 sprites on one canvas (with prepared grid on it). I need to place them as invisible (circles) stones, on the board, and make visible only on mouseover. The problem I come across is following, I can't place those objects accurately into the nodes on the grid.
[Code]...
I want to download a file from the server and save it in a particular location of the disk without user interaction. All this I want to do it in Flex.
View 1 RepliesIs there any kind of a standard for the location (padding) and size of the usual "ok" and "cancel" buttons on a Flex pop-up dialog box? In another stackoverflow question it was suggested that the approach be host operating system dependent (e.g. Windows vs Mac vs Linux).
View 1 RepliesFlexBuilder's debugger will show you the "memory location" (or, I can only assume, something roughly analagous) of any in-scope instance:
But I'd like to get this information in code (sort of like Python's id function), so I could very easily trace how objects move through out the system. For example, I might have:
trace("Returning", id(foo));
Then somewhere else I could use:
trace("Using", id(foo));
To make sure both bits of code are dealing with the same instance.
Now, I know that many AS classes implement the IUID interface... But there are also a bunch of classes which don't (plain old arrays and objects, for example), so that wouldn't solve my problem.
I realize that I could also wrap objects in an ObjectProxy, but that would be less than ideal as well.
I have a series of swfs that I've connected via loadmovie. This works well with I press the NEXT button, but not the PREVIOUS button. The PREVIOUS button starts at the beginning of the called movie. I need it to start at a specific location. Is that doable? If yes, how? I tried adding the gotoandplay after the call to the swf, but no luck.
View 2 Repliesis it possible to show my Town (find by IP) / Town of my Provider in Flash File?
View 2 RepliesHow do you change this code so that it works when the swf timeline its on, is loaded into a movieclip on a main swf stage (_root.loadarea)It works fine on its own but dont when loaded into the loadarea mc.
Code:
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
var quick = "<br><p class='one'>The quick Kirupa jumps over the lazy dog.</p>[code]..........
I have a flash file that calls a XML file to give it commands, such as color etc...
I want to change the name of the XML file, but am not sure how to change it in flash so that the SWF knows where to find the XML.
I have been working with xml sheets to load a menu and in order to load a submenu or to go to a submenu of a submenu, I was wondering if it is possible to load a variable location for an xml.
For example, if I had the variable xmllocation which was a string that said where in an xml a certain menu was, is it possible to use the xmllocation variable for something like this:
( if xml.xmllocation.length() > 0 ) do something;
whenever I tried messing around with it, it would actually go to look for "xmllocation" in the xml instead of check what the string is. So what I guess I am really asking is, is there a way to tell it not to be so literal?