Embedding same images across multiple components, best practices?

Hi Guys,
Once again a great forum.
I have a fairly large dashboard application, built from many
components, from an obvious maintenance point of view this is
preferred.
To keep the look and feel the same across each component I
reuse a lot of the icons, this icons have 3 states, disabled,
normal and hot(rollover)
The mouse roll over and roll out are the same for each set of
icons. At the moment I have each component embed each icon and
repeat the functions.
This is not the optimum way to do this so I'm looking on best
practices. Should I build a separate action script package with all
the embedded images and roll over/out functions. Then import that
in to each component. But then I will embedded ALL the images in
each component. Should I embed all the images in the main container
app, then when flex sees the same image in a compoent will it not
embedded again or will it embed the images again..
In the example below 4 of the components have the same
refresh icon and roll/over states. So this code is repeated (bad
practice) in all 4. Moving to separate action-script package will
make maintenance easier, but as stated above will just one copy get
embedded for the entire app, or will 4 copies get embedded ?
[Embed(source="images/refresh_24.png")]
[Bindable]
private var refreshIcon:Class;
[Embed(source="images/refresh_24_hot.png")]
[Bindable]
private var refreshIconHot:Class;
[Embed(source="images/refresh_24_dis.png")]
[Bindable]
private var refreshIconDis:Class;
private function rollOverRefresh(event:Event):void {
if (event.target.source != refreshIconDis )
{event.target.source = refreshIconHot;}
private function rollOutRefresh(event:Event):void {
If (event.target.source != refreshIconDis )
{event.target.source = refreshIcon;}
}

Flex is able to collate those Embeds so they are only
included once IIRC.
While it may seem like bad practice to include it in each
component, it really isn't, from a code reusability standpoint. But
you could probably continue on that path and create a custom
component <mycontrols:RefreshButton> that has the the embeds
in one place for you.
You could probably also do something similar with style very
easily:
.MyButton {
overSkin="@Embed(source='../assets/orb_over_skin.gif')"
upSkin="@Embed(source='../assets/orb_up_skin.gif')"
downSkin="@Embed(source='../assets/orb_down_skin.gif')"/>
Then apply that style to your button.
You could also put the button into a single SWF file in Flash
and include it that way to reduce the number of embeds. I never
include PNG, JPG, GIF, etc files directly, always SWF as you get
better compression that way IMO. Plus I just find it gives me
greater flexibility...if I want to animate my skins in the future
(button that gleams for instance), I already have SWF's in my code
so no need to change anything out but the SWF.

Similar Messages

  • SOA 11g  Composite Deployment across multiple Instances: Best Practice

    Hi,
    We have a requirement where we need to deploy the composite acrocss mutilple instances(DEV,TEST,Production) without JDEV.
    We are using SOA11.1.3.3(cluster) and linux OS.
    Pls suggest me what is the best practice to deploy the SOA composite.
    Thanks,
    AB

    Why there are different ways to deploy the composite in different environment? Depending upon the environment, it's business importance increases and hence access to developers get more restricted and hence there are many ways for deploying. If you are developing an application, you would not like to export a SAR and then login to EM console to deploy it. For a developer it is always very convenient to use IDE itself for deployment and hence JDev is preferably used for Dev instances for deployment.
    Once development finishes, developer will check in the artifacts into version control system and if you want to deploy to a test instance then you have to check out the stable version, compile it and package it and then only you can deploy. Hence for test instances, ANT is the preferable mode for deployment. (Remember that developers may not be able to connect to Test environment directly and hence deployment from JDev is not possible)
    Once a configuration gets tested in Test env, it's SAR should be checked in into version control system, so that it would not be required to recompile and repackaging of it. This will also make sure that any artifact which is not tested on Test instance, must not go to higher instances (like UAT/PROD). Now in Pre-Prod/UAT/Prod, you may simply access the EM console and deploy the SAR which is already tested in Test instance. Remember that there will be very limited access to such critical environments and hence using Role based access of EM it would be very easy to deploy the resources. Moreover, it is more secure mode of deployment because only those users which have appropriate priviledge, will be able to deploy, and it would also be easier to track the changes.
    What is the proc and cons if we use only one way to deploy the composite across the Instances...As such there is no major pros and cons. You may use EM for all environments but it may be a little discomfort for developers/deployers of test environment. You may also use ANT for all the environments but it is not suggested until and unless you have a very good and secure process in place for deployments.
    Regards,
    Anuj

  • Need to select and move images across multiple pages...

    Hi,
    I am using Indesign CS2 on a Windows machine and have a 25 page document with 4-up photos (4"X6") on individual pages. I used the ImageCatalog javascript to load these images so I don't seem to have any control from the Master page. I would like to group and move these images to a different location on their own pages.
    Do you know how to select these images across multiple pages? Or can a simple script be written to process this task?
    Thanks in advance for your help.
    -Greg

    Hi Greg,
    A script can certainly do what you want to do--but you have to be a bit more specific. Do you want to move them to different pages in some predefined way, or do you just want to adjust them a bit on the pages they're already on?
    Thanks,
    Ole

  • How do you Spread an Image across multiple pages and print?

    I'm trying to create a large poster to be put on a bulletin board. I've mangaed to spread the image across multiple pages but I can't figure how to be able to print the pages have the edges line up successfully after cropping. I've been playing with the bleed settings but can't figure it out. Here a shot of what im working with:
    Im working in CS3 on Mac OS X

    Create your InDesign document at your final size and when you print it out put a check mark in the box for Tile

  • Same Region across Multiple Pages

    Hi There!
    Working on a requirement where I need same region across multiple pages.
    One way (Hard way) to do it is , repeat the region in all the pages.
    Is there any other way (smart way) so that I can write region once and reference it in other pages ? ? ?
    Thanks
    Krishna

    Yes, you can design this form on Page 0. Then this form will apply to every page.

  • Operating system image build and management best practices?

    how do we create gold images for servers/desktops,
    Best practices image management,
    How do we control changes?
    How do we prevent unauthorized changes (installation of software)?
    What tools we can use for above.

    I use MDT 2013 Lite Touch to create my images
    http://www.gerryhampsoncm.blogspot.ie/2014/03/create-customised-reference-image-with.html
    You should use in-built ConfigMgr Role Based Access Control to manage images afterwards (look at the Operating System Deployment Manager role).
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • Same image, loaded multiple times: speeding up load time?

    I wrote this message before thinking about embedding the
    image... I was thinking that putting a relative path automatically
    embedded the image, but in retrospect I was wrong, and that will
    probably solve my problem. I'll just leave the question here anyway
    though:
    I'm using image components in my application loaded from a
    relative path. The problem is, I have many copies (30+) of the same
    image, essentially 30+ identical image components which need to be
    loaded/unloaded at different intervals, and they are not loading
    fast enough for me. Would it be more effective to duplicate an
    existing "master" Image to improve load time instead of explicitly
    setting "image.source=" each time? Is there any better solution for
    improving image load speed?
    Best of all would be some way to pre-cache or buffer images,
    so that I can be guaranteed that they will load as quickly as
    possible when I bind them to an Image component.
    Cheers!

    JPGS are much better for photos.  PNGs are good when you need transparency.
    Instead of Image Swapping, why don't you use a photo gallery?
    FancyBox is nice..  It supports real text captions/descriptions, too.
    http://fancybox.net/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Imaging solution for EBS: Best practice guide for server setup

    Hi,
    We have to implement Imaging solution for EBS using AXF adapter. For this, customer is going to procure and implement SOA and WebCenter Content from scratch.
    We are now faced with the challenge whether to recommend SOA and WCC on the same Weblogic server or on separate Weblogic servers. Is there any best practice guide available for setting up Application Adapters for WCC?
    Thanks
    Arijit

    Hi ,
    I think this documentation would atleast help you in starting with planning :http://docs.oracle.com/cd/E23943_01/doc.1111/e15483/toc.htm
    Thanks,
    Srinath

  • Printing Multiple Copies of Same Image on Multiple Pages

    I have Photoshop Elements 11 on a Windows 8 platform.  I can NOT get it to print multiple copies of the same file on multiple pages.  I need one file printed on one page multiple times.  I have tried the CTRL-ALT-SHIFT and nothing changes.  It still just prints one and is done.
    I use this for label printing, so I need it to print more than one copy at a time.  It also is not saving the settings, so everytime I hit print, I have to readjust the print requirements.  This just is not going to work when you need to print a few hundred copies at a time.

    You can create your own picture package, if none of the options in the PSE print window>Type of Print work for you. Just make a blank file, copy/paste your image and alt drag it to make multiple copies. You can use the move tool to position things as you want them.
    Generally speaking, though, for something like label printing, it's simplest to use PSE to create the image, then use your word processing/desktop publishing program to print the actual labels.

  • How Do I put in the same image for multiple songs on iTunes

    Hi,
    I know if I click on the song on "info", I am able to change the album image. Is there a way for me to select multiple songs and do a bulk change with the same image?
    Thanks.

    Yes.
    Select multiple songs, get info and paste the artwork.
    Or select multiple songs and drag the artwork to the artwork window at the lower left of iTunes.

  • Responsive projects autosizing for multiple devices -- best practices?

    While it's a nice idea to have the three different breakpoints on width that allow you to make some major layout changes, I'm having trouble making this work well across multiple devices.  With the high resolutions of current mobile devices, this model just doesn't seem to work well.  For example, the iPad 2 in landscape mode select the desktop layout, which isn't bad, but in portrait mode gets the tablet layout, which by default is set up to be landscape.  I changed the heights for both breakpoints to better fit the iPad, but then the iPhone in landscape gets the tablet layout, requiring a lot of scrolling.
    Given the wide range of resolutions on mobile devices, it's not at all clear how this a simplistic mechanism like this could ever work.  For one thing, it sure seems like you need to provide for both portrait and landscape layouts on tablets and phones, with Captivate using both width and height to select the best one.  Also, is there any way to tell it to fill the screen without scrolling? How about automatically leaving the area clear where there's a status bar (or telling it to hide the status bar)?
    I could just create a separate version of the project for each device, but then lose much of the value of creating a Responsive Project in the first place.  Have those of you with more experience found good ways to deal with these variables, or is the best option to just create separate versions of the project?

    While it's a nice idea to have the three different breakpoints on width that allow you to make some major layout changes, I'm having trouble making this work well across multiple devices.  With the high resolutions of current mobile devices, this model just doesn't seem to work well.  For example, the iPad 2 in landscape mode select the desktop layout, which isn't bad, but in portrait mode gets the tablet layout, which by default is set up to be landscape.  I changed the heights for both breakpoints to better fit the iPad, but then the iPhone in landscape gets the tablet layout, requiring a lot of scrolling.
    Given the wide range of resolutions on mobile devices, it's not at all clear how this a simplistic mechanism like this could ever work.  For one thing, it sure seems like you need to provide for both portrait and landscape layouts on tablets and phones, with Captivate using both width and height to select the best one.  Also, is there any way to tell it to fill the screen without scrolling? How about automatically leaving the area clear where there's a status bar (or telling it to hide the status bar)?
    I could just create a separate version of the project for each device, but then lose much of the value of creating a Responsive Project in the first place.  Have those of you with more experience found good ways to deal with these variables, or is the best option to just create separate versions of the project?

  • Setting Disks/Caches/Vault for multiple projects - Best Practices

    Please confirm a couple assumptions for me:
    1. Because Scratch Disk, Cache and Autosave preferences are all contained in System Settings, I cannot choose different settings for different projects at the same time (i.e. I have to change the settings upon launch of a new project, if I desire a change).
    2. It is good practice to set the Video/Render Disks to an external drive, and keep the Cache and Autosave Vault set to the primary drive (e.g. user:Documents:FCP Documents). It is also best practice to save the Project File to your primary drive.
    And a question: I see that the Autosave Vault distinguishes between projects, and the Waveform Cache Files distinguishes between clips. But what happens in the Thumbnail Cache Files folder when you have more than one project targeting that folder? Does it lump it into the same file? Overwrite it? Is that something about which I should be concerned?
    Thanks!

    maxwell wrote:
    Please confirm a couple assumptions for me:
    1. Because Scratch Disk, Cache and Autosave preferences are all contained in System Settings, I cannot choose different settings for different projects at the same time (i.e. I have to change the settings upon launch of a new project, if I desire a change).
    Yes
    2. It is good practice to set the Video/Render Disks to an external drive, and keep the Cache and Autosave Vault set to the primary drive (e.g. user:Documents:FCP Documents).
    Yes
    It is also best practice to save the Project File to your primary drive.
    I don't. And I don't think it matters. But you should back that file up to some other drive (like Time Machine).
    And a question: I see that the Autosave Vault distinguishes between projects, and the Waveform Cache Files distinguishes between clips. But what happens in the Thumbnail Cache Files folder when you have more than one project targeting that folder? Does it lump it into the same file? Overwrite it? Is that something about which I should be concerned?
    I wouldn't worry about it.
    o| TOnyTOny |o

  • PRINT ENLAGED IMAGE ACROSS MULTIPLE PAGES

    I have a scanned image that I want to print at 4 times its original size across multiple pages. Is there any known way to do this?  

    Thanks for the info, guys.
    I don't have InDesign installed. I'll consider installing it, but it's sad that we have to install an entire app to get functionality for Adobe graphics programs that even browsers offer routinely. Jeez, Firefox spans pages automatically.
    If you have a graphic larger than the page and you don't opt to resize it, Photoshop should offer to clip the overflow or print multiple pages. And ideally, to print multiple pages with an optional overlap.
    I would have thought this was in version 1. But then again, Photoshop didn't have a thumbnail browser until what, version 7?

  • Integrating Multiple systems - best practice

    Hi,
    I need to integrate the following scenario let me know the best practice with steps.
    Scenario is end to end syncrhonous
    A system(supports open tech i.e webservice client) => SAP PI<=>Oracle(call stored procedure) => Update in ECC=> Reponse back to A system (source)
    Thanks
    My3

    Hi Mythree,
    First get the request from the web service to pi and then map to stored procedure using synchronous send step (Sync Send1) in bpm and get the response back. Once when you get the response back from oracle then use another synchronus send step. Here take the response from the database and map to ecc (use either a proxy or rfc) which is Sync Send2 in the bpm and get the udpdates back. Once when you get the response back send back the response to source system. The steps in BPM would be like this:
    Start --> Receive --> Sync Send1 --> Sync Send2 --> Send --> Stop
    These blogs might be useful for this integration:
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    Regards,
    ---Satish

  • How to collate same pages across multiple PDF files

    I have multiple reports in PDF that have specific employee data on each page. The employee page order is the same across each PDF (Employee #75 is on page 43 in each file). I would like to combine the first page from each file together, the second, and so on. That way I can provide this data to each employee without them having access to other employee's data. Is there a way to do this in Acrobat Pro?

    Hello try67,
    thank you for your help. I try it in the SDK forum. Anyway I appreciate any hint to solve this task :-)

Maybe you are looking for

  • FLEX mobile project SDK?

    I've built my air/android apps using "Flex Mobile projects" in Flash Builder 4.5. I really need to test front camera support in an app im about to release. Will there be a Flex version of the Beta SDK so I can test this in my flex mobile projects? is

  • Wont play music content

    my apple tv won't play the music shown it seams to be hung but i can see all the photos.the play button on the remote just wont start the songs but i can navigate through all the menus

  • Pricing error in the billing document

    Hi, in intercompany billing, in sales order the order the condition type is PI02. but there is no net value in the billing order. Plz, what's missing? could you please explain step by step what i have to do? Thanks

  • VPN CHAP authentication is extremely slow

    When a client connects to VPN server, its connection usually time-outs. Investigating the logs show that CHAP authentication takes almost 2 minutes to complete. No wonder that the clients time-out. Does anybody have any idea why this happens? The log

  • Application Crashing

    I just recently had a new logic board and trackpad installed in my newly purchased Macbook Air (late 2009) version. The service center for some reason has installed Snow Leopard 10.6.3 on my system which has rendered the original discs useless. Ever