Flex 3 gallery

Hi, i have my xml file to get the photos into flex gallery. when i click on one of the photos they will be shown in a bigger image. what i would like to know is how i can have one of the picture in the image from the beginning? lets say it starts with pic no 1 in the image and then you can choose any picture so that image wont be blanc.
My code for showing pic in canvas:
<mx:Image source="{dataGrid.selectedItem.src} width="528" height="448" />
thank you for help!
Ida

There are multiple paths to solving this issue. 
One may be to provide a creation complete event handler on the data grid to select the first item after the data grid is populated.  Then you can force the data grid to select an item and your binding should work for you.  Make sure your image source has also completed it's creation phase.  If the data grid and the image are in the same component you might consider putting the creation complete handler on the overall component.
Place this in your data grid and image container (this assumes that the data has been already assigned to the data grid at creation complete):
creationComplete="setFirstImage()"
And this in a script block or your code behind as:
<mx:Script>
<![CDATA[
private function setFirstImage():void
dataGrid.selectedIndex = 0;
]]>
</mx:Script>
If the data is asynchronous just make sure to set the selected index after the data is assigned to the data grid's data provider.
Did I understand the question? Does this help?
Best,
J. Phillip Camp

Similar Messages

  • Displaying Images Stored on a Server In Flex

    My original idea for my app was to have live thumbnails of websites by screenshotting a html component in the app and saving these screenshots as jpgs which are applied as the source of the thumbnails. I now realise this is a bit too unstable as if the site doesn't load the images won't display. What I want to do instead is use the same idea but instead of the application writing to the application directory writing to a server where the images are stored so that it will overwrite these images.
    What I need to know is how to display server stored images in flex in either an image component or an array collection so they can be applied to a tilelist. The problem is I have zero experience at using server side data with flex. Can anyone point me in the direction to some examples/tutorials on how to display server stored data or more specifically images within a flex application or give me advice on this? Cheers.

    quick and easy way to do it would be with PHP.
    Make a script, scan a server folder and return the results in an XML format that can simply be fed into a datagrid/tilelist/whatever. To give you a few hints of what to look into.
    You'll need an initial HTTPService request fired off to the php script. The PHP script will then need to parse through the folder finding all the images, i'd recommend the glob() function in PHP to do this. eg:
    print "<images>";
    foreach (glob("directory/*.jpg") as $filename) {
        print "<screen><name>".$filename."</name><location>directory/".$filename."</location></screen>"
    print "</images>";
    then you'll need to handle the result event, simply feed each item into its respective place and ta daa.
    there are loads of examples around with this same methodology principle like this one:
    http://www.vipercreations.com/tutorials.php?t=28&page=1&c=Adobe%20Flex
    and i'm sure if you search around for 'flex php gallery' on google you'll probably even find a totally relevant example.

  • Creating a Flex CMS

    I am looking to create a Flex CMS for managing a school site.
    I have an .xml file that is connected to my flex image gallery. To
    make it easier on the people that need to edit or add information
    about the photos I am looking to create a CMS. I realize that this
    would involve using other technologies such as PHP but if someone
    would like to assist me on this project I would be greatful. If
    there is a way to do this I would also like to expand this to edit
    HTML files as well. Any ideas or suggestions would be great.
    I was looking to Flex for this project because of the great
    interface and possibities but it is not nessasary for me to use
    this ( I could always go with a standard approach - HTML, PHP, etc.
    Thanks

    The project is a new extension to the school site for clubs
    and organizations. I currently have a homepage and one club site
    ready. The club site is for the art club hense the image gallery. I
    do not want to be resoponsible for adding content for everyones
    clubs and that is why i am looking towards CMS. I will have to
    check about the permissions that can be given in regards to PHP nad
    MySQL access as the server is shared for the entire school
    district's websites. I will be trying to push access but in the
    meantime I want to get started on the website.
    Each club or organization will have its own login to give it
    access to changing its own site. I do not want to give them any
    access to the actual files on the server. In regards to the xml
    file I will try to set it up in advance and not get them to edit it
    as it will probably look intimidating with 100+ nodes.
    I look forward to seeing what you have developed. I will
    contact you via email with my contact information.
    Thanks for the help,
    Jon

  • Photo gallery with Thumbnail View in Flex 3

    Hello everyone
    I very urgently need an answer to a very simple qeuestoon. I have been trying really hard since days to get a solution to this simple problem but in vain.
    I am building an application in Flex 3. I simply want to create a photo gallery with a thumbnail where when the user clicks on a thumbnail, the image is shown in the canvas/tab navigator box next to it. The images are stored in a local folder (in src) are ARE NOT on available on any web link.
    The Vbox with the thumb image and the .xml file has been created. But when I click on the thumbnail, the full image cannot be seen in the application. I dont know if this is a problem with data binding or what.
    Please help!!!
    Thanks a ton.

    Check the folder structure
    Flash is not able to get some file thats why the IO Error.
    trace the url path just before u load the file and u will be abel to find whether that file is in specified folder or not.
    http://www.darshanrane.com

  • Trying to create a photo gallery... with little knowledge of Flex

    Hey Guys,
    I am trying build a photo gallery and I am having the hardest time.
    Is there anything out there that helps people from scratch ?
    I need help learning where to store the images... IE... jpegs
    and the right syntax to call up the code...
    Path info etc...
    I tried to hack two of the following programs but in the case below the program could not find the files...
    I am looking for an easy way to get started any help would be great
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalScrollPolicy="off" horizontalScrollPolicy="off"   initialize="init()"  applicationComplete="startitup()" backgroundGradientColors="[0xffffff, 0x00808C]"  >
    <mx:HTTPService id="movieRequest" url="data/otrdata.xml" result="movieHandler(event)"/>
    <mx:Glow id="glowImage" duration="200"
            alphaFrom="1.0" alphaTo="0.5"
            blurXFrom="0.0" blurXTo="15.0"
            blurYFrom="0.0" blurYTo="15.0"
            color="0x00FF00"/>
        <mx:Glow id="unglowImage" duration="200"
            alphaFrom="0.3" alphaTo="1.0"
            blurXFrom="15.0" blurXTo="0.0"
            blurYFrom="15.0" blurYTo="0.0"
            color="0x0000FF"/>
    <mx:Fade
        id="fade"
        target="{myImage}"
        duration="400"
        alphaFrom="0"
        alphaTo="1"/>
    <mx:TextArea x="463" y="156" height="326" width="387" id="myText" fontSize="14" editable="false"/>
        <mx:Image x="23" y="157" width="432" height="325" id="myImage" scaleContent="true"   complete="fade.play()"/>
    <mx:Tile direction="horizontal" borderStyle="inset"
                horizontalGap="10" verticalGap="15"
                paddingLeft="10" paddingTop="10" paddingBottom="10" paddingRight="10" x="62" y="70" width="750" height="77">
                <mx:Repeater id="rp" dataProvider="{movieData}">
                    <mx:Image height="49" width="50" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" toolTip="{rp.currentItem.subtitle}" source="{rp.currentItem.icon}" click="mygothere(event.currentTarget.getRepeaterItem ())" />
                </mx:Repeater>   
                </mx:Tile>
                                        <mx:Label x="78" y="485" id="sourceTag0" width="333" textAlign="center" fontSize="14"/>
    <mx:Label x="23" y="24" id="sourceTag1" fontSize="18" fontWeight="bold" width="281"/>
    <mx:Image x="801" y="14" id="navimage1" source="@Embed(source='images/icons/Urbm.jpg')"  rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" width="43" height="32" click="myMainget('All'),myNumfind(0)"/>
    <mx:Label id="labelall" x="813" y="50" text="All" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" width="43" height="18" click="myMainget('All'),myNumfind(0)" />
    <mx:Image x="383" y="14" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage2" click="myMainget('Home'),myNumfind(0)"/>
    <mx:Label x="382" y="49" text="Home" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}" click="myMainget('Home'),myNumfind(0)"/>
    <mx:Image x="435" y="14" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" source="@Embed(source='images/icons/buildingjob.jpg')" width="45" height="32" id="navimage3"  click="myMainget('City Life and Rhetoric'), myNumfind(0)"/>
    <mx:Label x="430" y="49" text="Rhetoric" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}"  width="56" height="19"   click="myMainget('City Life and Rhetoric'), myNumfind(0)"/>
    <mx:Image x="491" y="14" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}" source="@Embed(source='images/icons/slums.jpg')" width="46" height="32" id="navimage4"  click="myMainget('3 Perspectives'), myNumfind(0)" />
    <mx:Label x="494" y="49" text="3 Pers" rollOverEffect="{glowImage}"  rollOutEffect="{unglowImage}"   mouseUpEffect="{unglowImage}"  width="46" height="19"   click="myMainget('3 Perspectives'), myNumfind(0)"/>
    <mx:Image x="550" y="14" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage5"/>
    <mx:Label x="547" y="49" text="History"/>
    <mx:Image x="602" y="14" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage6"/>
    <mx:Label x="601" y="49" text="Today"/>
    <mx:Image x="650" y="14" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage7"/>
    <mx:Label x="648" y="50" text="Future"/>
    <mx:Image x="700" y="14" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage8"/>
    <mx:Label x="693" y="50" text="Opinions"/>
    <mx:Image x="751" y="14" source="@Embed(source='images/icons/Buddy.jpg')" width="38" height="32" id="navimage9"/>
    <mx:Label x="746" y="50" text="Builders"/>
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    import flash.events.Event;
            import mx.events.DropdownEvent;
            public var mynewnum:String="Home";
             private function changeEvt(event:Event):void {
             mynewnum=event.currentTarget.selectedItem.label;
             trace(mynewnum);
                   filterByCategory2();
    public function startitup():void{
    myImage.source ="images/Buddy.jpg";
    myText.htmlText="<b>Over-the-Rhine</b> is not only at the center of the Cincinnati community, but it is also at the center of a lot of controversies. This area has become a breeding ground for social issues. Issues of equality, crime, affordible housing, poverty, violence, and economic growth have recently been argued. Although these topics are the current issues facing Over-the-Rhine, this is not the first time many of these issues have been see by Over-the-Rhine. It seems that history is repeating itself once again. So where does the community go from here? Are there any answers. The questions one must consider are simple. Will Over-the-Rhine be in the same position thirty years from now? Is the current Over-the-Rhine community being treated fairly by the city? Do the urbanist movement, the people's movement, and the CDC have the best interests of the community in mind? How can the city deal with these issues without causing a fight within the community? Can Over-the-Rhine become a community where everyone is happy?";
    sourceTag1.text = "Home";
    sourceTag0.text ="A Look into the Over-the-Rhine Community";
    public function myNumfind(num:Number):void{
    myImage.source =movieData[num].image;
    myText.htmlText=movieData[num].text;
    sourceTag1.text = movieData[num].title;
    sourceTag0.text =movieData[num].subtitle;
    public function mygothere(event:Object):void{
    myImage.source =event.image;
    myText.htmlText=event.text;
    sourceTag1.text = event.title;
    sourceTag0.text = event.subtitle;
    public function myMainget(myhere:String):void{
    mynewnum=myhere;
    filterByCategory2();
    public function filterByCategory2():void
    movieData.filterFunction = catFilter2;
    movieData.refresh();
    public function catFilter2(item:Object):Boolean
    if(mynewnum=="All"){
    return true;
    }else{
    return item.cat == mynewnum;
    [Bindable]
    private var movie:String;
    [Bindable]
        public var selectedItem:Object; 
    [Bindable]
    public var movieData:ArrayCollection;
    private function init():void
    movieRequest.send();
    private function movieHandler(event:ResultEvent):void
    movieData = event.result.otrdata.mydata;
    filterByCategory2();
    private function formatPositionToolTip(value:int):String{
    var result:String = (value % 60).toString();
            if (result.length == 1){
                result = Math.floor(value / 60).toString() + ":0" + result;
            } else {
                result = Math.floor(value / 60).toString() + ":" + result;
            return result;
    ]]>
    </mx:Script>
    <mx:Label x="316" y="39" text="Menu" fontSize="12" fontWeight="bold" fontStyle="italic" color="#000000"/>
    <mx:HRule x="364" y="49" width="480" strokeWidth="2" strokeColor="#000000"/>
    </mx:Application>

    I'd recommend linking your flex app to a PHP file, it'll automatically handle all the photos for you without you having to embed them all. Keeps the app size small and lets you add more pictures without having to alter any code. Here's the example code of a very simply image gallery that i'd build on if i was making a photogallery.
    Flex:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="getPictures.send()">
        <mx:HTTPService id="getPictures" url="getPictures.php" method="POST" showBusyCursor="true"/>
        <mx:TileList dataProvider="{getPictures.lastResult.Pictures}" width="500" height="500" x="349" y="129">
            <mx:itemRenderer>
                <mx:Component>
                    <mx:Image width="200" height="200" source="{data.imagePath}"/>
                </mx:Component>
            </mx:itemRenderer>
        </mx:TileList>
    </mx:Application>
    PHP:
    <?php
        foreach (glob("*.png") as $filename)
            print "<Pictures><imagePath>".$filename."</imagePath></Pictures>";
    ?>

  • Dynamic photo gallery in flex

    superb post for a Dynamic photo gallery using a xml generated flex application http://flexlearner.wordpress.com/2009/09/04/dynamic-photo-gallery-in-flex/

    try:
    txfe.text = xmlFile.section[int(m.currentTarget.details) -1].details;
    instead of
    txfe.text = xmlFile.image.[int(m.currentTarget.details) -1];
    and add your thumbs to gal, not the stage.  when you're done with the gallery, remove gal.

  • How to get a picture of iPhone Gallery with Flex 4.5?

    Hi,
    I would like know how can to get a picture of iPhone Galery and insert in a Component Image on Flex 4.5.
    Thanks

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
    initialize="init()">
    <fx:Script>
    <![CDATA[
    import flash.display.Loader;
    import flash.events.IOErrorEvent;
    import flash.events.MediaEvent;
    private var mediaCamera:CameraRoll;
    private var imageLoader:Loader;
    protected function openGalery(event:MouseEvent):void{
    if (mediaCamera != null){
    mediaCamera.browseForImage();
    protected function init():void{
    if (CameraRoll.supportsBrowseForImage){
    mediaCamera = new CameraRoll();
    mediaCamera.addEventListener( MediaEvent.SELECT, imageSelected );
    mediaCamera.addEventListener( Event.CANCEL, browseCanceled );
    mediaCamera.addEventListener( ErrorEvent.ERROR, browseErro );
    public function browseErro( event:ErrorEvent ):void
    lblMsg.text = lblMsg.text+" -  ERRO browse";
    public function browseCanceled( event:Event ):void
    lblMsg.text = lblMsg.text+" -  browse Cancel";
    public function imageSelected( event:MediaEvent ):void
    var imagePromise:MediaPromise = event.data as MediaPromise;
    imageLoader = new Loader();
    imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, imageLoaded );
    imageLoader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageLoadFailed );
    imageLoader.loadFilePromise( imagePromise );
    public function imageLoaded( event:Event ):void
    var bitmapData:BitmapData = Bitmap(event.target.content).bitmapData;
    var bitmap:Bitmap = new Bitmap(bitmapData);
             imgPhoto.source = bitmap;
    public function imageLoadFailed( event:Event ):void
    lblMsg.text = lblMsg.text+" -  ERRO Load ";
    ]]>
    </fx:Script>
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Button id="btnGalery" left="123" right="123" bottom="18" label="Galeria"
      click="openGalery(event)"/>
    <s:Image id="imgPhoto" left="13" right="7" top="6" bottom="107"/>
    <s:Label id="lblMsg" left="10" right="10" bottom="69" height="30"/>
    </s:View>

  • How do I apply programmatic skins for completely custom drawn components of a Flex library project?

    Hello folks,
    I am looking for best practices advice when (1) creating
    custom components and (2) styling and skinning.
    I already know how to skin a component part of the Flex
    framework. I can make a class extending ProgrammaticSkin and have
    my component skinned using CSS to link the component with the
    reference to my custom class.
    However what about those cases when you are completely
    creating a component from scratch?
    Imagine a "Freehand Drawing Canvas" component that allows the
    user to draw on it and has some buttons to set color styles, line
    styles, etc., or imagine a "Screen Flow Gallery" component that
    displays visual objects in a fashion similar to Cover Flow in the
    Mac.
    In many components I am aware you may reuse other components
    part of the Flex framework but I am trying to picture an scenario
    where you would need to draw everything yourself because there just
    isn't something to base it upon so you will end up drawing it from
    scratch.
    To learn how instead of building one of those components I
    mentioned previously I decided to start with something simple that
    would illustrate this like a LiteButton component that will behave
    just like the Flex mx.controls.Button but will extend UIComponent
    and be completely custom drawn.
    The component will have a default look and will also be
    style-able and skin-able. I will provide styles for users of the
    component to modify and regarding skinning anyone can create a
    custom ProgrammaticSkin adding its own drawing logic and link it to
    the component via CSS with the ClassReference applied to the skin
    selector.
    So far so good and it's clear what I want to achieve. I
    actually know how to do most of the stuff here but I have one
    single problem.
    Here is my question, where should I put my custom drawing
    logic? If I do it in the updateDisplayList inside the class
    extending UIComponent it works, however I thought that it would be
    a better practice to do it using programmatic skins, that way I
    could provide different skin themes for my component set.
    The problem is that I can't make the programmatic work in
    this scenario. I tried instantiating the custom programmatic skin
    during the updateDisplayList of the LiteButton component and adding
    it to my display object via addChild but that didn't do anything. I
    also tried creating a "default.css" stylesheet and tried to use
    ClassReference as I would normally do to skin an already existing
    component (or composite component as well) but that didn't do
    anything either.
    So how do I apply programmatic skins for completely custom
    drawn components of my Flex library project?
    I could do it inside the updateDisplayList of the LiteButton
    class extending UIComponent but again I would like to provide
    different theme sets for my components so it makes sense using
    programmatic skins.

    "jbucaran" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello folks,
    >
    > I am looking for best practices advice when (1) creating
    custom components
    > and
    > (2) styling and skinning.
    >
    > I already know how to skin a component part of the Flex
    framework. I can
    > make
    > a class extending ProgrammaticSkin and have my component
    skinned using CSS
    > to
    > link the component with the reference to my custom
    class.
    >
    > However what about those cases when you are completely
    creating a
    > component
    > from scratch?
    >
    > Imagine a "Freehand Drawing Canvas" component that
    allows the user to draw
    > on
    > it and has some buttons to set color styles, line
    styles, etc., or imagine
    > a
    > "Screen Flow Gallery" component that displays visual
    objects in a fashion
    > similar to Cover Flow in the Mac.
    >
    > In many components I am aware you may reuse other
    components part of the
    > Flex
    > framework but I am trying to picture an scenario where
    you would need to
    > draw
    > everything yourself because there just isn't something
    to base it upon so
    > you
    > will end up drawing it from scratch.
    This may help with that
    http://livedocs.adobe.com/flex/3/html/help.html?content=skinstyle_3.html
    > To learn how instead of building one of those components
    I mentioned
    > previously I decided to start with something simple that
    would illustrate
    > this
    > like a LiteButton component that will behave just like
    the Flex
    > mx.controls.Button but will extend UIComponent and be
    completely custom
    > drawn.
    >
    > The component will have a default look and will also be
    style-able and
    > skin-able. I will provide styles for users of the
    component to modify and
    > regarding skinning anyone can create a custom
    ProgrammaticSkin adding its
    > own
    > drawing logic and link it to the component via CSS with
    the ClassReference
    > applied to the skin selector.
    >
    > So far so good and it's clear what I want to achieve.
    Actually after
    > playing
    > with the weekend and today I know how to do most of the
    stuff but I have
    > one
    > single problem. So here is my question, where should I
    provide my custom
    > drawing logic? If I do it in the updateDisplayList
    inside the class
    > extending
    > UIComponent it works, however I thought that it would be
    a better practice
    > to
    > do it using programmatic skins, that way I could provide
    different skin
    > themes
    > for my component set.
    These aren't mutually exclusive. When you provide a skin with
    a
    TypeSelector, you have to add it to the display list
    somewhere, and this is
    typically done in updateDisplayList or addChildren. I prefer
    to do it in
    updateDisplayList, because you can then change it if the
    style changes.
    > The problem is that I can't make the programmatic work
    in this scenario. I
    > tried instantiating the custom programmatic skin during
    the
    > updateDisplayList
    > of the LiteButton component and adding it to my display
    object via
    > addChild but
    > that didn't do anything.
    Exactly what did you do?
    > I also tried creating a "default.css" stylesheet and
    > tried to use ClassReference as I would normally do to
    skin an already
    > existing
    > component (or composite component as well) but that
    didn't do anything
    > either.
    I've never had any problem using an approach similar to
    this...but I will
    say that I couldn't see any advantage in creating a
    default.css style sheet,
    since it's not really default in the way that the one that
    comes with Flex
    is. It's much more obvious to anyone using your component
    what's going on
    there if you create a style sheet where they're likely to
    spot it.
    > So how do I apply programmatic skins with the default
    look for custom
    > drawn
    > components?
    It seems like your approach is fine, but maybe you've made a
    mistake in your
    implementation.
    > I could do it inside the updateDisplayList of the
    LiteButton class
    > extending
    > UIComponent but again I would like to provide different
    theme sets for my
    > components so it makes sense using programmatic skins.
    You might want to consider also adding an instance of
    HaloBorder to your
    component. That brings a lot of functionality with it.
    HTH;
    Amy

  • Flex app doesn't work when moved from original location

    I'm trying to make an image gallery in flex. It works when I run it in Flex Builder perfectly fine. The html and swf files from the bin-debug folder work perfectly fine when opened in any browser also, but ONLY when those files and all related files are opened from the default location that the application was built in. When I export a build to a different folder, the swf loads but none of the information from the xml file displays. I tried setting all of the paths of the reference files (namely the xml) in the flex app to the exact absolute location on the server, and it still didn't work when I uploaded it to the server.
    I've tried several approaches starting from scratch and they have all come up with the same issue. I'm working with an educational license for Flex Builder, I'm not sure if they jip you on those and ruin the compiled swf.
    Please help! I'm losing my mind over this.I think it has to do with something else besides the code since it works fine when I hit "Run", but if anyone thinks it will help to post the code let me know.

    when you build an application using one of the wizards (like coldfusion flex application wizard) it hard codes
    paths to cold fusion CFC's, and sometimes gets it wrong.
    If your application references cfc's (or other remote objects) then it may be necessary to adjust the flex code
    when moving the code into a different base folder.
    For example in my own application, the url is http://localhost/crm_dev_flex and the built application gets put into
    c:\inetpub\wwwroot\crm_dev_flex\bin-debug
    References in the code to components found in c:\inetpub\wwwroot\crm_dev_flex\bin-debug\components\cfgenerated
    (in the flex code these looks like crm_dev_flex.bin-debug.components.cfgenerated.<mycomponent> )
    These need to change when you move the code to somewhere else.
    Also, if you are using wizard generated cfc's then these also contain similar references that need to be changed.
    IHTH.
    Cheers

  • Made a form in Flex 3, can't get it to load in Flash.

    Hi,
    sorry, I really am a novice at this.
    I am building a Flash site, and have some image galleries that run with a component. To load a gallery into the main page I have, for example, the following code: (this works just fine)
    stop();
    loadMovie ("../gallery_Engagements/content.swf","loader_engagements");
    However, I made a contact form in Flex 3, and I am trying to load in exactly the same way, using this code:
    stop();
    loadMovie ("../contact/ContactForm.swf","loaderContact_mc");
    Is there something different that I need to do to get the Flex swf to load into my page? Everything is set up in the same way, it just wont work with the Flex file. Any help would be appreciated.  :-)
    Thanks.
    Hugh

    Wow, a full week and no replies.  Am I doing something that is that far wrong?  :-)
    Anyone?
    Hugh

  • Flex Mobile Project UI Templates?

    I'd love to find some flex mobile templates to use in flash builder that already have the platform of many of the functional UI elements in them. I feel this would be a great springboard to learn more through examining pre-built projects as a means to get started with designing my own iPhone apps. Are there sites available where I can purchase such templates? What kind of file extensions am I looking for ui templates that would plug into flex mobile in flash builder? If they are free that is great too, though I don't mind paying for good quality app templates and would appreciate suggestions of sites/services that offer this.
    Thanks,
    Scott

    I did come across scalenine.com/gallery which seems to offer flex themes and skins. Are there other alternatives or similar sites that are available for this purpose of offering project templates to start with for flex mobile?

  • Embedding Fonts in a Flex application -- Legal issues?

    I am currently building a Flex application for a Client. The Style guide they have provided shows Univers 55, Univers 65, and Univers 45 as the main fonts for the site and the app.
    Page 1567 of Using Flex 4.5 states
    Note: 
     Check your font licenses before embedding any font files in your applications. Fonts might have licensing restrictions that preclude them from being stored as vector information.
    The fonts they are using in the AI file for the design document appear to be older version Adobe 1.0 TrueType fonts dated 30th June 1997.
    I can not find the original license for these fonts, but such licenses may pre-date embedding technology, so are we allowed to embed them?
    As an alternative could we safely use the OTF Univers LT Std family and are there any differences?
    Message was edited by: lingoguru

    As far as i see it, it's mainly just for convenience.
    Embedding an image into application removes the need for you to store it elsewhere on the server, as it becomes part of the .swf file.
    From personal experience it's very handy with small images, as it doesn't increase the size of the .swf file too much, and it means you don't have to keep track of them when distributing your release build.
    you don't have to embed anything, you can simply reference it by location instead, but you'll experience a slight delay as it's loaded into the application on request.
    The need for using this feature depends entirely on what you're trying to accomplish.
    If you're making something like a large image gallery, it'll completely remove the need for wait for pictures to load when  you're scrolling through them. However i wouldn't recommend it as you'll send your application size will go through the roof, and the waiting time for the whole application to load would be fairly extensive.
    If you have an application with like 40 small ~3kb images using for navigation icons or something, you might as well, it's just convenient and won't impact the loading time by too much.

  • Create a photo gallery

    I want to make a photo gallery for my website. I have all the photos uploaded to the site. I have their urls. What I want, is an application that will connect to an xml file on my website and find the urls in it, so that when I want to change photos I just adjust the xml document and don't have to reupload the application and so forth. A few questions, like, how. And how to make the xml document and how to write it in the right way. Thank you.

    Hi there these blog post shows you how to create a photo gallery in Flex using an xml file.
    http://blog.flexcommunity.net/?p=25
    http://blog.flexcommunity.net/lab/gallery2/bin-release/photoGallery.html
    I hope you find them useful.

  • Image gallery. How to click on image to advance to next image?

    Flex 4, flash builder 4.6.
    This gallery has a row of numbers. When you click on a number, a photo displays above. Each number represents a photo from data.xml. Works good. Now I want to click on a photo that is already displayed and cause the next photo in the series to display. How do I go about doing this? Thanks.
    <s:Application creationComplete="service.send()">
    <fx:Declarations>
            <s:HTTPService id="service" url="data.xml" result="serviceHandler(event)"></s:HTTPService>
    </fx:Declarations>
    <fx:Script>
            <![CDATA[
                   import mx.collections.ArrayCollection;
                   import mx.rpc.events.ResultEvent;
                   [Bindable]
                   private var images:ArrayCollection;
                   private function serviceHandler(event:ResultEvent):void{
                        images = event.result.gallery.image;
            ]]>
    </fx:Script>
    <s:Image source="assets/poster/{imagesList.selectedItem.pic}" />
    <s:List id="imagesList" dataProvider="{images}">
         <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:Label text="{data.number}"  fontSize="12" />
                    </s:ItemRenderer>
                </fx:Component>
          </s:itemRenderer>
    </s:List>
    </Application>
    data.xml
    <gallery>
        <image>
            <number>01</number>
            <pic>photo01.jpg</pic>
        </image>
        <image>
            <number>02</number>
            <pic>photo02.jpg</pic>
        </image>
    </gallery>

    Hi..
    i have a simaliar problem, can anyone help..
    Ive made a gallery using xml and the sparks list component. that displays images in a horz list which ofcourse can be clicked to see the larger image, but then ofcourse to view the to other images or the next image you have to hit the back button and then select another.
    How can i swipe on the large image for move to the next item  without having to go back to list.    Thanks.
    here is what ive got so far..
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            title="Page {id1}"
            destructionPolicy="never"
            actionBarVisible="true"
            viewActivate="init()">
        <fx:Script>
            <![CDATA[
                import valueObjects.Bookpage;
                [Bindable]private var id1:String;
                [Bindable]private var thumbimage:String;
                [Bindable]private var largeimage:String;
                private function init():void
                    pgImage.addEventListener(TransformGestureEvent.GESTURE_ZOOM, onZoom);
                    this.addEventListener( TransformGestureEvent.GESTURE_SWIPE, handleSwipe );
                    var thisbpage:Bookpage = data as Bookpage;
                    id1 = thisbpage.id;
                    largeimage = thisbpage.largeimage;
                private function onZoom(event:TransformGestureEvent):void
                    var mySprite:Sprite = pgImage as Sprite;
                    if(mySprite.scaleY.valueOf() >= 1)
                        mySprite.scaleX *= event.scaleX;
                        mySprite.scaleY *= event.scaleY;
                    else
                        mySprite.scaleX = 1;
                        mySprite.scaleY = 1;
                private function handleSwipe(event:TransformGestureEvent):void
                    // Swipe was to the right
                    if (event.offsetX == 1 ) {
                        // push the PreviousView without any data using default
                      some help here. pls ..swipe to prev image if any
                        // Swipe was to the left
                    else if (event.offsetX == -1 ) {
                        // push the NextView withour any data using
                        some help here. pls ..swipe to next in list
                    // Swipe was to the down
                    if (event.offsetY == 1 ) {
                        // push the PreviousView without any data using default
                        // ViewTransition
                        this.actionBarVisible = true;
                        // Swipe was to the up
                    else if (event.offsetY == -1 ) {
                        // push the NextView withour any data using
                        this.actionBarVisible = false;
            ]]>
        </fx:Script>   
        <fx:Declarations>
            <s:SlideViewTransition id="slideUp" duration="300" direction="up" transitionControlsWithContent="false"/>
        </fx:Declarations>
        <s:states>
            <s:State name="portraitPhone" stateGroups="phone,portrait"/>
            <s:State name="landscapePhone" stateGroups="landscape,phone"/>    
        </s:states>   
        <s:actionContent>
            <s:HGroup>
            <s:Button icon="assets/qsearch.png" click="navigator.popView(slideUp)"/>
            <s:Button icon="assets/prev.png"/>
            <s:Button icon="assets/next.png"/>
            </s:HGroup>
        </s:actionContent>
        <s:Scroller x="0" y="0" width="100%" height="100%" >
            <s:HGroup>
                <s:Image id="pgImage" left="0" top="11" source="assets/gallery/{largeimage}"  />
            </s:HGroup>
        </s:Scroller>
    </s:View>

  • How to use a Flash/Flex GUI for DW Extensions

    I am creating a DW extension for an image and flash gallery.
    The extension will be accessible from the Insert menu. Once
    clicked, it would present me with a Flash/Flex form to
    search/browse for images/swf by file name or tags. Once I select an
    image/swf and clicked OK, it would insert into my webpage the
    absolute URL associated with the image/swf. The problem is I am not
    aware of how to create an extension with a Flash/Flex GUI.
    Any suggestions would be greatly appreciated.
    Thanks,
    srtr4k

    You should check out the Flash panels and Dialogs section of
    the Dreamweaver API reference. Here is a link.
    http://help.adobe.com/en_US/Dreamweaver/10.0_API_Ref/WS4FB61645-9C4E-4667-B6D4-0E5F553BEF4 F.html
    This gives you direct access to Flash panels and dialogs from
    the Dreamweaver Javascript API. Adobe is working on a document for
    how to create CSXS based Flash Extensions. CSXS based extensions
    only work as a floating panel that surface themselves in the
    Windows, Extensions menu.
    -Scott Richards
    Dreamweaver Team

Maybe you are looking for