DataGrid to MovieClip

I have data dynamically loading into a datagrid. I also have
a MediaPlayer component on the screen. What I want is when the
person clicks on one of the title's in the datagrid, for the movie
associated to pre-load, then load into the movieClip.
(The reason I am using a MediaPlayer, rahter than a plain
MovieClip or a FLV Player, is I am planning on loading several
different kinds of movies - swf, flv, mov, etc.)
I have never really used EventListeners, and have tried a few
things - but so far, to no avail.
The code I currently have is:
rssData.push({Title:title_array
.firstChild.nodeValue});
function movieListen(){
rssData.push({URL:url_array.firstChild.nodeValue});
myPlayer_mc.loadMovie(URL);
myGrid.addEventListener("click", movieListen);
but, while it gives no error, it also does nothing
else.

quote:
Hi...
I'm using AS3.
By the way I have added Movieclip on the data grid cell...
But now the problem is how to make it editable because I have
added two components on the same cell...
And that cell take this both component as object and you can
not edit that object by just making that column as editable =
true... so if any one can suggest me the way..
the help will be appreciated......

Similar Messages

  • Adding MovieClip to DataGrid Cell

    Hi to all..
    I have added components like ComboBox, CheckBox etc in the
    DataGrid cell..
    But Now I want to add MovieClip If not possible then Swf in
    the DataGrid cell using cellrenderer.
    Is it possible to add such things.
    If yes can you guide me how..? I have spend 3 days after
    this... Please Help me out..
    Thanks.

    quote:
    Hi...
    I'm using AS3.
    By the way I have added Movieclip on the data grid cell...
    But now the problem is how to make it editable because I have
    added two components on the same cell...
    And that cell take this both component as object and you can
    not edit that object by just making that column as editable =
    true... so if any one can suggest me the way..
    the help will be appreciated......

  • Datagrid expands when put in movieclip

    Gidday
    I wanted a drop shadow on my datagrid, so created a movieclip, put the datagrid inside.
    The datagrid's dimension are now all screwy. The header and text is magnified about 5x, and the width of the clip is bizarre.
    Shouldn't the DG maintain it's own dimensions when placed inside a clip?
    Any idea how this can be fixed?
    Thanks for your help.

    The only reason I can see that happening is that the movieclip itself has been scaled.  You shouldn't need to place the datagrid inside a movieclip to get a drop shadow.  You can  apply it directly to the datagrid using AS3.
    var dropShadow:DropShadowFilter = new DropShadowFilter();
    dg.filters = new Array(dropShadow);
    If you want to adjust the properties of the shadow, look up the DropShadowFilter class in the help documents.  The constructor for it is specified as...
    DropShadowFilter(distance:Number = 4.0, angle:Number = 45, color:uint = 0, alpha:Number = 1.0, blurX:Number = 4.0, blurY:Number = 4.0, strength:Number = 1.0, quality:int = 1, inner:Boolean = false, knockout:Boolean = false, hideObject:Boolean = false)

  • Putting MovieClips in a Datagrid

    Hey all,
    I have seen pretty limited examples of using the
    cellRenderer to create custom cells in datagrids. Adobe has a
    couple examples of adding checkboxes and drop down lists, but I
    really want to drop a graphic in my datagrid. Has anyone out there
    had any success with this, or know of any resources where I could
    pull some info. I am usually pretty good at taking a demo and
    making it do what I want, but I just can't seem to do it. I think
    what is tripping me up is that the example from Adobe uses a
    "CreateObject" to make the new item in the list and I just want to
    attach a clip from the library. Oh well, let me know any thoughts,
    as I would really appreciate it...

    "nickname118" <[email protected]> wrote in
    message
    news:gh6k5p$m8o$[email protected]..
    > OK, I have two dataproviders for the inner grids. Just
    two array
    > collections, I
    > don't need to go into what the data is. Let's say they
    are just strings or
    > numbers for now.
    >
    > var dataprovider1:ArrayCollection = new ArrayCollection(
    > [{ data: 1, data2: 2, etc..}]);
    > var dataprovider2:ArrayCollection = new ArrayCollection(
    > [{ data: 3, data2: 4, etc..}]);
    >
    > var grid1:DataGrid = new DataGrid();
    > grid1.dataProvider = dataprovider1;
    >
    > var grid2:DataGrid = new DataGrid();
    > grid2.dataProvider = dataprovider2;
    >
    >
    > var outerDataProvider:ArrayCollection = new
    ArrayCollection(
    > [{grid1: grid1, grid2:grid2}]);
    >
    > var outterGrid:DataGrid = new DataGrid();
    > outterGrid.dataProvider = outerDataProvider;
    >
    >
    > I'm not sure what you mean by "information at that level
    of the structure
    > to
    > feed them". I have assigned the data providers, and they
    have data in
    > them...
    > So what do you mean?
    Typically, an itemrenderer is, well, rendering an item. So if
    you have a
    need for a datagrid as an itemRenderer, that item should
    contain data that
    could serve as a dataProvider itself. This would be the case
    if, for
    instance, you had a nested ArrayCollection
    (HierarchicalData), or if you had
    hierarchical XML.
    > I left out the code, but for the collumns I reference
    the appropriate
    > names
    > from each arraycollection in the dataproviders.
    That doesn't even make any sense. To make thiswork, you're
    almost certainly
    going to have to make a custom itemRenderer. I don't think
    there's any way
    to specify a dataProvider for something _inside_ an
    itemRenderer from the
    column definition.
    > And for the outterGrid I assign
    > an itemrenderer of type DataGrid. I do this specifically
    with a
    > ClassFactory,
    > because the itemrenderer field is an IFactory object.
    I understand all the words you used, but they don't come
    together into any
    sort of sensible whole.

  • How to make the datagrid data organised

    I am not sure what code that can make the data in datagrid in position like regid,regname,,address,email,phone,company rather than every time I go in,it will refresh and be in random position and it is not organised.
    Please help and please tell me where to put the code.
    package {
      import flash.display.MovieClip;
      import fl.events.*;
      import flash.events.*;
      import flash.net.NetConnection;
      import flash.net.Responder;
      import RecordSetDP;
      public class RegistrationAdmin extends MovieClip {
      private var gateway: String = "http://localhost:8088/amfphp/gateway.php";
      private var connection: NetConnection;
      private var refreshResponder: Responder;
      private var updateResponder: Responder;
      private var regid: int;
      public function RegistrationAdmin () {
      viewBtn.addEventListener (MouseEvent.CLICK, viewRegistrants);
      updateBtn.addEventListener (MouseEvent.CLICK, updateRegistrant);
      deleteBtn.addEventListener (MouseEvent.CLICK, deleteRegistrant);
      addBtn.addEventListener (MouseEvent.CLICK, addRegistrant);
      updateResponder = new Responder (refreshData, onFault);
      refreshResponder = new Responder (refreshSuccess, onFault);
      connection = new NetConnection ();
      connection.connect (gateway);
      registrantsDG.addEventListener (Event.CHANGE, gridItemSelected);
      refreshData (true);
      public function viewRegistrants (e: MouseEvent): void {
      refreshData (true);
      private function refreshData (refresh: Boolean): void {
      if (refresh)
      connection.call ("RegistrantService.viewRegistrants", refreshResponder);
      private function refreshSuccess (result: Object): void {
      registrantsDG.dataProvider = RecordSetDP.toDataProvider (result);
      private function onFault (fault: Object): void {
      trace (String (fault.description));
      private function gridItemSelected (e: Event): void {
      regid = e.target.selectedItem.regid;
      regnameTxt.text = e.target.selectedItem.regname;
      addressTxt.text = e.target.selectedItem.address;
      phoneTxt.text = e.target.selectedItem.phone;
      emailTxt.text = e.target.selectedItem.email;
      companyTxt.text = e.target.selectedItem.company;
      private function getParams () {
      var param: Object = new Object ();
      param.regid = regid;
      param.regname = regnameTxt.text;
      param.address = addressTxt.text;
      param.phone = phoneTxt.text;
      param.email = emailTxt.text;
      param.company = companyTxt.text;
      return param;
      private function updateRegistrant (e: MouseEvent): void {
      var param: Object = getParams ();
      connection.call ("RegistrantService.updateRegistrant", updateResponder, param.regid, param.regname, param.address, param.phone, param.email, param.company);
      private function deleteRegistrant (e: MouseEvent): void {
      var param: Object = getParams ();
      connection.call ("RegistrantService.deleteRegistrant", updateResponder, param.regid);
      private function addRegistrant (e: MouseEvent): void {
      var param: Object = getParams ();
      connection.call ("RegistrantService.addRegistrant", updateResponder, param.regname, param.address, param.phone, param.email, param.company);

    the datagrid has sortItems and sortItemsOn methods you can use.

  • Is it possible to build a reliable application with the flash datagrid ???

    Hello all,
    Next problem in my non-stop nightmare using a flash datagrid to build an application
    I have a datagrid in my movieclip.
    Under Windows, if I select a row of the datagrid in read-only mode, let's say row 10 on screen, if I then switch the Windows active window (that means the datagrid looses the focus) and come back to my datagrid, the selected row is kept. OK !
    BUT, if I select a row in edit mode, let's says row 10, if I change the focused Windows window and then come back to my DataGrid, the selected row is now the first visible row on page ! If I then click outside my Flash application and then back into my Flash application, I get a crash: error #1009:Cannot access a property or method of a null object reference.
    The error message is very short. It seems to focus manager tries to access a TextField property but, which one ? No details, no function name in the error message.
    So:
    - how to avoid this "change active row when loosing / getting focus" in edit mode of datagrid ?
    - how to have more details in the error ? Are there "details levels" in Flash error management ?
    Thanks for all, I begin to stress: I'm at the half-time of my project and I'm nowhere because of that datagrid strange behaviours

    Might look at: https://jsfportletbridge.dev.java.net to get started.

  • How  to set DataGrid one cell colour

    I want to set one cell colour in DataGrid,for example,when a
    set a CheckBox in DataGrid ,I want letset this Cell's colour
    change

    One way to work around this, might be to create your own
    cellrenderer with an extra backround movie clip. So as you pass the
    value of the check box, either you set the fill color of the BG
    movie clip or just hide/show the BG clip.
    I hope the following brief script might be of help,
    class myCell extends UIComponent
    var bg:MovieClip;
    var cBox:CheckBox;
    function createChildren(Void) : Void
    // Create a new CheckBox
    // Create a new Background Clip
    bg = this.createEmptyMovieClip("bg_mc" , 0);
    bg.beginFill(color, fill);
    bg.moveTo(0, 0);
    bg.lineTo(4, 0);
    bg.lineTo(4, 4);
    bg.lineTo(0, 4);
    bg.lineTo(0, 0);
    bg.endFill();
    size();
    function size(Void) : Void
    super.size();
    this["bg_mc"]._width = width;
    this["bg_mc"]._height = height;
    invalidate();
    function setValue(cellVal) : Void
    if (cellVal == true)
    bg._visible = true;
    else
    bg._visible = false;
    Notes: BG: is the background movie clip.
    You will need to use AS based cellrenderer

  • Right click on datagrid question

    Hi guys
    I'm trying to get the columnIndex on a right click on a datagrid, so that I can use it when I select an item from my custom contextMenu.
    Currently...
    data_grid.addEventListener(ListEvent.ITEM_ROLL_OVER, dataGridRollOver);
    private function dataGridRollOver(event:ListEvent):void    {  lastRollOverRow = event.index;  lastRollOverColumn = event.columnIndex; }
    Then in my contextMenu function, I use lastRollOverRow and lastRollOverColumn
    It works fine if I right click, select a contextMenu option, then choose another row and repeat etc...
    However, say I right click, decide I've clicked on the wrong column, don't choose anything from the contextMenu, and then my next action is to right click on the correct column - the above event listener doesn't fire again (I presume because the contextMenu has focus), so my vars don't get updated.
    Is there a way to give focus back to the DG on a consecutive right click before re-displaying the contextMenu?
    I notice I don't need to set up an event listener to catch the right click for the datagrid's contextMenu. Is there something I can change so I can do something first before the contextMenu pops up?
    Cheers for your help.

    I'm a little confused mate. I thought that was what I already had set up (I forgot to mention that when the datagrid's RIGHT_CLICK function is triggered, I make sure the menu appears a few pixels left and up so that the mouse is over it), but are you saying that during creation, I need to apply a one-off event listener to the grid to initialize things as well as the one I already have that is listening to see if the user rolls off the entire grid:  rightClickMENU.addEventListener(MouseEvent.MOUSE_OUT, rightClickMenuRollOff); ?
    Re-reading my post, maybe I was a bit tired writing it!!!  Let me explain a little more clearly:
    - mainClass (where my datagrid is) calls and creates new instance of rightClickMENU, then calls a function to do this:
    addChild(rightClickMENU);
    rightClickMENU.visible = false;
    rightClickMENU.addEventListener(MouseEvent.MOUSE_OUT, rightClickMenuRollOff);
    (rightClickMENU class creates a container movieclip, then a bunch of rollover buttons, and addChilds each button to it's container - so the container is in the rightClickMENU class)
    - in mainClass, put this listener on datagrid: rightClickMENU.addEventListener(MouseEvent.MOUSE_OUT, rightClickMenuRollOff);
    - in mainClass, my roll on /roll off functions do this:
    private function showRightClickMenu(event:MouseEvent):void
                var X = event.localX * 4.3015;//default DG width is 272.  So set up correct right click position ratio 1170/272 = 4.3015.
                var Y = event.localY * 2.2513;//default DG height is 191    
                //with my datagrid pos offset, the coords below end up showing the menu with the mouse about three pixels in from the top corner:
                rightClickMENU.x = X+13; rightClickMENU.y = Y+75;
                rightClickMENU.visible = true;
    private function rightClickMenuRollOff(event:MouseEvent):void //menu roll out
                rightClickMENU.visible = false;
    Can you please explain a little more what you mean in your post?

  • Problem datagrid

    Hello is there anyone to help me about problem with datagrid display selection ?
    I apreciate if anyone help me to learn how i can insert any cechkbox inside datagrid
    otherwise help me to exlain me how i can capture selected line in a datagrid.
    I think is possible to use datagridevent but i don't know how i can set my program
    for this possibility resolution,i would like to display data content in a datagrid to other
    panel or movieclip.
    Thanks a lot

    Hello is there anyone to help me about problem with datagrid display selection ?
    I apreciate if anyone help me to learn how i can insert any cechkbox inside datagrid
    otherwise help me to exlain me how i can capture selected line in a datagrid.
    I think is possible to use datagridevent but i don't know how i can set my program
    for this possibility resolution,i would like to display data content in a datagrid to other
    panel or movieclip.
    Thanks a lot

  • Help with BitMap in DataGrid or List component

    Please help me with the problem:
    I need to fill out one of column of DataGrid with some
    particular image. I need to load this image form web service.
    If i try to use image which are represented as MovieClip and
    placed in the Symbol Library- everything is okay, all cells filled
    correctly. But if i've loaded image and put it into DataGrid i get
    only one filled cell with this image. What is the difference? How
    to prepare loaded image (or imported it to the Library) before
    using them in DataGrid(or List)?
    Please help!!
    code of cellRender:
    public class CellRender extends LabelButton implements
    ICellRenderer
    private var _listData:ListData;
    private var _data:Object;
    public function set data(d:Object):void {
    _data = d;
    public function get data():Object {
    return _data;
    public function set listData(ld:ListData):void
    _listData = ld;
    // this.setStyle("icon", image_from_Library); // - it works
    - okay
    this.setStyle("icon", ResourceLoader.resources[1]); // this
    display only one image in one cell
    // ResourceLoader.resources[1] - is represented as
    // BitMap; resources - static Array with loaded bitmaps
    }

    hi,
    Thanks for the link, but it doesn't really answear my question.
    I have a very similar implementation, but what I'm trying to do is to repositioning, for example the first element in the grid so the zoom in state dont get cut by the conteiner.
    I tried changing and animating the horizontal and vertical center in the hovered state, but for some reason that produce a "jump" in all the items...
    any suggestions?
    thanks!!!

  • IOS Datagrid problem

    Hi!
    I could'nt find any solution and wanted to ask what is wrong with the datagrid on iphone.
    When i touch any datagrid item it moves around in mc.
    Current packager is Air 3.0 beta. IOS & Flash CS5.5.
    Thanks!

    Issue solved. Drag&amp;Drop function was effecting movieclips.
    Thanks!

  • Printing of movieclip without stage color

    Greetings all,
    I have a flash stage which is in grey color. I have a blank movieclip which is in light pink in bgcolor. Can anyone tell me why when I tried to print the movieclip, my paper background will be printed grey? Is it because of my flash stage color? How do I fix this? (my original paper is white in color)
    Thanks for your time,
    -Zainuu

    Hi kglad, I will be putting a datagrid inside the printClip movieclip
    printClip.addChild(dg);
    and I will need to print out all the data inside the datagrid, so I need those values to ensure that all data will be printed (if datagrid verticial scroll policy is TRUE)
    is there other ways? Resizing of the rectangle properly or set to print no background color?
    whole script:
    for (var i = 0; i < 30; i ++)
        dp.addItem({no:i+1, Winner_Name:"Name_Name_Name_Name_Name_Name_"+(i+1), Prize_Title:"Title_Title_Title_Title_Title_Title_Title_"+(i+1),      Prize_Name:"PrizeName_PrizeName_PrizeName_PrizeName_PrizeName_"+(i+1)});
                SampleData.push(dp);
    myDataGrid.columns= ["no","Winner_Name","Prize_Title","Prize_Name"];
    myDataGrid.getColumnAt(0).width = 50;
    myDataGrid.getColumnAt(1).width = 160;
    myDataGrid.getColumnAt(2).width = 170;
    myDataGrid.getColumnAt(3).width = 170;
    myDataGrid.dataProvider = dp;
    myDataGrid.setSize(463, 178);
    myDataGrid.horizontalScrollPolicy = ScrollPolicy.ON;
    clickme.addEventListener(MouseEvent.CLICK, clickmeFn)
    var printClip:MovieClip = new MovieClip();
    clickme2.visible = false;
    clickme2.enabled = false;
    function clickmeFn(e:MouseEvent){
              //creates a moveclip and a datagrid to print
              var dg:DataGrid;
              printClip.graphics.beginFill(0xFFFF2FF);
              printClip.graphics.drawRect(0, 0, 100, 100);
              printClip.graphics.endFill();
              printClip.x = 0;
              printClip.y = 0;
              addChild(printClip);
              this.setChildIndex ( printClip , this.numChildren - 1 );
              printClip.visible = true;
              dg = new DataGrid();
              dg.move(0, 0);
              dg.setSize(570, 178);
              dg.rowHeight = 40
              dg.rowCount = myDataGrid.length ;
              dg.columns = ["no","Winner_Name","Prize_Title","Prize_Name"];
              dg.getColumnAt(0).width = 50;
              dg.getColumnAt(1).width = 160;
              dg.getColumnAt(2).width = 170;
              dg.horizontalScrollPolicy = ScrollPolicy.OFF;
              dg.verticalScrollPolicy = ScrollPolicy.OFF;
              dg.dataProvider = dp;
              printClip.addChild(dg);
              // Assign cellRenderers.
              var col1:DataGridColumn = new DataGridColumn();
              col1 = dg.getColumnAt(1);
              col1.cellRenderer = MultiLineCell;
              // Assign cellRenderers.
              var col2:DataGridColumn = new DataGridColumn();
              col2 = dg.getColumnAt(2);
              col2.cellRenderer = MultiLineCell;
              // Assign cellRenderers.
              var col3:DataGridColumn = new DataGridColumn();
              col3 = dg.getColumnAt(3);
              col3.cellRenderer = MultiLineCell;
              //print button activated
              clickme2.visible = true;
              clickme2.enabled = true;
              this.setChildIndex ( clickme2 , this.numChildren - 1 );
              clickme2.addEventListener(MouseEvent.CLICK, clickmeFn2)
    function clickmeFn2(e:MouseEvent){
              printDG();
    function printDG(){
        var my_pj = new PrintJob();
        var myResult = my_pj.start();
        if (myResult) {
            var clipHeight = printClip.height;
            var _pageHeight = my_pj.pageHeight;
            var numPages = Math.ceil(clipHeight/_pageHeight);
                        var xMargin = -20;
            var _yMin = 0;
                        var _yMax = 0;
            for(var i:int=0;i<numPages ;i++){
               _yMax = _yMin + _pageHeight;
                           my_pj.addPage(printClip,new Rectangle(xMargin,_yMin, my_pj.pageWidth, _pageHeight));
                           _yMin = _yMax;
            my_pj.send();
            my_pj=null;
    The reason I got clickmeFn2 is because if I call printDG(); at the end of clickmeFn, it prints nothing. I have no idea why is that so...
    Thanks,
    -Zainuu

  • Datagrid Image Renderer Broken in CS SDK but not Flex project

    Within a Photoshop Extension, I have a DataGrid which has an inline custom image renderer whose dataprovider is an ArrayCollection called "photos"  representing a list of photos and some metadata properties.  One of the properties "fileName" is concatenated with a path to a thumbnail image such as source="{'LR_AUTO/imported/thumbs/' + data.fileName}".
    The dataprovider is bound to a LCDS DataService. When the extension is first launched, the dataservice initializes the dataprovider with the existing values for the "photos" arraycollection.  The thumbnail images are correctly shown.
    However, when the DataService receives a new row and updates the photos dataprovider, the datagrid's new row shows a broken image for the thumbnail even though the path is correct.  I have dumped the photos dataprovider and verified that all information is correct.  When I close Photoshop and relaunch it from Flash Builder, once again LCDS initializes the photos ArrayCollection and THEN the thumbnail that previously showed as broken show up correctly.
    I have a ColdFusion Directory Watcher Gateway that watches a directory where Lightroom auto-imports images from a tethered capture session.  When the camera sends Lightroom a new image, the new image is processed by Lightroom and moved to a target directory, and since ColdFusion's Directory Watcher is watching that targeted directory, ColdFusion will create a thumbnail image in a subfolder and notifiy LCDS that of the new image and related metadata.
    *** This is the interesting part *** When Lightroom places new images in the target directory, this is propogated to the Photoshop Extension's datagrid, and the new row shows up as described earlier, showing a broken image for the thumbnail.  BUT, instead of Lightroom, if I manually copy images to the folder where ColdFusion is watching, then exact same code path is exectuted and in the Photoshop Datagrid the new row appears and THE THUMBNAIL IMAGE shows up correctly.
    The difference seems to be only in how the images are put in the original target location.  The problem is when Lightroom puts them there, but it works when I put them there as a user.
    *** More Interesting Info *** I have the Flex code for the Photoshop Extension duplicated in a standalone, non-CSSDK project using Flex 3.4 which I launch in a browser.  I have mirrored the code in the Photoshop extension, but in this manner, the problem does not exist.  With plain Flex 3.4 in a browser, whenever LCDS notifies the datagrid of a new photo record, the datagrid's new row ALWAYS shows the thumbnail correctly.
    A primary difference in how the thumbnail image is rendered is that in a browser, the Flex 3.4 project accesses the image assets over the network, however, in the Photoshop Extension, the image asset WITH THE SAME RELATIVE PATH is accessed over the local file system.
    source="{'LR_AUTO/imported/thumbs/' + data.fileName}"
    So in the case of the browser, this path is a relative URL and the image is retrieved over HTTP, however, in the PS Extension, the same path represents a file system path relative to the project folder.
    Unfortunately, because the Flash Player (including APE) cannot access BOTH the network and the local filesystem, so I cannot change the Extension to use network access.
    ** The important part to remember is that when I stop the Flash Builder debug session and close Photoshop, then relaunch the debug with Photoshop, then all the images show up correctly in the Extension.
    Your advice is appreciated.
    Thank you!
    Steve
    ====================================================
    Environment
    ====================================================
    Photoshop CS5 Extended 12.01 x32
    Flash Builder 4
    CS SDK 1.02
    Extension Builder SDK 3.4
    MacBook Pro / OS X 10.5 / Intel Core 2 Duo 2.66 GHz / Procs: 1 / Cores: 2 / Memory: 8 GB
    App configured for Photoshop CS5 and Photoshop CS5 Extended
    ====================================================
    NewsAgencyPhotoshop.mxml
    ====================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="com.stevenerat.news.*"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="0"
                    layout="vertical" horizontalAlign="left"  backgroundColor="#353535"
                    historyManagementEnabled="false"
                    creationComplete="init();">
        <mx:Script>
                public function handlePhotoClick(data:Object):void {
                    this.PreviewImageWindow = PreviewImage(PopUpManager.createPopUp(this,PreviewImage,true));
                    var filePath:String = data.dirPath + data.fileName;
                    PreviewImageWindow.addEventListener("imageOpenEvent",imageOpenListener);
                    PreviewImageWindow.addEventListener("imageCloseEvent",imageCloseListener);
                    PreviewImageWindow.addEventListener("imageSavedEvent",imageSaveListener);
                    PreviewImageWindow.setFileName(data.fileName);
                    PreviewImageWindow.setFilePath(filePath);
                    PreviewImageWindow.y = 0;
                    PreviewImageWindow.x = 0;
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="photos"/>
        <NewsPhoto/>
        <mx:DataService id="ds" destination="NewsAgencyPhotos" autoSyncEnabled="true" autoCommit="true" conflict="conflictHandler(event)"/>
        <mx:Label text="News Agency Photos" fontSize="20" paddingBottom="30"/>
        <mx:Label text="Available Images" fontSize="15"/>
        <mx:DataGrid id="photoIPTC" dataProvider="{photos}" editable="true" width="220" rowCount="5" rowHeight="75" wordWrap="true">
            <mx:columns>
                <mx:DataGridColumn headerText="id" dataField="fileName" width="40" editable="false" sortDescending="true"/>
                <mx:DataGridColumn dataField="psLock" width="65" headerText="Status" editable="false" editorDataField="value">
                    <mx:itemEditor>
                        <mx:Component>
                            <mx:ComboBox editable="false">
                                <mx:dataProvider>
                                    <mx:String>New</mx:String>
                                    <mx:String>Open</mx:String>
                                    <mx:String>Edited</mx:String>
                                </mx:dataProvider>
                            </mx:ComboBox>
                        </mx:Component>
                    </mx:itemEditor>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    ====================================================
    A DUMP OF THE DATAPROVIDER
    in this case, one array item existed when launched, then a second was added
    while running.  The first has its thumbnail show, the second item has broken image
    ====================================================
    ------------------DUMP----------------------------
    (mx.collections::ArrayCollection)#0
      filterFunction = (null)
      length = 2
      list = (mx.data::DataList)#1
        fillParameters = (Array)#2
        length = 2
        localItems = (Array)#3
          [0] (com.stevenerat.news::NewsPhoto)#4
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_162.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 1
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
          [1] (com.stevenerat.news::NewsPhoto)#5
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_163.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 2
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
        uid = "8BAC025E-60D1-11F1-3654-44BDB0D218CE"
        view = (mx.collections::ArrayCollection)#6
          filterFunction = (null)
          length = 2
          list = (mx.data::DataList)#1
          sort = (null)
          source = (null)
      sort = (null)
      source = (null)
    ------------------END_DUMP------------------------

    I expected that if my extension uses the local filesystem AND the network that I would get a Security Sandbox Exception as I recently described in this thread:
    http://forums.adobe.com/thread/791918?tstart=0
    However, I just tried changing my datagrid image renderer to access the thumbnail via HTTP and the thumbnail issue after Lightroom export does not happen.
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'http://localhost:8500/LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
    Furthermore, I can also open the image via the Photoshop DOM, and it does open correctly.  It seems that I do have a solution now, although I'm not certain as to why I'm not getting a Security Sandbox Exception as I described in the other post.
    Thanks for reading.

  • DataGrid does not display XML data

    Hello, and thanks for reading this...
    I am having a problem displaying XMLList data in a DataGrid.
    The data is coming from a Tree control, which is receiving it
    from a database using HTTPService.
    The data is a list of "Job Orders" from a MySQL database,
    being formatted as XML by a PHP page.
    If it would be helpful to see the actual XML, a sample is
    here:
    http://www.anaheimwib.com/_login/get_all_orders_test2.php
    All is going well until I get to the DataGrid, which doesn't
    display the data, although I know it is there as I can see it in
    debug mode. I've checked the dataField property of the appropriate
    DataGrid column, and it appears correct.
    Following is a summary of the relevant code.
    ...An HTTPService named "get_all_job_orders" retrieves
    records from a MySQL database via PHP...
    ...Results are formatted as E4X:
    HTTPService resultFormat="e4x"
    ...An XMLListCollection's source property is set to the
    returned E4X XML results:
    ...The "order" node is what is being used as the top-level of
    the XML data.
    <mx:XMLListCollection id="jobOrdersReviewXMLList"
    source="{get_all_job_orders.lastResult.order}"/>
    ...The "jobOrdersReviewXMLList" collection is assigned to be
    the dataProvider property of a Tree list, using the @name syntax to
    display the nodes correctly, and a change event function is defined
    to add the records to a DataGrid on a separate Component for
    viewing the XML records:
    <mx:Tree dataProvider="{jobOrdersReviewXMLList}"
    labelField="@name"
    change="jobPosForm.addTreePositionsToDG(event)"/>
    ...Here is the relevant "jobPosForm" code (the Job Positions
    Form, a separate Component based on a Form) :
    ...A variable is declared:
    [Bindable]
    public var positionsArray:XMLList;
    ...The variable is initialized on CreationComplete event of
    the Form:
    positionsArray = new XMLList;
    ...The Tree's change event function is defined within the
    "jobPosForm" Component.
    ...Clicking on a Tree node fires the Change event.
    ...This passes an event object to the function.
    ...This event object contains the XML from the selected Tree
    node.
    ...The Tree node's XML data is passed into the positionsArray
    XMLList.
    ...This array is the dataProvider for the DataGrid, as you
    will see in the following block.
    public function addTreePositionsToDG(event:Event):void{
    this.positionsArray = selectedNode.positions.position;
    ...A datagrid has its dataProvider is bound to
    positionsArray.
    ...(I will only show one column defined here for brevity.)
    ...This column has its dataField property set to "POS_TITLE",
    a field in the returned XML record:
    <mx:DataGrid width="100%" variableRowHeight="true"
    height="75%" id="dgPositions"
    dataProvider="{positionsArray}" editable="false">
    <mx:columns>
    <mx:DataGridColumn width="25" headerText="Position Title"
    dataField="POS_TITLE"/>
    </mx:columns>
    </mx:DataGrid>
    In debug mode, I can examine the datagrid's dataProvider
    property, and see that the correct XML data from the Tree control
    is present. However, The datagrid does not display the data in any
    of its 6 columns.
    Does anyone have any advice?
    Thanks for your time.

    Hello again,
    I came up with a method of populating the DataGrid from the
    selected Item of a Tree Control which displays complex XML data and
    XML attributes. After the user clicks on a Tree branch, I call this
    function:
    public function addTreePositionsToDG(event:Event):void{
    //Retrieve all "position" nodes from tree.
    //Loop thru each Position.
    //Add Position data to the positionsArray Array Collection.
    //The DataGrid dataprovider is bound to this array, and will
    be updated.
    positionsArray = new ArrayCollection();
    var selectedNode:Object=event.target.selectedItem;//Contains
    entire branch.
    for each (var position:XML in
    selectedNode.positions.position){
    var posArray:Array = new Array();
    posArray.PK_POSITIONID = position.@PK_POSITIONID;
    posArray.FK_ORDERID = position.@FK_ORDERID;
    posArray.POS_TITLE = position.@POS_TITLE;
    posArray.NUM_YOUTH = position.@NUM_YOUTH;
    posArray.AGE_1617 = position.@AGE_1617;
    posArray.AGE_1821 = position.@AGE_1821;
    posArray.HOURS_WK = position.@HOURS_WK;
    posArray.WAGE_RANGE_FROM = position.@WAGE_RANGE_FROM;
    posArray.WAGE_RANGE_TO = position.@WAGE_RANGE_TO;
    posArray.JOB_DESCR = position.@JOB_DESCR;
    posArray.DES_SKILLS = position.@DES_SKILLS;
    positionsArray.addItem(posArray);
    So, I just had to manually go through the selected Tree node,
    copy each XML attribute into a simple Array, then ADD this Array to
    an ArrayCollection being used as the DataProvider for the DataGrid.
    It's not elegant, but it works and I don't have to use a Label
    Function, which was getting way too complicated. I still think that
    Flex should have an easier way of doing this. There probably is an
    easier way, but the Flex documentation doesn't provide an easy path
    to it.
    I want to thank you, Tracy, for the all the help. I checked
    out the examples you have at www.cflex.net and they are very
    helpful. I bookmarked the site and will be using it as a resource
    from now on.

  • How can i access a mysql table without putting the data in a datagrid

    I developed my air app with a datagrid which uses a php service to display all data from a table of strings in MySql.
    I now do not need the datagrid, how can i get the data from my database without putting it into a dataGrid? Do i need an array? how do i do this? anyone got any example code?

    Balakrishnan V wrote:
    var resultArrayCollection:ArrayCollection=new ArrayCollection()
    protected function resultHandler(event:ResultEvent)
         result=event.result as ArrayCollection
    You can use the result array collection now inside your program for any further changes / manipulations.
    Hope this helps; If you have further doubts, do ask...
    Balakrishnan V
    Hi, yeah this helps,
    however, how would i generate a result handler for a service that has not been called yet? Sorry my knowledge of services is very limited.
    This is a php service, get_all service that returns all the rows from a mysql table.
    I can see the service box with the service i want to use:
    but how do i pass that to a result handler?

Maybe you are looking for

  • Help me with hp elitebook 2560p

    i am not sure about the battery size of this model ???? in this picture the battery stick out at the back http://www3.pcmag.com/media/images/267495-hp-elitebook-2560p-top.jpg but in this picture, it isn't http://www.itechnews.net/wp-content/uploads/

  • Component scart cable

    Have a PANASONIC TX- 36PL30 36" which I think, but am not sure, has a "rgb scart". Does that mean I can use it with aTV, and would I need a "special" component to scart adapter for rgb signals, or is it ok with any brand as long as my tv has rgb scar

  • Result of Calculated Field as Criteria?

    I'm using CASE and CAST to convert a field to datetime format so that I can account for null field values CASE      WHEN ISDATE([Date])=0 THEN 01/01/1900      ELSE          CAST([Date] as datetime) END as [DateConverted] How can I use this new [D

  • Adobe 9.3.1 programme maintenance

    Hi, hope someone can help. Every morning i switch my PC on and it brings up the Adobe Reader 9.3.1 programme maintenance dialogue box and asks me to update and then instal. It surely cant need updating that regularly and it seems to be updating the s

  • Content Area in Portal Page: subfolder vs category

    Hi everybody, i've tried to publish a content area + navbar in a portal page: if i click to a SUBFOLDER on the folder portlet , the subfolder appears in the context of the portal page. But if i click a link to a CATEGORY, the category is loaded in th