Many a times we get this error message saying flex-debug not found and won't launch the debugger.
The solution which I found is first get the flash unistaller, and then install the debugger version of flash player, it will start working as before.
The link for the flash uninstaller is as below
http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html#main_Download_the_Adobe_Flash_Player_uninstaller
One its done, installer the debugger version which you can find in the link below:
http://www.adobe.com/support/flashplayer/downloads.html
This shall sort out our issue of the debugger not getting launched.
FlexTips
Sunday, May 27, 2012
Monday, March 19, 2012
Copying from one array collection to another without keeping reference
private var List:ArrayCollection = new ArrayCollection;
private var duplicateList:ArrayCollection = new ArrayCollection;
// to get the data for the first Array Collection
eventList = eventStore.getData();
// copy it to the other Array Collection
for(var z:int =0;z {
if(List.getItemAt(z).view == 1)
duplicateList.addItem(List.getItemAt(z));
}
private var duplicateList:ArrayCollection = new ArrayCollection;
// to get the data for the first Array Collection
eventList = eventStore.getData();
// copy it to the other Array Collection
for(var z:int =0;z
if(List.getItemAt(z).view == 1)
duplicateList.addItem(List.getItemAt(z));
}
Wednesday, November 9, 2011
Splitting strings in action script.
I used the following code to split the string in my code:
var lv_string:String;
lv_string = "[RC=200] URL http://www.google.com called successfully";
var lt_string:Array = lv_string.split("URL");
lv_string = lt_string[1];
lt_string = lv_string.split(" ");
Within the bracket we can specify the delimiter on the basis of which we split the string and put it in an array. We can access the value from the array. ie. lt_string[1] to access the url, etc.
Hope this will save some trouble.
var lv_string:String;
lv_string = "[RC=200] URL http://www.google.com called successfully";
var lt_string:Array = lv_string.split("URL");
lv_string = lt_string[1];
lt_string = lv_string.split(" ");
Within the bracket we can specify the delimiter on the basis of which we split the string and put it in an array. We can access the value from the array. ie. lt_string[1] to access the url, etc.
Hope this will save some trouble.
To launch to a new window with the url from the advanced data grid control, using
navigateToURL.
navigateToURL(request:URLRequest, window:String):void
The request argument is a URLRequest object that specifies the destination. The window argument specifies whether to launch a new browser window or load the new URL into the current window. The following table describes the valid values for the window argument:
_self:
Specifies the current frame in the current window.
_blank:
Specifies a new window. This new window acts as a pop-up window in the client’s browser, so you must be aware that a pop-up blocker could prevent it from loading.
_parent: Specifies the parent of the current frame.
_top: Specifies the top-level frame in the current window.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function remove_watermark():void
{
//test.removeChildAt(test.numChildren-1);
(test.getChildAt(test.numChildren-1) as TextField).htmlText = " ";
}
protected function navigate():void
{
if( test.selectedItem.Album != null )
{
var urlRequest:URLRequest = new URLRequest(test.selectedItem.Album.toString());
navigateToURL(urlRequest,”_parent”);
}
]]>
</mx:Script>
<!-- <mx:Script>
<![CDATA[
[Bindable]
[Embed(source="assets/sap.png")]
public var sapicon:Class;
]]>
</mx:Script>-->
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()">
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="enchanted"/>
<mx:Object Artist="Shakira" Price="90" Album="woddoo"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
}
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()"itemClick=”navigate”>
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="http://www.google.com"/>
<mx:Object Artist="Shakira" Price="90" Album=" http://www.facebook.com"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
navigateToURL.
navigateToURL(request:URLRequest, window:String):void
The request argument is a URLRequest object that specifies the destination. The window argument specifies whether to launch a new browser window or load the new URL into the current window. The following table describes the valid values for the window argument:
_self:
Specifies the current frame in the current window.
_blank:
Specifies a new window. This new window acts as a pop-up window in the client’s browser, so you must be aware that a pop-up blocker could prevent it from loading.
_parent: Specifies the parent of the current frame.
_top: Specifies the top-level frame in the current window.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function remove_watermark():void
{
//test.removeChildAt(test.numChildren-1);
(test.getChildAt(test.numChildren-1) as TextField).htmlText = " ";
}
protected function navigate():void
{
if( test.selectedItem.Album != null )
{
var urlRequest:URLRequest = new URLRequest(test.selectedItem.Album.toString());
navigateToURL(urlRequest,”_parent”);
}
]]>
</mx:Script>
<!-- <mx:Script>
<![CDATA[
[Bindable]
[Embed(source="assets/sap.png")]
public var sapicon:Class;
]]>
</mx:Script>-->
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()">
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="enchanted"/>
<mx:Object Artist="Shakira" Price="90" Album="woddoo"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
}
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()"itemClick=”navigate”>
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="http://www.google.com"/>
<mx:Object Artist="Shakira" Price="90" Album=" http://www.facebook.com"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
To remove watermark while using Advanced Datagrid control
Code to remove the water mark while using advanced data grid control:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function remove_watermark():void
{
//test.removeChildAt(test.numChildren-1);
(test.getChildAt(test.numChildren-1) as TextField).htmlText = " ";
}
]]>
</mx:Script>
<!-- <mx:Script>
<![CDATA[
[Bindable]
[Embed(source="assets/sap.png")]
public var sapicon:Class;
]]>
</mx:Script>-->
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()">
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="enchanted"/>
<mx:Object Artist="Shakira" Price="90" Album="woddoo"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
}
<mx:AdvancedDataGrid id="test" creationComplete="remove_watermark()">
<mx:dataProvider>
<mx:Object Artist="Jlo" Price="60" Album="enchanted"/>
<mx:Object Artist="Shakira" Price="90" Album="woddoo"/>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Album"/>
<mx:AdvancedDataGridColumn dataField="Price" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
Subscribe to:
Comments (Atom)