Accessing HttpService proxy from Flex Application
Hello,
I am new to flex development. I had a question about configuring HttpService proxy access from my flex client to my BlazeDS server. From the examples, I can define my HttpService in my flex application as:
<mx:HTTPService id="srv"
destination="catalog"
useProxy="true"/>
I understand that I need to define my http service definition in the proxy-services.xml file in the BlazeDS deployment. So the BlazeDS deployment is on a different host to the client. How does the flex client access the HttpService definition and how to contact the server? Is the proxy-services.xml file deployed with the client? My current development environment is Flashbuilder 4. Do I need to install the proxy-services.xml file in my Flashbuilder project? Thanks in advance.
--Marco
how did you get it, how were you able to set the location of you blazeds server? i know with remoteObjects we can use channelset.
Similar Messages
-
Access file object from flex web app
Hi all,
I want to access file object from flex web app. What should i do?
I have to take array from my XML. In XML there will be only dir path. So for taking file name from dir i have to access it and have to perform for loop on that dir.
What should I do?
Any Ideas?
Thanks,
-CKHi Michael
My question is that I dont want to give name of images in XML file.
In XML file there will be only path of image directory. So I need to find all image name from that image directory.
Thats why I want to access file object.
Any ideas? -
How to start Flash Media Encoder 3.2 from Flex application with run time parameters?
Hello ,
I'm developing the application to stream High Quality video.While streming by default camera/microphone settings the qulaity of streaming is not upto my expected level.I want to stream through Flash Media Encoder.My aim is the user login to the application.Video/audio qulaity details are retrived from shared object stored in the client machine.The login user name only gathered at run time & it will be the streaming profile name to Encoder.Once the the Encoder started the outgoing video will be come into screen to client.Please guide me How to start Flash Media Encoder 3.2 from Flex application with run time parameters(User name as streaming name) without manually start the FME?
Thanks in advance.
Regards
SasharyuvaHi MarcSaphiron,
Could you please send the samples?It will be much helpful to complete my
job within the deadline.
Thanks in advance.
Regards,
Sasharyuva -
How to Call a AIR application from Flex Application
Hi,
I have Used AIR (Desktop application) in Flex Builder to Upload a File from a local path and save it it a server path.
I need to Call this AIR(Desktop application) from my Flex Application.... i.e
I am using a link button to send a event using Script and Forward that Desktop application from Flex Screen
But it doesnot load that (Desktop application) in Screen. Only Balnk screen is loaded from path
Here is the code
AIR(Desktop application)
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="openBrowseWindow();">
<mx:HTTPService id="urlpath" showBusyCursor="true" useProxy="false" method="
POST" url="http://localhost:8080/nat/FlexAction.do?method=UrlPath"result="pathresult(event)"
fault="faultHandler(event)"
>
</mx:HTTPService>
<mx:Script>
<![CDATA[
import mx.events.FileEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.utils.ObjectUtil;
import mx.controls.Alert;
private
var openFile:File = new File()
private
function openBrowseWindow():void{openFile.addEventListener(Event.SELECT, onOpenFileComplete);
openFile.addEventListener(Event.OPEN, load);
openFile.browse();
private
function load():void{Alert.show(
"load");
var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
//var textTypes:FileFilter = new FileFilter("Text Files (*.txt, *.rtf)", "*.txt; *.rtf");
var allTypes:Array = new Array(imageTypes);openFile.browse(allTypes);
private
function faultHandler(event:FaultEvent):void {
//Alert.show("Fault")Alert.show(ObjectUtil.toString(event.fault));
private
function pathresult(event:ResultEvent):void{Alert.show(
"res")
//Alert.show(ObjectUtil.toString(event.result));}private
function onOpenFileComplete(event:Event):void{
//mx.controls.Alert.show("event: "+event.target.nativePath +"UR!!!");
var pPath = event.target.nativePath;
var parameters:Object = {FlexActionType:"PATH",path:pPath};
// Alert.show("Image Selected from Path : "+pPath); urlpath.send(parameters);
//Alert.show("Passed.."+parameters);}
]]>
</mx:Script>
<mx:Button click="openBrowseWindow();onOpenFileComplete(event)" name="Upload" label="Upload" x="120.5" y="10"/>
Here is Mxml Code for Flex Application
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="http://ns.adobe.com/air/application/1.0.M4" >
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function Upload():void{
// CursorManager.setBusyCursor();
//var url:String = "HomeAction.do?method=onLoad";
//var url:String = "assets/Air.swf";
var url1:URLRequest = new URLRequest("assets/Air.swf");navigateToURL(url1,
"_self");
// CursorManager.removeBusyCursor(); }
]]>
</mx:Script>
<mx:LinkButton id="up" click="Upload()" x="295" y="215" label="UpLoad"/>
In this code i forward using s url to Open tat Desktop application but a blank screen appears with out the proper output...
Please Help me in this to forward AIR from Flex Screen..
Thanks in Advance
With Regards
Gopinath.A
Software Developer
First Internet Systems Pvt. Ltd.,
Chennaitry this
http://www.leonardofranca.com/index.php/2009/09/17/launching-an-installed-air-application- from-the-browser/
regards
Leonardo França
Adobe Certified Expert Flex 3 with AIR
Adobe Certified Expert Rich Internet Application Specialist v1.0
Adobe Certified Expert Flash CS3 Professional
Certified Professional Adobe Flex 2 Developer
Adobe Certified Professional Flash MX 2004 Developer
http://www.leonardofranca.com
http://twitter/leofederal
Manager AUGDF - Adobe User Group do Distrito Federal
http://www.augdf.com.br
http://twitter/augdf -
Can't Access Aperture Photos from Other Applications
I am using the trial version of Aperture. I can't access the photos in Aperture from Photoshop, Word or any other application (except Mail). I can see the icon for Aperture and the words "Aperture 3 Trial Library" but it is grayed out. Is there a setting or what? I have Snow Leopard and Mac OS X 10.6.5.
I guess one thing that bothers me about all my pictures being "bundled" in iPhoto or Aperture is that they don't show up in the Finder.
This is a real non-issue. A Package is simply a folder that looks like a file. Want to look inside? Go to your Pictures Folder and find the iPhoto Library or the Aperture Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
See? There are all your files, in folders.
Why are they Packaged? Because if you move, rename, or alter them then you will corrupt your Library. So it's a simple protection for the structure of the Library. That's all. No big secret.
But there are other things you need to consider too.
Supposing you want to attach a file to an Email in Aperture. Presumably you want to send the edited file of your photo. So, how do you do that +when there is no edited file+? Aperture doesn't actually edit the file at all it simply records the decisions you have taken and shows them to live when you view the pic. All your edits are "virtual". So, the fact that your original files are stored out the the package will be no help to you at all.
iPhoto is pretty much the same - though the details are different.
So, you have to use the applications when you want to access the files for whatever reason - editing, printing, sharing, whatever. That's the point of these apps. They are your Photo Manager, what AddressBook is to your Contacts, iTunes is to your Music and so on.
Here's a macro I use for when these questions come up on the iPhoto Forum. Most - if not all - of these will also work for Aperture:
You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
Uploaded with plasq's Skitch!
*_(Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)_*
You can access the Library from the New Message Window in Mail:
Uploaded with plasq's Skitch!
If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto or Aperture
If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
*If you want to access the files with iPhoto or Aperture not running*:
For users of 10.6 and later:
You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
*File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. This produces, producing a copy.
Regards
TD -
Access Address Book from other applications
Hi there,
How can I access Address Book information from other applications (notably the command line, OpenOffice, etc.)?
In particular, is there a command line utility to access and edit the Address Book?
Thanks!
BrianOne of the best answers would have been the CPAN module: Mac::Glue. Cheers.
-
Accessing another variable from another application
I was wonder how I can access another variable form another application?
For example: I want to access :P4_EMPLOYEE_NAME from app ID 104 when I am doing is from an activity in page 2 on app ID 142.
I had a search before, but I am looking for an unambiguous response.Greg - About all you can do is call the function htmldb_util.fetch_app_item(p_item => 'F104_ITEM', p_app => '104'). The application you call this function in must be sharing a session with the application from which you are fetching the item, both applications must belong to the same workspace, and the item you name in the argument must be defined as an application-level item in the fetched-from application.
Scott -
Help in printing from flex application
Hi Guys,
I am working from last few days with the printing via flex application, i face some issues while printing if any have suggestion or help it would be great..
1. Print which i got is not clear, like fonts are little fuzz or blur like.
2. Is printing via flex application is like the same as we print from MS WORD ?.
3. Choosing Flex for printing purpose like labels or A4 paper is right choice or not ?
Please comment!!
Thanks in advance,
HimanshuI went first to the Apple Store and tried an App and did not work had to inter the IP which I know is correct. What I was looking for is someone that is using the 7210 with the Iphone and what App they are using. I may have something else going on.
Thank you for the response.
Dee -
StageVideo usage from Flex Application?
Hello everyone!
I'm trying out new StageVideo class and if I add it pure AS3 project everything works perfect.
But if I try to use the same code in Flex project I get no video output, but looks like the video itself is playing ('cos I can hear the sound track).
I've tried to remove everything from mxml file to make sure nothing covers video, tried to remove all background changes and etc. (put here any other stuff that might overlay stage), but nothing helped.
Is it possible to use StageVideo from Flex app at all? May be there's some trick to it?
Can someone help? Thanks in advance!Hello,
I guess there is no way to attach files to this post. I made the main app an Application instead of a ViewNavigatorApplication for simplicity sake. It's a basic mobile application project for an ipad, so in Flash Builder just create a basic project using that profile and drop these in. I appreciate you taking a look at it.
thx
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private var mediaPlayer:CatVideoPlayer;
private function init():void
var videoFile:File = File.applicationDirectory.resolvePath("preview.mp4");
var videoPath:String = new File(new File(videoFile.url).nativePath).url;
mediaPlayer = new CatVideoPlayer();
mediaPlayer.width = 640;
mediaPlayer.height = 360;
addElement(mediaPlayer);
mediaPlayer.source = videoPath;
]]>
</fx:Script>
</s:Application>
Custom UI Component:
package
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.StageVideoAvailabilityEvent;
import flash.events.StageVideoEvent;
import flash.geom.Rectangle;
import flash.media.StageVideo;
import flash.media.StageVideoAvailability;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import mx.core.FlexGlobals;
import mx.core.UIComponent;
public class CatVideoPlayer extends UIComponent
private var _defaultHeight:Number = 360;
private var _defaultWidth:Number = 640;
private var _ns:NetStream;
private var _obj:Object;
private var _source:String;
private var _sourceChanged:Boolean;
private var _stageBitmap:Bitmap;
private var _stageVideoAv:Boolean = false;
private var _sv:StageVideo;
private var _vd:Video;
private var _vidMask:Sprite;
//private var _videoStage:Sprite;
public function CatVideoPlayer()
super();
mouseEnabled = false;
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
public function onCuePoint(info:Object):void
trace("CatVideoPlayer.onCuePoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
public function onMetaData(info:Object):void
//trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
//this.width = info.width;
//this.height = info.height;
public function onPlayStatus(info:Object):void
trace("CatVideoPlayer.onPlayStatus: " + info.data);
public function onXMPData(info:Object):void
trace("CatVideoPlayer.onXMPData: " + info.data);
public function set source(value:String):void
_source = value;
_sourceChanged = true;
invalidateProperties();
override protected function commitProperties():void
super.commitProperties();
if (_sourceChanged)
setState("showVideoPlayer");
_sourceChanged = false;
override protected function createChildren():void
super.createChildren();
trace("createChildren fired in CatVideoPlayer");
//_videoStage = new Sprite();
//addChild(_videoStage);
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
* Convert the current screen to a bitmap and mask it to show stageVideo.
private function convertStageToBitmap():void
var bitmapData:BitmapData = new BitmapData(FlexGlobals.topLevelApplication.width, FlexGlobals.topLevelApplication.height);
_stageBitmap = new Bitmap();
_vidMask = new Sprite();
_vidMask.graphics.beginFill(0x000000);
_vidMask.graphics.moveTo(0, 0);
_vidMask.graphics.drawRect(0, 0, _defaultWidth, _defaultHeight);
_vidMask.graphics.endFill();
//bitmapData.draw(this);
bitmapData.draw(FlexGlobals.topLevelApplication.document);
_stageBitmap.bitmapData = bitmapData;
_stageBitmap.cacheAsBitmap = true;
_vidMask.cacheAsBitmap = true;
//addChild(_vidMask);
_stageBitmap.mask = _vidMask;
//addChild(_stageBitmap);
//backgroundImg_mc.visible = false;
//playerWindow_mc.visible = false;
//initVideo();
* Handles the mouse clicks that occur on UI components.
* @param e
private function handleInterfaceClick(e:Event):void
e.preventDefault();
switch (e.target.name)
case "playBtn_mc":
setState("showVideoPlayer");
break;
case "closeVideo_mc":
setState("closePlayer");
break;
default:
//do default
* Plays the video using StageVideo if supported.
private function initVideo():void
var nc:NetConnection = new NetConnection();
nc.connect(null);
_ns = new NetStream(nc);
_obj = new Object();
_ns.client = _obj;
_ns.bufferTime = 2;
_ns.client = _obj;
//_obj.onMetaData = MetaData;
//_obj.onCuePoint = CuePoint;
if (_stageVideoAv)
//use stageVideo
trace("using stage video in CatVideoPlayer.initVideo()");
_sv = stage.stageVideos[0];
_sv.addEventListener(StageVideoEvent.RENDER_STATE, onRender);
_sv.attachNetStream(_ns);
else
//fallback to video class
trace("using normal video in CatVideoPlayer.initVideo()");
_vd = new Video(_defaultWidth, _defaultHeight);
//_vd.x = 152;
//_vd.y = 143;
addChild(_vd);
_vd.attachNetStream(_ns);
//addChild(videoUI_mc);
_ns.play(_source);
private function onAddedToStage(event:Event):void
trace("onAddedToStage fired in CatVideoPlayer");
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, onStageVideoAvailability);
private function onRender(e:StageVideoEvent):void
// if (!videoUI_mc.fsMode)
// _sv.viewPort = new Rectangle(152, 143, 720, 480);
// else
_sv.viewPort = new Rectangle(0, 0, 640, 360);
private function onStageVideoAvailability(e:StageVideoAvailabilityEvent):void
_stageVideoAv = (e.availability == StageVideoAvailability.AVAILABLE);
initVideo();
* Animate the video player's UI states.
* @param currentState The different states the player is in.
private function setState(currentState:String):void
trace("setState fired in CatVideoPlayer");
switch (currentState)
case "showVideoPlayer":
//playBtn_mc.visible = false;
//addChild(playerWindow_mc);
//addChild(closeVideo_mc);
//playerWindow_mc.visible = true;
//closeVideo_mc.visible = true;
//TweenLite.from(playerWindow_mc, 1, { alpha:0, onComplete:function(){ convertStageToBitmap(); } });
//TweenLite.from(closeVideo_mc, 1, { alpha:0 });
convertStageToBitmap();
break;
case "closePlayer":
//removeVideoPlayer();
//playerWindow_mc.visible = false;
//playBtn_mc.visible = true;
break;
default:
//do default -
How to call SKYPE from Flex application ?
The basic idea is this. I've got Flex application, to simplify the problem, let's say it's phonebook.
Data in this phone book is pulled from SQL server and telephone numers are changing daily.
I'm choosing a person, and I have button - CALL CONTACT ...
How to link this button to his current telephone number to call this number via SKYPE ?
There is such a way if you have HTML site - http://www.skype.com/intl/en-gb/business/features/calling/buttons/
Have you any idea how to make such button in Flash / Flex ??navigateToURL() ? http://livedocs.adobe.com/flex/3/langref/flash/net/package.html#navigateToURL%28%29
However, it looks like the Skype HTML has some form of JavaScript involved. If it's doing something special you may be Out of luck. -
Accessing a variable from different application instance in fmis
Hello everyone i like to know how to declare a global variable in FMS, so that i can access it from different application instance of a same application.
Thank.Hi,
In such a use case you can use persistent shared object to keep track of all connected users and the instances they are connected to. then when a user connects in application.xml you can check whether that user name and password is valid for a instance. This doc should help you get this achieved http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d3 7a-7fff.html
Thanks,
Abhishek -
Access HTML Pages from Forte Applications
We are currently looking at how to redevelop our online help facility for a
Forte application. We are investigating the use of HTML pages.
Has anyone written a Forte application that opens particular HTML pages? If so,
how was it done?
Regards,
Steve Isaac
Senior Consultant, Information Services Group
Hydro Electric Corporation of Tasmania
4 Elizabeth St, Hobart, Australia, 7000
Phone : +61 03 6230 5161
e-mail: [email protected]We have created the idea of an OnLineAssistant that uses HTML pages to drive
help in a Wizard-like fashion.
We use an embedded ActiveX browser control in a Forte window to display the
HTML pages. The pages are launched by passing the application, window, and
widget name to the OnLineAssistant window, which uses the information to load
the correct page.
For example: an application screen for entering customer name and address
passes it's information to the on-line assistant, which links and displays the
page associated with that particular step of a task wizard defined for that
widget. The ActiveX control then allows the user to link into any of the
other pages associated through standard HTML.
This context-sensitive mechanism is also used to launch on-line help (without
the task orientation) at the user's request.
One of the benefits of this approach is that we can put the message passing
into a generic framework ancestor without making any application code changes,
and the OnLineAssistant HTML pages can then be created by non-programmers and
deployed independently from the application, and HTML can do most of the
navigation work.
-DFR -
Calling a Help window from Flex application
I am trying to enable a button in a Flex application to launch a Help window. The Help window should connect to our web server and load our HTML Help.
I am unable to find any documentation on how to do this, except maybe something about creating an HTML wrapper. I am very new to Flex. Can someone please point me in the right direction? Thanks!Assuming that you want to open this content in a browser window, you might check out the navigateToURL function: http://livedocs.adobe.com/flex/3/langref/flash/net/package.html#navigateToURL()
HTH
Randy Nielsen
Flex Documentation Manager
http://livedocs.adobe.com/flex/3/html/url_requests_4.html -
Accessing module controls in flex application
Hello,
I want use module control which means datagrid in the application. Is it possible? Can I access module controls in the application.
Please help me..
Thanks in advance..Can you please rephrase your question? I don't understand what you are trying to do, but it sounds doable.
-
How to send non-latin unicode characters from Flex application to a web service?
Hi,
I am creating an XML containing data entered by user into a TextInput. The XML is sent then to HTTPService.
I've tried this
var xml : XML = <title>{_title}</title>;
and this
var xml : XML = new XML("<title>" + _title + "</title>");
_title variable is filled with string taken from TextInput.
When user enters non-latin characters (e.g. russian) the web service responds that XML contains characters that are not UTF-8.
I run a sniffer and found that non-printable characters are sent to the web service like
<title>����</title>
How can I encode non-latin characters to UTF-8?
I have an idea to use ByteArray and pair of functions readMultiByte / writeMultiByte (to write in current character set and read UTF-8) but I need to determine the current character set Flex (or TextInput) is using.
Can anyone help convert the characters?
Thanks in advance,
best regards,
Sergey.Found tha answer myself: set System.useCodePage to false
Maybe you are looking for
-
Same Apple ID but different emails
First off, some info about my situation...I have a 4S, iPad 2 and MBP. I am the only one in my household that has iOS5 and can therefore use iCloud. When I was going through signup for iCloud, it asked for an existing Apple ID, so I used my iTunes ac
-
Query for daily sales by warehouse
Hi I need a query for Daily sales by warehouse. I am only new to this and struggling with generating. ideally it will look like the below. With no selection criteria as I would like to schedule the report to email out at the end of each day. W
-
Getting idoc error - Entry in outbound table not found- in outbound scenari
hi, while generating idoc for outbound idoc to file scenario - i am getting error "Entry in outbound table not found" (29 - error in ALE service) Diagnosis No partner profile (outbound parameter) could be found using the following key: /C100/KU//WP_E
-
7.7.1 No longer Available in iTunes Downloads?
Hi. I have been back more than once to the Downloads/iTunes page (and a few others too) and can not find the download for 7.7.1 anywhere! All I can find is the 7.7 download. I've been looking for over a week now. Am I just not seeing it or has it bee
-
I changed the ink cartridges on my printer, and it is giving me an error message that the black cartridge is not installed corrrectly. I have taken it out, taken both out, many times. Turned the machine off and on with them in and out, etc. It is sti