Draggable images and replacing positions

i have 6 images, draggable ones that replace the position of the new image you drag it to.
actionscript:
on (press) {
          dragsound.start();
          startDrag("_root.facebook");
          this.swapDepths(1000);                               //bring icon to the front
          facebookposOLDy = getProperty(_root.facebook, _y);   //gets position of original facebook icon
          facebookposOLDx = getProperty(_root.facebook, _x);
          ebayposy = getProperty(_root.ebay, _y);
          ebayposx = getProperty(_root.ebay, _x);
          googleplusposy = getProperty(_root.googleplus, _y);
          googleplusposx = getProperty(_root.googleplus, _x);
          twitterposy = getProperty(_root.twitter, _y);
          twitterposx = getProperty(_root.twitter, _x);
          googleposy = getProperty(_root.google, _y);
          googleposx = getProperty(_root.google, _x);
          youtubeposy = getProperty(_root.youtube, _y);
          youtubeposx = getProperty(_root.youtube, _x);
on (release) {
          dropsound.start();
          stopDrag();
          if (_root.facebook._droptarget == "/ebay") {
                    _root.facebook._x = ebayposx;
                    _root.facebook._y = ebayposy;
                    _root.ebay._x = facebookposOLDx;
                    _root.ebay._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/googleplus") {
                    _root.facebook._x = googleplusposx;
                    _root.facebook._y = googleplusposy;
                    _root.googleplus._x = facebookposOLDx;
                    _root.googleplus._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/twitter") {
                    _root.facebook._x = twitterposx;
                    _root.facebook._y = twitterposy;
                    _root.twitter._x = facebookposOLDx;
                    _root.twitter._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/google") {
                    _root.facebook._x = googleposx;
                    _root.facebook._y = googleposy;
                    _root.google._x = facebookposOLDx;
                    _root.google._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/youtube") {
                    _root.facebook._x = youtubeposx;
                    _root.facebook._y = youtubeposy;
                    _root.youtube._x = facebookposOLDx;
                    _root.youtube._y = facebookposOLDy;
          } else {
                    _root.facebook._x = facebookposOLDx;
                    _root.facebook._y = facebookposOLDy;
i know theres probably a shorter way to go about doing it, but can somebody tell me why it works when i grab the first image and can replace any other...but when i grab a 2nd image after moving the first..i can replace any other image except the one that has been moved before.

facebook.as :
on (press) {
          dragsound.start();
          startDrag("_root.facebook");
          this.swapDepths(1000);                               //bring icon to the front
          facebookposOLDy = getProperty(_root.facebook, _y);   //gets position of original icon
          facebookposOLDx = getProperty(_root.facebook, _x);
          ebayposy = getProperty(_root.ebay, _y);
          ebayposx = getProperty(_root.ebay, _x);
          googleplusposy = getProperty(_root.googleplus, _y);
          googleplusposx = getProperty(_root.googleplus, _x);
          twitterposy = getProperty(_root.twitter, _y);
          twitterposx = getProperty(_root.twitter, _x);
          googleposy = getProperty(_root.google, _y);
          googleposx = getProperty(_root.google, _x);
          youtubeposy = getProperty(_root.youtube, _y);
          youtubeposx = getProperty(_root.youtube, _x);
on (release) {
          dropsound.start();
          stopDrag();
          if (_root.facebook._droptarget == "/ebay") {
                    _root.facebook._x = ebayposx;
                    _root.facebook._y = ebayposy;
                    _root.ebay._x = facebookposOLDx;
                    _root.ebay._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/googleplus") {
                    _root.facebook._x = googleplusposx;
                    _root.facebook._y = googleplusposy;
                    _root.googleplus._x = facebookposOLDx;
                    _root.googleplus._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/twitter") {
                    _root.facebook._x = facebookposx;
                    _root.facebook._y = facebookposy;
                    _root.twitter._x = facebookposOLDx;
                    _root.twitter._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/google") {
                    _root.facebook._x = googleposx;
                    _root.facebook._y = googleposy;
                    _root.google._x = facebookposOLDx;
                    _root.google._y = facebookposOLDy;
          } else if (_root.facebook._droptarget == "/youtube") {
                    _root.facebook._x = youtubeposx;
                    _root.facebook._y = youtubeposy;
                    _root.youtube._x = facebookposOLDx;
                    _root.youtube._y = facebookposOLDy;
          } else {
                    _root.facebook._x = facebookposOLDx;
                    _root.facebook._y = facebookposOLDy;
twitter.as :
on (press) {
          dragsound.start();
          startDrag("_root.twitter");
          this.swapDepths(1000);                               //bring icon to the front
          twitterposOLDy = getProperty(_root.twitter, _y);   //gets position of original icon
          twitterposOLDx = getProperty(_root.twitter, _x);
          ebayposy = getProperty(_root.ebay, _y);
          ebayposx = getProperty(_root.ebay, _x);
          googleplusposy = getProperty(_root.googleplus, _y);
          googleplusposx = getProperty(_root.googleplus, _x);
          facebookposy = getProperty(_root.facebook, _y);
          facebookposx = getProperty(_root.facebook, _x);
          googleposy = getProperty(_root.google, _y);
          googleposx = getProperty(_root.google, _x);
          youtubeposy = getProperty(_root.youtube, _y);
          youtubeposx = getProperty(_root.youtube, _x);
on (release) {
          dropsound.start();
          stopDrag();
          if (_root.twitter._droptarget == "/ebay") {
                    _root.twitter._x = ebayposx;
                    _root.twitter._y = ebayposy;
                    _root.ebay._x = twitterposOLDx;
                    _root.ebay._y = twitterposOLDy;
          } else if (_root.twitter._droptarget == "/googleplus") {
                    _root.twitter._x = googleplusposx;
                    _root.twitter._y = googleplusposy;
                    _root.googleplus._x = twitterposOLDx;
                    _root.googleplus._y = twitterposOLDy;
          } else if (_root.twitter._droptarget == "/facebook") {
                    _root.twitter._x = facebookposx;
                    _root.twitter._y = facebookposy;
                    _root.facebook._x = twitterposOLDx;
                    _root.facebook._y = twitterposOLDy;
          } else if (_root.twitter._droptarget == "/google") {
                    _root.twitter._x = googleposx;
                    _root.twitter._y = googleposy;
                    _root.google._x = twitterposOLDx;
                    _root.google._y = twitterposOLDy;
          } else if (_root.twitter._droptarget == "/youtube") {
                    _root.twitter._x = youtubeposx;
                    _root.twitter._y = youtubeposy;
                    _root.youtube._x = twitterposOLDx;
                    _root.youtube._y = twitterposOLDy;
          } else {
                    _root.twitter._x = twitterposOLDx;
                    _root.twitter._y = twitterposOLDy;
maybe its something small im not noticing? remembering the position or something, i have no idea

Similar Messages

  • Repeating images and replacing images in a slideshow

    does anyone happen to know if I can select a set of images and basically copy them so that they are duplicated within a slideshow? I have a rotation of an object and I would like the slideshow to show it rotating twice whereas right now it only rotates once. Is there a way to copy the 60 images and paste them within the slideshow (even though they will have similar names) so that I can put them at the end of the first 60? I have a front cover image and a end image so I can't just loop it.
    Is it preferable for me to import the images into Aperture again by copying them into the slideshow?
    Also, is it possible to alternatively /write-over/ images in the slideshow? RIght now I have some images at the front that I would like to redo and I am wondering if I can redo them outside of Aperture and simply copy them into the slideshow and have the old ones written over or if it necessary to delete the old ones and import the new ones...
    thanks for any help with this.
    - Jon

    Hi Gibbah,
    You'd have to place the line with:
    var imageLoader:Loader;
    within the loop.
    Now the same loader is told 5 times to load an image and to
    report when done. Each time overwriting the previous commands.
    With the variable declared inside the loop a new loader is
    created each time.
    In the eventhandler you'd have to point to:
    Loader( e.target.loader ) instead of 'imageLoader'
    apart from that i will aways trace 5 since it is declared
    outside any function and thus reports the last value it was
    assigned. This also means all images will end up at the same
    position.
    hth,
    Manno

  • I want resize the image and set position after retrieving from oracle datab

    How can I display image on web page after retrieving it from oracle database. Display is not problem but resize that image and position is very dificult .Please send me Guideline about blob object todisplay and resize it in web pages

    I tried to do the suggetion made by you but I was not able to solve the issue. I think I am close to it and with your help I should be able to resolve it. Let me explain you the brief about this issue.
    1. Another group uses Oracle Apex to load the images in to the database.
    2. I am fetching this data fron Oracle and displays in to Webpage using PHP.
    This is so far I tried. Please bear with me if I am doing anything wrong.
    1.I created program.php which calls the <IMG> as suggested by you.Snippet of the code is
    <div><img src="/oracle/image_story.php" alt="Image Stories" width="900" height="500" /></div>
    2. In the image_story.php, I used the following code.
    <?php
    $query = "SELECT *
              FROM IMAGE_STORY WHERE image_id = 50";
    if ($result = run_oracle($query, 'select')) { // Run the query.
         $num_results = count($result);
         if ($num_results > 0) {
         foreach($result as $row){
              $img = $row['DOCUMT']->load();
              header("Content-type: image/pjpeg");
              echo $img;
              //echo '<div><img src="'.$img.'" alt="Image Stories" width="900" height="500" /></div>';
    ?>
    When I run the program.php,Image is not displayed and it is showing as "X". To troubleshoot the issue,I run the image_story.php and echo $img is giving me the weird character like,
    "ÿØÿàJFIFddÿìDuckyPÿîAdobedÀÿÛ„          
    I used PL/SQL developer as a client to access the BLOB field from the database and in the HTML view, it is giving me the same output.
    Select * from image_story a where a.image_id = 50
    I am not sure the issue is with the MIME-TYPE,ENCODING or I am missing something here. I tried lot of Content-Type.
    Please guide me.

  • How to onclick an image to get the image and change position?

    Hello,
    I'm trying to write a small card game for school project and I need help on this one thing. I woud like the user click on a card (image) get the image name and value and then change position by moving it up a little (a way of saying the user selected the card). Any idea?

    Lookup the UINavigationItem class. I think you'll need to replace the titleView with your own custom view that includes text and image. You can access this from the UIViewController: self.navigationItem.titleView.
    HTH,
    - Ryan

  • How to cut out part of an image and replace with another?

    ok, i'm a newbie to image editing, and i want to cut out a persons face in a picture and put in another face on the picture. i'm sure this is pretty simple, i just have no idea where to start. can someone point me in the right direction? thanks!

    Aperture is not a pixel editor, which is what you need. Photoshop is the app used for this, but it's cost is several times that of AP! As suggested in the second post, look into Photoshop Elements, a slimmed-down and much cheaper version of Photoshop. [I don't use Elements, so if someone knows that it can't do area copies from one pic to another, please join the conversation!]
    And get a good book on Photoshop or Elements, there's a huge learning curve involved. I'd suggest going to a book shop, pulling a few such books off the shelf and check their index for editing techniques. Sometimes you'll find one book that gives you the exact step-by-step instructions for doing what you want. Then there'll be others that don't get into the topic or do a poor job.

  • Missing images and not able to use copy and paste anymore - just blank rect

    Hello!
    I've a problem that really scares me.
    I use severall png and pdf images. But at one point keynote looses the media and just displays these grey rectangles instead of some images. I tried to figure out if it just happens with pdf images and replaced the missing pdf images through png24 images with transparency. It first worked fine (they showed up) and then it tells images can not be saved. If I open the presentation again, the images are missing. And it seems that the more images and slides i put in the presentation, the more images are missing…
    But there is more: I even can't copy and paste these images anymore. If I try to copy one of the images I just have replaced (because they have been lost by saving), it just pastes the blank grey rectangle instead of the image.
    This really is a problem because I now have to repetitive tasks (like same animation for the same image in the same size) over and over again. And when I save the doc – they are al gone again…
    It really scares me and I don't have an idea how to solve this.
    It also happens, if I repleace an pdf image with an png image and than try to copy this new png image. However I am able to drag the image from the Finder again.
    I am working on a PB G4, 1.5 GHz, 1 GB RAM.
    My Keynote Version is 3.0.2.
    The Keynote Dokument is saved and opened from a G4 X-Serve wich is only used by Macs (so no Windows Filesystem anywhere). I still have anough space on both, my local and the server volume. I don't transfer the Keynote document. So it should not be a problem with the names on the files… And the files are just exported from Adobe Illustrator (png 24 files with "save for web" and the pdf files are saved as Illustrator pdf) – so they should really be fine and not corrupted…
    At this time the Keynote document has a size of 179 MB (because of a video) and only 16 slides. And the theme was built from scratch – so no import from Powerpoint or so…
    I looked through the Keynote preferences and found a thing like (sorry self-translated from german version to english) "scale placed images to slide-size". I wondered if keynote saves a copy of the sacaled image after that and corrupts the image itself? But I don't think so.
    I've had these problems with earlier versions of Keynote, but it occured just sporadically and I could solve it through pasting it again. But this time I can not solfe it anymore.
    Does anybody encounter same problem? Or has a hint?
    I really would appreciate, because I have to finish the presentation very soon and are not able to work properly with that. Furthermore, I am scared of saving and opinging the presentation again, because the lost files can not be replaced…

    I now have a hint:
    As a colleague said, he encountered some problems with usagerights on our fileserver (XServe). He said he wasn't able to read files he put on the server himself again…
    If this is true, the same could have happened to Keynote for placed images, as Keynote writes these images as separate files in the doc package…
    I will try to work on my local volume and see if it solfes the problem.
    But sooner or later I will have to place the whole thing on the server again…
    Do you think this is the reason?

  • Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe acco

    Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe account.

    Can you please show a screenshot of what exactly you want to replace where?

  • I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace the OS9 on my G4 tower with the created iBook ghost image. How do you do this?

    I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace OS9 on a G4 tower with the Ghost image. How do you do this? Will my applications still work?
    The iBook is running Pather, i have tons of programs i use on it, project files, etc... and my G4 Mac tower is more powerful, faster, and more reliable than the iBook. I basiclly just want to take the entire OS, programs and files... create an image, and drop the image on the G4 Tower so it basically will function just like the iBook. Like a mirror image of everything that is on the iBook.  I know that you can create image files in the Disk Utility on Panther, but will that back up the entire OS with settings, programs, files and all?  ive never done anything like this before, so i wanted to post this up to see if i would get an answer. In the meantime, im reading "Mac OS X, Help Desk Essentials By Owen Linzmayer" to see if i can find the steps to do this.
    Any help would be greatly apprciated. Much thanks!

    Can't be done as an exact copy from one Mac to the other.  The operating systems are system specific. First make sure your system doesn't need a firmware update to get 10.2 or later on it. You'll need to install 9 on it if it does, direct from a 9 retail CD that is compatible with it *.  This disc can't say Upgrade, Dropin, or OEM. To determine compatibility, identify your G4 tower:
    http://support.apple.com/kb/HT3082
    http://docs.info.apple.com/article.html?artnum=42739
    Then look at the OS 9 compatibility:
    http://docs.info.apple.com/article.html?artnum=25517
    Then apply the correct update
    http://docs.info.apple.com/article.html?artnum=86117
    The last Mac OS 9 to come retail is 9.2.1, and that's newer than 9.0.4, 9.0.2, and 9.1.
    Your ghost image can be done using cloning software, but then you'll have to use a retail 10.3 installer and 10.3.9 combo update on the G4 tower.  Then use the Migration Assistant to import the data from the clone of the iBook. The 10.3 retail disc looks like * and does not say upgrade, dropin, or OEM.  The 10.3.9 combo update is here:
    http://www.apple.com/support/downloads/macosxcombinedupdate1039.html
    The clone to an external hard drive can be done with these instructions*:
    http://www.macmaps.com/backup.html The import of the external hard drive with the migration assistant can be done with these instructions:
    http://docs.info.apple.com/article.html?artnum=25773

  • Issue in Customizing the Logon Page and Replacing the Logon Panel Image

    I have facing problem in Customizing the Logon Page and Replacing the Logon Panel Image in Hyperion Workspace 11.1.2.1. I have tried multiple time.
    First Replacing the Logon Panel Image. I have following the steps given in admin guide of EPM workspace on page 25 and they are as follow
    To replace the image that is displayed on the logon panel:
    1 Create an image file named logon_panel.gif with dimensions that match previous image.
    2 Rename the installed version of logon_panel.gif to logon_panel.gif.original in
    %EPM_ORACLE_HOME% /common/epmstatic/bpmui/themes/<do for each
    theme>/images_global. Move the logon_panel.gif file that you created in step 1 to this
    directory.
    3 Clear your browser cache.
    Note: You do not need to restart the Hyperion Foundation Services - Manager Server.
    But still I am getting the same default image on log in page.
    The other problem I am facing is Customizing the Logon Page.
    I am following the steps given in admin guide of EPM workspace on page 17 and they are as follow:
    To customize the logon page:
    1 Follow instructions in the topic Extract a file in the Workspace Web Application.
    2 Backup file <temp directory>/war/WEB-INF/lib/bpmui.jar.
    3 Extract the contents of <temp directory>/war/WEB-INF/lib/bpmui.jar to <temp
    directory>/bpmui_jar/.. (*)
    4 Backup file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    5 Edit file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    6 Search for the property bpm.logonCopyright.
    Customizing the Logon Page 17
    7 Modify the text to the right of the equal sign. Use \n to get a new line.
    8 Save your changes.
    9 Repeat step step 1 through step step 8 for all the other Resources_xx.properties files for other
    locales.
    10 Jar the contents of <temp directory>/bpmui_jar/ to <temp directory>/war/WEBINF/
    lib/bpmui.jar.
    11 Continue with the topic, Re-package a file inside the Workspace Web Application.
    For the first part I am following
    Extract a file in the Workspace Web Application
    ä To extract files in Workspace Web Application:
    1 Stop the service for Hyperion Foundation Services - Managed Server.
    2 Backup file <EPM_ORACLE_HOME>/products/Foundation/workspace/
    InstallableApps/workspace.ear.
    16 Administration Tools and Tasks
    3 Using an unarchiving utility, extract the contents of <EPM_ORACLE_HOME>/products/
    Foundation/workspace/InstallableApps/workspace.ear into a <temp
    directory>.
    4 Create <temp directory>/war.
    5 Extract the contents of <temp directory>/workspace.war into <temp directory>/
    war.
    6 Update the file you are patching under <temp directory>/war. as direct in it.
    But I am not able to find file bpmui.jar in step 3 of above one (*). I have marked for your connivance.
    I am able to see these file in that directory
    dynamichelp.jar
    workspace.jar.
    Can anyone provide help on this. Platform I am using is LINUX

    You seem to have posted this in the wrong forum. This forum is for Oracle Enterprise Manager - not Hyperion.

  • Images in portrait and landscape positioning

    In portrait mode all my images are situated perfectly with text before the image and then text after the image. In one section I only have 4 images.
    When I switch to landscape mode the images are situated in different positions - not radically different but different  enough so that the text does not 'fit' with the flow of the image-supported narrative.
    When I move the image one overlays on top of another :-/
    Or hides behind a page if I move along to the required position.
    I have deleted and re-added, moved text, created different sections so that only one image per section occurs (though this is stupidly inefficient!!) but a mess!
    How do I add images within text so that both in portrait and landscape they (the images) are positioned correctly?
    Thank you.

    Mine are currently working when set to "Inline (moves with text)" and each takes a little adjustment. This is not satisfactory for me either.  - Fabe

  • Overlap 2 Images and Make Their Positions Relative?

    I need to essentially make a hotspot on an image that is another image.
    I know how to make hotspots. I know how to overlap images. But I need the overlapping image's position to be relative to the image beneath it.
    How can I do this?
    I have tried searching for Overlapping Images (answer: CSS)
    I have also tried searching for Mapping Images to Images (no luck, just brings up info on mapping images, period)
    I'm not sure what to search for to get this answer. That is why I am posting.
    I am using Dreamweaver CS3. I am a total n00b but if you point me in the right direction I can figure out the rest with research.
    Thank you in advance for your time.
    PS- Please don't say, "Why not just merge the 2 images with an Imaging Program?" I need to do this with hundreds of images, AND I need the images available separately on my site. This would create hundreds of additional images that I need to upload.

    Ignore this. I lost over half my post somehow. I'll try again. -.-
    <!Session data><input id="jsProxy" type="hidden"/></p><div id="refHTML"> </div><p></p><p><input id="gwProxy" type="hidden"/><!--Session data==></!--Session><input id="jsProxy" onclick="jsCall();" type="hidden"/></p>
    <div id="refHTML"></div>
    <p>This gives me a hotspot on an image. The hotspot's location is relative to the image behind it due to the image map.</p>
    <p> </p>
    <p>And here:</p>
    <p> </p>
    <div ispre=true?? __default_attr="plain" __jive_macro_name="code">
    <p>&lt;style type="text/css"&gt;<br/>&lt;!==<br/>.overlap {<br/> position: absolute;<br/> top: 100px;<br/> left: 50px;<br/>}<br/>==&gt;<br/>&lt;/style&gt;<br/>&lt;/head&gt;<br/><br/>&lt;body&gt;<br/>&lt ;div align="center"&gt;&lt;img src="background.png" width="770" height="600" /&gt;&lt;img src="image.png" width="100" height="100" class="overlap" /&gt;<br/>&lt;/div&gt;</p>
    </div>
    <p> </p>
    <p>This allows me to overlap images.</p>
    <p>I need a little of both of these concepts.</p>
    <p> </p>
    <p>I need image.png's position to be relative to background.png's position. That way image.png overlaps background.png in exactly the same place regardless of my user's resolution or browser window size. My page is centered. If my page was left-aligned this would not be an issue.</p>
    <p> </p>
    <p>I have been digging through CSS tutorials, and I'm certain the answer is there, but I am not getting it.</p>
    </body>
    ></p><p><input id="gwProxy" type="hidden"/><!Session data-->

  • When I use Preview,Photo Mechanic and Pages, all JPEG or RAW images appear corrupted. I thought my hard drive was failing and replaced it and migrated everything over but the problem still exists. Any idea what is going on?

    When I use Preview,Photo Mechanic and Pages, all JPEG or RAW images appear corrupted.
    I thought my hard drive was failing and replaced it and migrated everything over but the problem still exists.
    It felt as if maybe a virus was at work but I ran Sophos and found nothing.
    I store images on my Drobo Raid system but when I work from my Macbook Pro I have no issues, just on the tower.
    Any idea what is going on?

    First of all, why did you say yes to Nero Back up before researching what it does with files already on the HDD? When I install Nero, the Back Up is the first thing I disable, it is a nagging pain, there are much better backup programs available. There are several file recovery programs out there to recover deleted files, that is, if that is what happened. Also, if you haven't overwritten the files, so you should be able to find them.

  • Find text and replace with image - Help needed

    Hi,<br /><br />We need to place the images as inline in the appropriate places.<br /><br />texttexttext<<test1.eps>>texttexttexttexttexttext<<test2.eps>>texttexttexttexttexttext< <test3.eps>>texttexttexttexttexttext<<test4.eps>>texttexttexttexttexttext<<test5.eps>>text texttext<br /><br />This code is helpful for placing a single image at a time, we are unable to place all the images in one shot, can anyone help me out.<br /><br />I am not a programmer.<br /><br />-----------<br />var myDoc = app.activeDocument; <br />app.findPreferences = app.changePreferences = null; <br />var math=document.search("test.eps"); <br />for (i=math.length-1; i >=0; i--)<br />{ myDir = Folder.selectDialog(); <br />AllGraphics = Folder(myDir).getFiles('test.eps') <br />for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />     myDoc.place(AllGraphics[i],false); } }<br />-----------<br /><br />Note: I have taken this code from forum and we have made some changes on this.<br /><br />Kavya

    Jongware,<br /><br />I try running it but gives errors:<br /><br />Error Number: 55<br />Error String: Object does not support the property or method 'changePreferences'<br />Line: 24<br />Source: app.findPreferences = app.changePreferences = null;<br /><br />This is the code I used<br /><br />// Find text and replace with image for InDesign CS3 <br />// http://www.adobeforums.com/webx?128@@.3bbf275d.59b6f012<br />var heyItsAnArray = new Array ( <br /><br />   "it contains this line!", <br /><br />   "as well as this one", <br /><br />   "or even more!", <br /><br />   "test.eps" ); <br /><br />for (arrayCount=0; arrayCount<heyItsAnArray.length; arrayCount++) <br /><br />{ <br /><br />   replaceImg (heyItsAnArray[arrayCount]); <br /><br /> } <br /><br />function replaceImg (name) <br /><br />{ var myDoc = app.activeDocument;  <br />     app.findPreferences = app.changePreferences = null;  <br />     var math=document.search(name); <br />     for (i=math.length-1; i >=0; i--)  <br />     { myDir = Folder.selectDialog();  <br />          AllGraphics = Folder(myDir).getFiles(name)  <br />          for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />               myDoc.place(AllGraphics[i],false); <br /><br />               } <br /><br />          } <br /><br />     }<br /><br />Michael

  • Search .docx and replace text with image

    I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using the image names as placeholders, opening the document
    and searching for the image name, replacing it by inserting the image, and doing so for each image in the directory.
    $file is the name of the image in the directory and it loops through them okay.
    foreach($file in Get-ChildItem $savepath -Filter *.jpg)
            # search word doc and replace selected text with image ($file)    
    Also inserting the image seems simple enough from a TechNet article I found, but I've got no idea how to open the Word document and do a search and replace. I found a few articles related to the subject but I couldn't get them to work when I tried to adapt
    them.
    Any help is appreciated. Thanks in advance.

    This 'might' be possible, but I'm having a hard time finding good references to the com object capabilities for inserting an image into a word document.  Creating new, converting format, that sort of thing is straightforward.
    I'd do a search on "powershell word comobject" and variations of insert image update edit, etc.  Or maybe someone else with more experience/knowledge has a magic bullet for you.  Once you get some info on doing it with powershell, expand
    your search by omitting the powershell keyword, there's gotta be some solid documentation for the comobject somwhere, but it will probably be a bit complex.
    You can also:
    $word = new-object -comobject word.application
    $doc = $word.documents.add("<path to word document>"
    and get-member to your heart's content, but finding references and/or documentation might be easier.  
    Good luck!
    Edit:  This could help, but really doesn't give much insight into placement of the image, only helps getting the image into the doc:  http://gallery.technet.microsoft.com/office/44ffc6c8-131f-42f1-b24b-ff92230b2e0a
    If you do find something useful, post it here, I'm sure others could benefit!
    SubEdit:  Should have thought of this already...
    http://msdn.microsoft.com/en-us/library/ff837519(v=office.14).aspx

  • Images gone replaced by a large 'x' and a question mark

    Have been working on my iBook and, after clicking a now forgotten dialogue box, all the images have disappeared, replaced with a large X where the image was and a tiny question mark inside. No 'undo' or 'revert to' seems to help return to what was there just a moment ago.
    Is there a simple fix to this?
    Is there a way of going into the root of iBooksAuthor to reconnect the images?

    This is a perenial problem, and a search of the  discussions will bring up many different solutions.
    Try reducing the size of any image or text box and  bringing each in turn to the  front ( Arrange>Move to Front)
    At the moment everything is still on the  page, so do not delete  anything. Also  did you add a full screen background  image and not lock it.
    Read some posts and try each solution found.

Maybe you are looking for