Best Practice - load external image including rollovers

I am attempting to use the loader component to load an
external jpg, but experience issues having my flash app
successfully load a roll-over image from an external source when
the user rolls over the intital jpg. I am not a flash developer
(actually a .net developer trying to help a graphics guy out).
I started with the loader component, converted it to a movie
clip and then utilized the on(rollover) and on(rollout) events to
change the loader component's contentPath property at runtime via
ActionScript. I am not getting consistent results with this
strategy - what is the best way to accomplish this? Also note I
tried converted to a button, which seemed more logical, but the
loader component doesn't seem to like being converted to a button.
Regards,
Daflookie

Daflookie,
> I started with the loader component, converted it to a
movie
> clip and then utilized the on(rollover) and on(rollout)
events
> to change the loader component's contentPath property at
> runtime via ActionScript. I am not getting consistent
results
Check out the Loader class in the Components Language
Reference. Loader
extends MovieClip, so there's no need to convert to a movie
clip symbol. In
addition, I recommend scrapping on() in favor of MovieClip
events, which
will probably be closer to your .NET point of view that the
older
on/onClipEvent approach to event handling (those are Flash
5-era).
Honestly, though, if you simply want to load images, I would
forego the
Loader component (no need for all that overhead) and use
MovieClipLoader to
load your images into the user's Internet cache. You'll see a
good handful
of events under that class listing as well (see the
ActionScript 2.0
Language Reference).
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Load external images and video in edge

    Hi.
    I am looking into edge instead of flash.
    My question is how do you load external images and videos from an external server?
    To clarify, I need to insert a link from where the images can load into the stage, so they don´t take up any of the final weight.
    Thanks in advance.
    Best,
    Stig.

    The above solution I provided works if you already have the images in your composition and than if you want form load images from another server rather than the relative location to your html file.
    Now if you want to load images dynamically into a rectagle containter you will have to code it.
    below is a sample for that
    Create a 'rectangle' with name 'Rectagle'.
    Add the snippet in the compositon ready or on other user actiosn based on your requirement
    var myImagetag = '<img src="http://wwwimages.adobe.com/include/style/default/SiteHeader/logo-2x.png">'
    sym.$("Rectangle").append(myImagetag);

  • Load external images

    Im wanting to make a photo gallery that I can update easy, I
    thought if I could have a movieclip load external images for my
    thumbnails it would be nice but Im not sure how to set it up. I
    would make a file for my images and then another for my thumbnails,
    then if or when I want to switch out pictures I'd just have to drop
    new images into my folders and not even touch the FLA. Could anyone
    point me in the right direction with the right action script to use
    or a tutorial that explains how this is done..
    And when I say load external I want it so I dont have to
    click on the image for it to load, I want it to just load
    automatically , I would put an invisible button or something to
    that efect over the images for a animated effect.
    Thanks for your help.

    I don't know if you are super enthusiastic about building it,
    or if you just want the utility. If the later is the case, I just
    purchased (cheap) a really great product that does all of what you
    want, fairly automatically, including scaling large pictures down
    to smaller size so that they load quickly.
    I am not sure of the policy of recommending third-party
    applicatons here. So, if you are interested, send an email (private
    message) to me and I will show you the simple site I put together
    using it and where to get it.

  • Loading External Images Causes Memory Leak

    I have been working on an Actionscript 2.0 project that basically loads external images.
    Everytime i load and unload a new image, memory increases to 1 or 2 MBs
    If all the images are in cache, then it increased to 4 or 8 KBs
    In the unloading of images, I have removed loader and the container of the image.
    Any thoughts why it is behaving like that?
    Please find the sample code snippet below.
    btn_load.onRelease = function()
    loadImage();
    btn_unLoad.onRelease = function()
    unLoadImage();
    var mcListener:Object = new Object();
    var container1:MovieClip;
    var mcLoader:MovieClipLoader;
    var loader_reference = this;
    var n=0;
    function loadImage(){
    var image_arr = ["http://xyz.com/image1.png","http://xyz.com/image2.png","http://xyz.com/image3.png","http:/ /xyz.com/image4.png","http://xyz.com/image5.png"];
    var image_url = image_arr[n];
    if(n==image_arr.length-1) {
      n=0;
    }else{ 
      n++;
    container1 = loader_reference.createEmptyMovieClip("container1", loader_reference.getNextHighestDepth());
    mcLoader = new MovieClipLoader();
    mcLoader.removeListener(mcListener);
    mcLoader.addListener(mcListener);
    mcListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void {
    mcListener.onLoadInit = function(target_mc:MovieClip):Void {
      target_mc._x = 300;
      target_mc._y = 200;
      target_mc._width = 300;
      target_mc._height = 250;
    mcLoader.loadClip(image_url, container1);
    function unLoadImage(){
      mcLoader.unloadClip(container1);
      mcLoader = null;
      container1 = null;
      removeMovieClip(loader_reference.container1);
    Thanks in advance.

    that code should only execute once.  fix that.

  • Best practice?-store images outside the WAR file?

    I have an EAR project with several thousand images that are constantly changing. I do not want to store the images in the WAR project since it will take an extremely long time to redeploy with every image change. What is the best practice for storing images? Is it proper to put them in the WAR and re-deploy? Or is there a better solution?

    Perryier wrote:
    Can you expand on this? Where do they get deployed and in what format? How do I point to them on a jsp?
    I am using Sun Application server 9.0, and I don't really think this has a "stand alone" web server. How will this impact it?You could install any web server you want (Apache?). The request comes in and if the request matches something like .jpg or .gif or whatever, you serve up the file. If you have a request for a jsp or what not, you forward the request to the app server (Sun App Server in your case). i.e. your web server acts as a content-aware proxy.

  • What are the Best Practices for Optimizing Images in InDesign Files

    Is there a best practice for using images InDesign to optimize the document before converting to a PDF? Specifically, what I'm asking is, will the PDF file compress better if the images are cropped prior to placing them in Indesign? I'd like to know the answer for both creating PDF files for printing using images that are 300dpi and for creating PDF files for online delivery using images that are 72dpi. I have an employee that insists images need to be cropped to actual dimensions before placing in the InDesign document. I've never done it that way and believe that her recommended process is way too time consuming and leaves you with no leeway to tweak your page design since the images are tightly cropped.

    As for absolute cropping, I agree with your stance. Until the layout is fixed, preserving your ability to easily manipulate photo size and positioning is key.
    Some clever image management methods have been described in the discussion forums, and one that appealed most to me was the use of duplicate linked image folders. Having a high-res (CMYK) folder and a low-res (RGB) folder to switch between for different output enables you to use both to your advantage. Use the low-res images for layout, for internal proofing, and for EPUB/online PDF/HTML output. Then it's simply a quick switch to the high-res image folder for print purposes. You can easily prepare the alternate collection of images with a Photoshop batch convert script or with the Photoshop Image Processor. Save your presets!

  • Making a loaded external image into a button in Actionscript

    My name is Steve Oatman I am a student at
    AIO for a Web Design Diploma
    class: Interactive Telecommunications IMD412 XA
    Professors to bussy!
    I have a flash web site that I am putting together. I am using AS to load some images from an external source. These images are being loaded into a movieclip. These images need to become buttons once they are loaded. The images will link to the particular menu category pages beef, chicken, etc.
    The images are loading fine they just are not responding like a button or link.
    I am getting two error referencing the buttonMode and usehandCursor. Below is just one image that I am working on till I get it to work.
    I am getting these two Compiler error code:
    1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:Loader.
    1119: Access of possibly undefined property useHandCursor through a reference with static type flash.display:Loader.
    This is what I have.
    var myLoader01:Loader = new Loader();
    myLoader01.load(new URLRequest("entrees_images/beef/beef01.gif"));
    addChild(myLoader01);
    myLoader01.x = -269;
    myLoader01.y = -164;
    myLoader01.buttonMode = true;
    myLoader01.useHandCursor = true;
    myLoader01.addEventListener(MouseEvent.CLICK, beefClick);
    function beefClick(event:MouseEvent):void{
    gotoAndStop("beef");
    From me searching online I thought the
    name.buttonMode = true;
    turned the element into a button!
    I have included the fla file. This is in the menuItems_mc which is located in the pageContent_mc frame 40 layer page Image or of course the library.
    I know this is a little in depth sorry and any help would be greatly appreciated.
    Steve
    713/742-3325

    Try something along the following lines:
    var myLoader01:Loader = new Loader();
    function addIt(evt:Event):void{
       var aBtn:MovieClip = new MovieClip();
       aBtn.x = -269;
       aBtn.y = -164;
       aBtn.buttonMode = true;
       addChild(aBtn);
       aBtn.addChild(myLoader01);
       aBtn.addEventListener(MouseEvent.CLICK, beefClick);
    myLoader01.contentLoaderInfo.addEventListener(Event.COMPLETE, addIt);
    myLoader01.load(new URLRequest("entrees_images/beef/beef01.gif"));
    function beefClick(event:MouseEvent):void{
       gotoAndStop("beef");

  • AS3 Load external image and add multiple instances to mcs

    Hi,
    Is there any way to load an external image and add it to more than one movie clip?
    Thanks,
    Chris McLaughlin

    Hi kglad,
    I was loading a larger jpeg to which I was applying 20 different masks so using the bitmapdata class to create duplicates was the best solution.
    It took me some time to wrap my head around it, but all is well.
    Thanks for pointing me in the right direction.
    Best regards,
    Chris

  • Load external image and animate?

    This may be a naive question, but -
    What is the best method to draw external content (an image
    file) into a Flash movie, AND then ANIMATE that content?
    I assumed I would need to use the LOADER COMPONENT to draw an
    image file from an external URL, but is there a way to then perform
    a simple animation (e.g., slide the image across the stage) with
    the loaded image? I cannot seem to figure out how to manipulate an
    image once loaded (using the LOADER COMPONENT).
    Yes, I am new to Flash, so there may be six other ways to do
    this of which I am not aware.
    Suggestions/solutions?

    use the MovieClipLoader class to load the image into a holder
    movie clip, then use the onLoadInit function to animate the holder
    clip.

  • SCOM 2012 Agent - Best Practices with Base Images

    I've read through the
    SCOM 2012 agent installation methods technet article, as well as how to
    install the SCOM 2012 agent via command line, but don't see any best practices in regards to how to include the SCOM 2012 agent in a base workstation image. My understanding is that the SCOM agent's unique identifier is created at the time of client installation,
    is this correct? I need to ensure that this is a supported configuration before I can recommend it. 
    If it is supported, and it does work the way I think it does, I'm trying to find out a way to strip out the unique information so that a new client GUID will be created after the machine is sysprepped, similar to how the SCCM client should be stripped of
    unique data when preparing a base image. 
    Has anyone successfully included a SCOM 2012 (or 2007 for that matter) agent in their base image?
    Thanks, 
    Joe

    Hi
    It is fine to build the agent into a base image but you then need to have a way to assign the agent to a management group. SCOM does this via AD Integration:
    http://technet.microsoft.com/en-us/library/cc950514.aspx
    http://blogs.msdn.com/b/steverac/archive/2008/03/20/opsmgr-ad-integration-how-it-works.aspx
    http://blogs.technet.com/b/jonathanalmquist/archive/2010/06/14/ad-integration-considerations.aspx
    http://thoughtsonopsmgr.blogspot.co.uk/2010/07/active-directory-ad-integration-when-to.html
    http://technet.microsoft.com/en-us/library/hh212922.aspx
    http://blogs.technet.com/b/momteam/archive/2008/01/02/understanding-how-active-directory-integration-feature-works-in-opsmgr-2007.aspx
    You have to be careful in environments with multiple forests if no trust exists.
    http://blogs.technet.com/b/smsandmom/archive/2008/05/21/opsmgr-2007-how-to-enable-ad-integration-for-an-untrusted-domain.aspx
    http://rburri.wordpress.com/2008/12/03/untrusted-ad-integration-suppress-misleading-runas-alerts/
    You might also want to consider group policy or SCCM as methods for installing agents.
    Cheers
    Graham
    Regards Graham New System Center 2012 Blog! -
    http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at
    http://systemcentersolutions.wordpress.com/

  • Pre-loading external images for XML-based gallery

    I'm working-on an XML-based photo gallery here:
    http://www.unionandparkwood.com/demo/flash_gallery/
    It works how I want it, except that the first time a
    thumbnail is clicked for an image, it pauses long enough to skip
    the fade. If you click-through the images a second time, you'll see
    that it works smoothly. My guess is that the first time the
    thumbnail is clicked, the image isn't cached, yet.
    I tried to fix this by creating a JavaScript file for the
    page to pre-load each image and thumbnail:
    0003a = new Image;
    0003a.src = "images/Down-Range.jpg";
    0003b = new Image;
    0003b.src = "thumbnails/Down-Range.jpg";
    But that didn't work. What would be the best way to do this?
    I included a link to "Download ZIP" of the FLA project on
    this page, too, because it wouldn't be easy for me to describe
    what's happening. In a nutshell, a thumbnail click launches a
    function that loads the appropriate image into the main image
    holder. What seems to be happening the first time is the image
    isn't loaded before the fade is finished, so the image just appears
    after a short pause the first time.

    >>What seems to be happening the first time is the
    image isn't loaded before
    >>the fade is finished, so the image just appears after
    a short pause the
    >>first time.
    As has been said many times in thos forum - use the
    MovieClipLoader class to
    load images, and then use that class' onLoadInit method to do
    things with
    the loaded image. Loading is asynchronous - you _have_ to
    wait until the
    image is done loading before doing a fade.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • What's 'best-practice' with external hard drives?

    Hello folks,
    I just got myself a 500GB LaCie d2 'Quadra' hard drive, and it works great - just as I was led to expect. Now I've connected it to my iMac with a FW400 cable. I've a few questions regarding general usage and 'best practice' when using an external hard drive like this:
    1. Do I need to disconnect it (pull out the cable from my iMac) every time I Shutdown - and reconnect on Startup? Or can I leave it it and pretty much just forget about it?
    2. Can I turn it 'on' and 'off' any number of times (using the on/off switch on the back) when working on the iMac? I might like to switch it off if I'm not using it for an extended period of time while still working on the computer. Is this okay?
    3. When I'm not using the drive and the drive switch is 'off', can the drive still remain connected to 'mains' power? Or is it necessary to disconnect it from the 'mains' entirely?
    4. I understand it's best to disconnect when 'Repairing Permissions?' Can this be confirmed?
    Thanks so much.
    Cheers!
    Steve.

    1. Do I need to disconnect it (pull out the cable from my iMac) every time I Shutdown - and reconnect on Startup? Or can I leave it it and pretty much just forget about it?
    What I do is shut down my Mac, leaving it connected to the mains: the external HD, external speakers and other peripherals are all connected to a mains switch and I turn these off. There's no need to disconnect the cable: some disks spin down when the computer is shut down, some don't. It probably wouldn't hurt to leave it spinning anyway, though I prefer to shut it off at the mains. Incidentally I shouldn't disconnect the computer from the mains when you shut down: doing this will run down the PRAM battery and hasten the day it needs replacing, which is expensive.
    2. Can I turn it 'on' and 'off' any number of times (using the on/off switch on the back) when working on the iMac? I might like to switch it off if I'm not using it for an extended period of time while still working on the computer. Is this okay?
    I shouldn't do this: the most strain on a hard disk is when it is starting up, not when it is running: I should leave it running all the time the Mac is on. If you do switch it off, make sure to unmount it first (drag it to the trash) otherwise you will have all sorts of problems.
    3. When I'm not using the drive and the drive switch is 'off', can the drive still remain connected to 'mains' power? Or is it necessary to disconnect it from the 'mains' entirely?
    No: I see no problem in leaving it plugged in to the mains: the 'off' switch disconnects it anyway.
    4. I understand it's best to disconnect when 'Repairing Permissions?' Can this be confirmed?
    I've never heard this, and I can't see that there's any neccesity: the repairing process will be confined to the disk you have nominated to work on in any case.

  • Best Practice for External Libraries Shared Libraries and Web Dynrpo

    Two blogs have been written on sharing libraries with Web Dynpro DC, but I would
    like to know the best practice for doing this.
    External libraries seem to work great at compile time, but when deploying there is often an error related to the external library not being a deployed component. 
    Is there a workaround for this besides creating a shared J2EE library which I have been able to get working?  I am not interested in something that works, but really
    what are the best practice for this. What is the best way to  limit the number of jars that need to be kept in a shared library/ext library.  When is sharing ref service/etc a valid approach vs. hunting down the jars in the portal libraries etc and storing in an external library.

    Security is mainly about mitigation rather than 100% secure, "We have unknown unknowns". The component needs to talk to SQL Server. You could continue to use http to talk to SQL Server, perhaps even get SOAP Transactions working but personally
    I'd have more worries about using such a 'less trodden' path since that is exactly the areas where more security problems are discovered. I don't know about your specific design issues so there might be even more ways to mitigate the risk but in general you're
    using a DMZ as a decent way to mitigate risk. I would recommend asking your security team what they'd deem acceptable.
    http://pauliom.wordpress.com

  • Best practice for external but secure access to internal data?

    We need external customers/vendors/partners to access some of our company data (view/add/edit).  It’s not so easy as to segment out those databases/tables/records from other existing (and put separate database(s) in the DMZ where our server is).  Our
    current solution is to have a 1433 hole from web server into our database server.  The user credentials are not in any sort of web.config but rather compiled in our DLLs, and that SQL login has read/write access to a very limited number of databases.
    Our security group says this is still not secure, but how else are we to do it?  Even if a web service, there still has to be a hole in somewhere.  Any standard best practice for this?
    Thanks.

    Security is mainly about mitigation rather than 100% secure, "We have unknown unknowns". The component needs to talk to SQL Server. You could continue to use http to talk to SQL Server, perhaps even get SOAP Transactions working but personally
    I'd have more worries about using such a 'less trodden' path since that is exactly the areas where more security problems are discovered. I don't know about your specific design issues so there might be even more ways to mitigate the risk but in general you're
    using a DMZ as a decent way to mitigate risk. I would recommend asking your security team what they'd deem acceptable.
    http://pauliom.wordpress.com

  • Loading external Images in MovieClips

    Dear All,
    I am trying to load the external images in Dynamically
    created Movie Clips.
    Can you please help me out from this.
    I am trying something like this:
    Container_mc.image_mc ( I want to load the Images inside the
    imag_mc clip)
    Regards,
    Sridhar B
    Container_mc.image_mc
    imag_mc

    Hi,
    Following is my problem:
    I am trying to trace the "idValue" property on runtime but it
    is showing error. Can you please tellme how add Images and
    properties runtime.
    var loader:Loader = new Loader()
    addChild(loader)
    loader.load(new URLRequest("images/01.png"))
    // Assigning a value to idValue property
    mc_mainSWF.idValue = 40
    mc_mainSWF.addChild(loader)
    mc_mainSWF.addEventListener(MouseEvent.CLICK, checkID)
    function checkID(event:MouseEvent)
    // And i am geeting error here
    trace(event.target.idValue)
    Regards,
    Sridhar B

Maybe you are looking for

  • Get an E-Mail-Notification if there is a alert for a SAP-System in DSWP

    Hello, how can i get an E-Mail-Notification when there is a alert in a SAP-System? I know that alerts are shown in the transaction dswp under System Monitoring but exists a alternative to get these alerts via E-Mail? In the transaction rz21 autoreact

  • Error occurred in the data uploading from Flat File in BPC NW

    Hi, I am doing Migration project from BPC MS to NW. In this i am loading data from flat file to BPC NW. One error occured in this process that is Record Duplication. Total 17000 records in that  7000 recards rejected by the reason of duplication. The

  • Delimiter/Marker inside ddl

    Hi I am using DBMS_METADATA to dump the ddl of database objects into a variables using JDBC. I need to seperate each block so that there is a delimiter/marker after every column, constraint, indexe etc inside ddl. Looking for some sugesstions on how

  • Dashboard Prompt Issue

    hi all, I have taken four coulmns as prompts. Prompt coulmn names : Region, Start date, End Date, Meeting name. All the four columns are from the same table My Scenario: if the user selects the prompt 1[region], and then the prompt 2[start date] and

  • Simple java-mapping

    can i have a file2file scenario which uses simple java-mapping. As i m new to Java, jus wanna learn how it happens. I wanna know how to code the Java mapping .....and how to utilize it in the Interface Mapping..... I know a bit of DOM parsing..