Merge two docs into one

2 views
Skip to first unread message

praveenchowd...@gmail.com

unread,
Aug 17, 2011, 6:16:01 AM8/17/11
to HyderabadFX
Hi Everyone,
could anyone please help me out in solving the solutions for below
one.
* How to merge two documents into one document in flex.

Waiting for reply

Thanks & Regards,
Praveen Chowdary. Ramineni.

chandu reddy

unread,
Aug 22, 2011, 12:26:03 PM8/22/11
to HyderabadFX
Hi praveen,
you mean text docs?


On Aug 17, 3:16 pm, "praveenchowdary.ramin...@gmail.com"

PRAVEEN CHOWDARY RAMINENI

unread,
Aug 26, 2011, 11:49:21 PM8/26/11
to hyder...@googlegroups.com
yes .....could you please solve this.


--
You received this message because you are subscribed to the Google Groups "HyderabadFX" group.
To post to this group, send email to hyder...@googlegroups.com.
To unsubscribe from this group, send email to hyderabadfx...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hyderabadfx?hl=en.




--
With Regards,
PRAVEEN. RAMINENI

http://praveenramineni.webs.com/

chandu reddy

unread,
Aug 27, 2011, 4:14:14 AM8/27/11
to HyderabadFX
Praveen-

Please find below code snap.
If you want to save a.txt +b.txt =c.txt you can use file ref with
appropriate data.

<?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"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600">

<fx:Script>
<![CDATA[
import mx.controls.Label;
private var txt_loader:URLLoader;
[Bindable]
private var mergeString:String='';//to avoid null need to put this
line as ''

protected function button1_clickHandler(event:MouseEvent):void
{
txt_loader=new URLLoader();
var uri:URLRequest=new URLRequest('assets/a.txt');
txt_loader.addEventListener(Event.COMPLETE,onComplete);
txt_loader.load(uri)

txt_loader=new URLLoader();
var uri:URLRequest=new URLRequest('assets/b.txt');
txt_loader.addEventListener(Event.COMPLETE,onComplete);
txt_loader.load(uri)
}
protected function onComplete(e:Event):void{
mergeString+=e.target.data;
}
]]>
</fx:Script>


<s:Button x="10" y="10" label="loaddocs"
click="button1_clickHandler(event)"/>
<s:TextArea x="10" y="58" width="459" height="263" id="ta"
text="{mergeString}"/>
</s:Application>


On Aug 27, 8:49 am, PRAVEEN CHOWDARY RAMINENI
> *With Regards,
> PRAVEEN. RAMINENI
> **http://praveenramineni.webs.com/*<http://praveenramineni.webs.com/>
Reply all
Reply to author
Forward
0 new messages