Newbie at Illustrator scripting needs help assigning image

I am trying to copy a graphic stored in a vb.net picturebox.image into an activeLayer of an illustrator document. Can anyone supply me with code as to how to do it. Also is there a way to lookup a swatch by name and not have to rely on knowing it's index as in this line of code : pathRef.StrokeColor = docRef.Swatches(3).Color. I know the swatch's name is "CutContour" I would like to assign it by name. And lastly does anybody know any good books, links, etc.. that show you how to do this kind of stuff.
Thanks,
Bruce
Imports IDAutomation.Windows.Forms.LinearBarCode
Imports Illustrator
Public Class FormMain
    Dim barcode As IDAutomation.Windows.Forms.LinearBarCode.Barcode = New Barcode()
    Dim illustrator As Illustrator.Application = CreateObject("Illustrator.Application")
    Dim filePath As String = My.Application.Info.DirectoryPath
    Private Sub FormMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        barcode.SymbologyID = barcode.Symbologies.Code39Ext
        barcode.BarHeightCM = 1
        barcode.XDimensionCM = 0.03
        barcode.NarrowToWideRatio = 2
        barcode.LeftMarginCM = 0.201
        barcode.TopMarginCM = 0.201
        barcode.TextMarginCM = 0.051
        barcode.ShowText = False
        barcode.CaptionBottomAlignment = StringAlignment.Center
        barcode.CaptionBottomSpace = 0.03
        Dim barcodeText As String = "CODE39UPC" 'hard code barcode content for this test
        barcode.DataToEncode = "*" + barcodeText + "*"
        barcode.CaptionBelow = barcodeText
        PictureBox1.Image = barcode.BMPPicture 'Display Barcode
        barcode.SaveImageAs(".\upc.png", System.Drawing.Imaging.ImageFormat.Png)
        Dim fileName As String = filePath + "\Roland VersaWorks.eps"
        Try
             illustrator.Open(fileName)
         Catch err As Exception
             MsgBox("Missing File: " + fileName)
             illustrator.Quit()
             Me.Close()
         End Try
        Dim docRef As Illustrator.Document = illustrator.ActiveDocument
        Dim pathRef As Illustrator.PathItem = docRef.ActiveLayer.PathItems.Rectangle(100, 0, 300, 100)
        pathRef.StrokeColor = docRef.Swatches(3).Color 'Set strokeColor to CutContour Swatch
        pathRef.Filled = False ' Don't Fill rectangle with anything
        docRef.ActiveLayer = docRef.Layers(2) 'Activate UPC Layer
        '############## I need to copy PictureBox1.image into this activeLayer! How do I do it? ###########
        Dim epsOptions As Illustrator.EPSSaveOptions = CreateObject("Illustrator.EPSSaveOptions")
        epsOptions.CMYKPostScript = True
        docRef.SaveAs(filePath + "\test.eps", epsOptions)
        illustrator.Quit()
        Me.Close()
    End Sub
End Class

Hi,
Hodge-Podge wrote:
Also is there a way to lookup a swatch by name and not have to rely on knowing it's index as in this line of code : pathRef.StrokeColor = docRef.Swatches(3).Color. I know the swatch's name is "CutContour" I would like to assign it by name.
I have no knowledge in VB, but in javascript
it should be called by:
var mySwatche=app.activeDocument.swatches.getByName("CutContour");
Regarding how to copy, i guess that you can load picture as raster / placed items or cut() & paste()... it's just ideas,
Sorry, art.chrome

Similar Messages

  • Illustrator scripter needed

    Illustrator scripter needed to write a simple script regarding layers in AI.
    If you are interested, please contact me at [email protected]

    hi all,
    this is my first time to this forum , I need your help friends .I want to apply background color to pageitem using javascriping
    (widows os). How can I do this?
    Please send the mail regarding to this to [email protected] or [email protected]
    Thanks in advance
    Dhananjay Patil

  • TS1314 Need help tranfering images to iphone...

    I need help tranfering images from my computer to my iphone. I've synced the images but they don't appear on my iphone, also on the file that contains the images, there's a file that says IPOD PHOTO CACHE. I don't know what to do. Please Help...

    Hope these help, do you not find them at all in the photos app?:
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPhoto '11: View photos or slideshows on iPod, iPhone, iPad, or Apple TV
    http://support.apple.com/kb/PH2437
    iTunes: Understanding the iPod Photo Cache folder
    http://support.apple.com/kb/TS1314
    ============================
    - Oz

  • Frustrated: Novice Illustrator User Needs HELP

    Frustrated: Novice Illustrator User Needs HELP
    Hello All
    I am a novice user of Illustrator [after you read my question it will probably be obvious] running Illustrator 14.0.0 (CS4) - on a MAC iMac running 10.4.11.  I am a small business owner and have to wear many hats and so I am forced to be my graphic designer by default - ha ha
    PROBLEM - If I make a box using the RECTANGLE TOOL... The box should have a point at each Corner and the Middle of the box, as well as, in the Middle of each Side, and middle of Top and Bottom for a total of 9 anchor points...  but it only has 5... missing the 4 anchor points in the Middle of each Side, and middle of Top and Bottom. It is the same on Text Boxes too..  I can NOT find a setting to change this.... More, when running Illustrator on my MAC Laptop, It has all 9 anchors on the box...   I looked at Preferences etc... and matched everything to be the same but the problem is not fixed?
    Any help would be greatly appreciated
    Thanks-
    13CrazyTrain

    Aw, c'mon James. Chill it a bit.
    Yeah. You continually throw around your little personal jibes, and then if someone calls your bluff, you think you can back out of it with the old "can't you take a joke?" comeback.
    In my previous work environment where everyone used Illie, Freehand was a word to be used cautiously – a bit like Macbeth in the theatre.
    Well, I didn't work in your previous environment. And FreeHand specifically had nothing to do with this thread until you brought it up. Seems to me it's you who has a FreeHand chip on his shoulder.
    I thought you knew my way of expressing myself better...
    What, you think I keep a personality registry of regulars here or something? I'll tell you what I don't do: I don't engage in personal insults here. Yet your personal jibes are frequent enough for me to have grown weary of them.
    I think I was not dismissing bounding boxes as useless...
    Excuse me? "There's absolutely no need to use bounding boxes"?
    You are probably right that bounding boxes came with Illie 9.
    Probably before that. But I can personally recall that the current-selection bounding box was present in AI9. Unlike some, I try to avoid making claims that I can't immediately substantiate.
    I hopped straight from 6 to 9 and that was the first time I had seen them outside of Freewotever.
    I'm not familiar with "Freewotever." But if you're again trying to be funny, you are also again revealing your near complete unfamiliarity with it. FreeHand is not the program that continually cluttered the interface with bounding boxes. In fact, for many years that is exactly one of the distractions FreeHand users complained about re Illustrator.
    First off, FreeHand's interface doesn't display bounding boxes. It displays only bounding box handles (four dots) on non-basic constructs like clipping paths. (Somewehere around FH 9, it implemented the optional Transform Handles, but that's another thing.) In the cases of rectangles and ellipses, FreeHand doesn't display Bounding Boxes per se. Working in FreeHand has always provided more functionality with much less visual clutter (and tool glut) than Illustrator's defaults.
    The difference is that FreeHand has always provided proper live geometric shape primitives--something which Illustrator still doesn't provide, even though it's one of the most basic of all vector drawing interface expectations, being present in just about any vector drawing program on the planet--except Illustrator. That point of confusion is common among those who are experienced only with Illustrator's chronically outdated and archaic interface.
    Quite to the contrary, a rectangle drawn in a program that does provide basic live primitives doesn't need a bounding box to perform the bare-bones basic manipulation exemplified, because you can change the aspect ratio of it (and corner radius) anytime you want, regardless of its rotation. You can do this not only in FreeHand, but Canvas, Inkscape, Xara Designer, and even in just about any basic drawing module of just about any "works" or "office" bundle. It's just Illustrator that still fails to provide live shape primitives, and therefore needs a rotated bounding box to provide a very limited subset of such common functionality. You draw a rectangle (or any other geometric primitive) in Illustrator, and all you get is a dumb path. So Illustrator actually needs bounding boxes more than other programs, because of its anemic core funciton set and its hideous user interface.
    But of course, someone who is familiar only with Illustrator wouldn't know that. Which is fine...so long as they don't spew derision at programs they know next to nothing about (and users of such programs).
    ...bearing in mind that I have been at this job since the days of Rotring pens with nosebleeds.
    So? I was using Rapidographs and constructing compound rotation in isometric on the board for about a decade before I came to prefer Staedtler pens because I found them less prone to clog. What does that have to do with anything?
    Obviously newcomers should be encouraged to use new features, but preferably not before they have grasped the basics thoroughly. How basic bounding boxes are is perhaps a moot point.
    Nonsense. Other self-proclaimed "experts" in Illustrator would no doubt argue that bounding boxes were added for the benefit of "beginners." Again, this is not a "new feature." And yes, it is bare-bones basic; just implemented in a half-baked manner in Illustrator.
    As for step 3 you are right, but if you turn off the preview you can use the pixels on the paths for alignment,
    Egads. That's really grasping at straws, Steve.
    ...Or use bounding boxes.
    Or use bounding boxes.
    JET

  • Indesign CS5.5 Relink Script needs help

    Hi, I'm trying to relink images in an InDesign CS5.5 file to a different server using a script. This is what I have so far, but when I run the script I get errors and can't relink because "Either the file does not exist, you do not have permission, or the file may be in use by another application". Does anyone know how to make this script work? I'm fairly new to scripting.
    Here is the script I have:
    tell application "Adobe InDesign CS5.5"
              tell document 1
                        set linkList to links
                        set errInfo to "" -- We'll display error if we can't relink an item
                        repeat with x in linkList
                                  if (x's status) is not normal then -- I usually check for any link that has an error
      -- This should only return an AppleScript path with ":" separators
                                            set linkPath to (x's file path) as string
                                            if "Volumes/Calendars_2013 FPO" is in linkPath then
                                                      set AppleScript's text item delimiters to "Volumes/Calendars_2013 FPO"
                                                      set linkPath to (linkPath's text items) -- Create a list of text items
                                                      set AppleScript's text item delimiters to "Volumes/Calendars_2013"
                                                      set linkPath to (linkPath as string) -- Concatenate with new path
                                                      set AppleScript's text item delimiters to "" -- Reset TIDs
                                                      try
      -- Need to make our string (path) into an alias path
      relink x to alias linkPath
                                                                try
      update x -- This can be helpful
                                                                end try
                                                      on error err
      -- We'll store link name if error occurs
                                                                set errInfo to (errInfo & return & x's name)
                                                      end try
                                            end if
                                  end if
                        end repeat
      -- If an error occurs while trying to relink, we'll display it
                        if (count errInfo) > 0 then display dialog ("Can't relink:" & errInfo)
              end tell
    end tell
    --Hector

    I just tried adding collens to the end of the folder path. For some reason the script skipped the relink line. Below is the code with your update. I'm thinking its not finding the images because the script needs to make a list of all the images and choose the one that matches the missing image.
    tell application "Adobe InDesign CS5.5"
              tell document 1
                        set linkList to links
                        set errInfo to "" -- We'll display error if we can't relink an item
                        repeat with x in linkList
                                  if (x's status) is not normal then -- I usually check for any link that has an error
      -- This should only return an AppleScript path with ":" separators
                                            set linkPath to (x's file path) as string
                                            if "Calendars_2013 FPO:" is in linkPath then
                                                      set AppleScript's text item delimiters to "Calendars_2013 FPO:"
                                                      set linkPath to (linkPath's text items) -- Create a list of text items
                                                      set AppleScript's text item delimiters to "Calendars_2013:"
                                                      set linkPath to (linkPath as string) -- Concatenate with new path
                                                      set AppleScript's text item delimiters to "" -- Reset TIDs
                                                      try
      -- Need to make our string (path) into an alias path
      relink x to alias linkPath
                                                                try
      update x -- This can be helpful
                                                                end try
                                                      on error err
      -- We'll store link name if error occurs
                                                                set errInfo to (errInfo & return & x's name)
                                                      end try
                                            end if
                                  end if
                        end repeat
      -- If an error occurs while trying to relink, we'll display it
                        if (count errInfo) > 0 then display dialog ("Can't relink:" & errInfo)
              end tell
    end tell
    --Thanks for you help

  • Need Help With Image Gallery

    Hey all, I need a simple image gallery to load when you click a button.  I've tried shadowbox but have had absolutely zero luck. I'm not sure how to load it from a flash file and I know there is work that has to be done outside of flash like in the root folder. All I need is  for a simple image gallery, nothing fancy, to open when I hit a button. If anyone could explain how to use shadowbox in lamens terms or knows how to easily script a gallery that would be amazing.

    What script version is your target? AS2 or AS3

  • Need help getting images for blog aggregator

    I need help trying to grab images into a blog aggregator...
    Here is the code that gets the image.
    <!--- Get thumbnail, if exists --->
    <cfset content_to_parse = temp_description_full>
    <cfinclude template="module_get_images.cfm">
    <cfif IsArray(image_array) AND ArrayLen(image_array)>
    <cfloop from=1 to=#ArrayLen(image_array)# index="j">
    <cfhttp url="#trim(image_array[j].link_url)#"
    method="get" throwonerror="No" timeout="15" getasbinary="Auto"
    resolveurl="No" />
    <cfif IsBinary(cfhttp.filecontent)>
    <cfset tmp_filename = "thumbnail_entry_" & GetID.id
    & "." & image_array[j].file_type>
    <cffile action="WRITE"
    file="#ExpandPath(request.base_relative_url &
    '/blog_thumbnails/' & variables.tmp_filename)#"
    output="#cfhttp.filecontent#">
    <cfset thumb_image = request.img.process_image(image_path
    = ExpandPath(request.base_relative_url & '/blog_thumbnails/'
    & variables.tmp_filename), max_width = 120, max_height = 120,
    crop_area = "center")>
    <cfimage source="#thumb_image#" action="write"
    destination="#ExpandPath(request.base_relative_url &
    '/blog_thumbnails/' & variables.tmp_filename)#"
    overwrite="yes">
    <cfquery name="UpdateEntry"
    datasource="#request.data_source#" username="#request.db_un#"
    password="#request.db_pw#">
    UPDATE aggregated_blog_entry
    SET aggregated_blog_entry_thumbnail_image_tx =
    '#left(variables.tmp_filename,255)#'
    WHERE aggregated_blog_entry_id = #GetID.id#
    </cfquery>
    <cfbreak>
    </cfif>
    </cfloop>
    </cfif>
    ---------This is the module_get_images.cfm
    code----------------
    <cfset start_pos = 1>
    <cfset image_array = ArrayNew(1)>
    <cfset regex_image = "<img[^>]*>">
    <cfset regex_image_url =
    "(((https?:|ftp:|gopher:)\/\/)|(www\.|ftp\.))[-[:alnum:]\?%,\.\/&##!;@:=\+~_]+[\-A-Za-z0- 9\/]">
    <cfloop condition="1">
    <cfset temp_image_pos = REFindNoCase(regex_image,
    variables.content_to_parse, start_pos, true)>
    <cfif temp_image_pos.pos[1]>
    <cfset temp_link =
    mid(variables.content_to_parse,temp_image_pos.pos[1],temp_image_pos.len[1])>
    <cfset link =
    REFindNoCase(regex_image_url,temp_link,1,1)>
    <cfif NOT link.pos[1]>
    <cfset temp_link_url = "">
    <cfelse>
    <cfset temp_link_url =
    mid(temp_link,link.pos[1],link.len[1])>
    </cfif>
    <!--- Don't show links to images --->
    <cfif len(trim(temp_link_url)) AND
    ListFindNoCase("jpg,jpeg,gif,bmp,png",left(ListLast(temp_link_url,"."),3))>
    <cfset image_array[ArrayLen(image_array)+1] =
    StructNew()>
    <cfset image_array[ArrayLen(image_array)].link =
    temp_link>
    <cfset image_array[ArrayLen(image_array)].link_url =
    temp_link_url>
    <cfset image_array[ArrayLen(image_array)].file_type =
    left(ListLast(temp_link_url,"."),3)>
    </cfif>
    <cfset start_pos = temp_image_pos.pos[1] + 1>
    <cfelse>
    <cfbreak>
    </cfif>
    </cfloop>
    This is the type of code it has a hard time getting the image
    becuase it doesn't have a regular IMG tag.
    <div style="float: left; width: 82px; height: 59px;
    overflow: hidden; background: url(
    http://pix.crash.net/motorsport/80/388493.jpg);
    background-position: center center; background-repeat: no-repeat;
    margin: 1px;" onMouseOver="showTipGallery(Stoner, Australian MotoGP
    2007);" onMouseOut="clearTip();">
    Is there a way to modify this code to make it be able to look
    for the backround: url?? I am thinking that woul help it.. It knows
    that an image is there.. It just doesn't know what to do with
    it.

    How difficult is it for you to do a google image search for large images of this subject?
    While you appear to be doing this project for an educational endeavour and can get away with mild copyright abuse as "fair use", you probably should not expect the participants in this forum to 1) work for Disney either as a direct employee or as a contractor and 2) offer their copyrighted work for free.
    If you really want to impress a teacher and a future employer, you would use your own art. Why dont you create your own movie concept? Suppose you and your classmate are up for the same employment position. Who do you think will get hired if you show work that is not all your own, while your classmate has produced all of his/her own work?

  • Need help regarding image scanning from scanner and resizing it...

    Hi,
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!
    Thanks,
    Avinash.
    Edited by: Kalakonda on Jul 24, 2009 8:08 AM

    Kalakonda wrote:
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!So what you are doing is you have a Scanner (hardware: like an HP flatbed scanner) attached to a server that you want to use as a scanning station? Is this the senario that you are talking about?

  • Newbie to Java who needs help..

    Hello all.
    I am having some troubles making a random walker/Drunkard. What I have to do is make it that the user inputs the starting X, Y coordinates and the amount of steps he has to walk. After that, it is post to print back the new coordinates he walked to and the distance of his new coordinates is to the starting one. I am new to java so I am confused.. This is what I have so far..
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard() {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        private void move(int numSteps);
        private void moveDrunk(){
        moveDrunk = (int) (Math.random() * 4);
        public int getmoveDrunk() {
            return moveDrunk;
    public boolean getDistance{
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard();
            System.out.println("The drunk moved to X" +drunk.getX() + ", y " + drunk.getY() && "a distance of " + drunk.getDistance());
    }Any help would be nice.
    Edited by: orlfman on Apr 9, 2008 5:26 PM

    Sorry. I should have stated what I need help with..
    I need help with making him move randomly when the user types in the x,y starting coords, and the amount of steps he has to walk from what the user inputs. I also need help printing out the new x,y coords he walked to randomly and the distance his new coords are from where he first started at (the coords the user the typed in.)
    I have two files:
    Drunkard.java
    import java.awt.*;
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard(int x, int y) {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        public void moveDrunk(int numSteps){
             for (int i=0;i<numSteps;i++) {
            if(rand.nextInt(2)==1) { x+=1; } else { y+=1; } }
        public int getDistance(){
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
      }And DrunkardSimulator.java
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
    int x;
    int y;
    int numSteps;
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard(x,y);
            drunk.moveDrunk(5); //5 steps
            System.out.println("The drunk moved to X,Y" + drunk.getX() + drunk.getY() + drunk.getDistance());
    }Edited by: orlfman on Apr 10, 2008 12:29 AM
    Edited by: orlfman on Apr 10, 2008 12:31 AM

  • PS Newb needs help with image scaling and multi-sheet printout

    Hi, I'm trying to use PS CS3 to scale up an image I have so I can print it out to use as a map for a miniatures game.  I have no problem scaling the image to the appropriate size, but I can't figure out how to print out the image on multiple 8.5 x 11 sheets.  I had thought I'd seen an option for such a procedure previously, but maybe it was in another editing program.  If anyone has any ideas on how I might accomplish this I'd really appreciate hearing about them.  Thanks!

    Illustrator and InDesign do tiled printing as does CorelDraw. Photoshop as such does not, but some script for that may exist. In your case, the simplest solution would be to save the File as a PDF and have Acrobat generate a tiled print (Page Scaling setting in teh Acro print dialog). You just need to make sure your page properly fits multiple pages. Unliek AI and ID, Acro can only chop up stuff based on standard paper sizes...
    Mylenium

  • Need help with image push script please

    I am playing around with some javascript for the push / pull image used on webcam sites. When i run one, it never refreshes the image in my browser when I change the image. It only does if I delete the image and then repost it. It seems my browser looks for the cache or something first. How can I make ANY browser force to load the image without deleting it first?
    Here is the script I am using:
    <SCRIPT>
    <!-- ===================
    browserType = navigator.appName;
    newImage = new Image();
    Srvr_IP= "http://127.0.0.1/myFile.jpg?";
    var dly;
    if (browserType == "Netscape") document.write('<IMG SRC="'+ Srvr_IP +'"
    ') else document.write('<IMG SRC="' + Srvr_IP +'" name=ZahidiTV2Web
    Alt="Web Server is off. Please try later." border=1 >');
    uniq= 1;
    newImage.src= Srvr_IP + uniq;
    SnapShot_Loop(4000);
    function SnapShot_Loop(delay)
    dly= delay
    if( document.all) loadNewImage();
    setTimeout("SnapShot_Loop(dly)",delay);
    function loadNewImage()
    Stamp = new Date();
    uniq= Stamp.getTime();
    document.images.ZahidiTV2Web.src= newImage.src;
    newImage.src= Srvr_IP + uniq;
    window.status = "Displaying live video ...";
    </SCRIPT>
    <P>
    Hello

    These forums are for Java, not JavaScript.

  • Need help Loading images with selection on a form field?

    So I'm kind of a newb.. I can do basic forms but I need to set up a form field drop down box that will give me the ability to load images correlating to the users choice. I'm at a total loss for where to start, so ANY help would be appreciated. If you know of any good books or tutorials on the subject please share.
    Thanks in advance
    Sincerely,
    Stumped4now 

    P.S. I think I'm getting a better understanding of OCGs after lots of research today. However I still seem to be missing something
    var docOCGs = this.getOCGs();
    for (var x=0; x < docOCGs.length; x++)
      if(docOCGs[x].name == "Layer1")
      docOCGs[x].state = !docOCGs[x].state;

  • So frustrated! Need help positioning image...

    Hi folks...
    I am learning CSS in fits and starts, and clearly I don't have a good enough grasp on it. I hope someone can help me.
    I created this page, and tried to place an image in the large "main content" area to the right of the slideshow. It didn't work, kept getting shifted elsewhere. So I specified it as the background image for that div instead... It looks fine in Firefox and Safari (I'm on a Mac), however, a colleague with Internet Explorer 7 on a PC says that it shows up way down at the bottom of the page after the slideshow
    I've looked at all the ways to insert the image but none of them work. I know I must be missing something very simple. Can anyone help?
    Here's the URL... http://greatdiamondrentals.com/index.html
    and the source code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Great Diamond Rentals, Diamond Cove, Great Diamond Island, Maine</title>
    <script src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
          google.load("jquery", "1.3.2");
        </script>
    <script type="text/javascript" src="js/jquery.cycle.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        $('#slideshow').cycle();
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
    </script>
    <style type="text/css">
    <!--
    body  {
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 100%;
        margin-top: 20;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 0;
        padding: 0;
        background-image: url(images/gradient900.jpg);
        background-repeat: repeat-x;
    .twoColFixLtHdr #container {
        width: 940px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
        background: #FFFFFF;
        text-align: left; /* this overrides the text-align: center on the body element. */
        margin-top: 0;
        margin-right: auto;
        margin-bottom: 0;
        margin-left: auto;
        height: 660px;
        border-top-width: 1px;
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 1px;
        border-top-style: solid;
        border-right-style: solid;
        border-bottom-style: none;
        border-left-style: solid;
        border-top-color: #006;
        border-right-color: #006;
        border-bottom-color: #006;
        border-left-color: #006;
    .twoColFixLtHdr #header {
        padding-top: 0;
        padding-right: 0px;
        padding-bottom: 0;
        padding-left: 0px;
        width: 940px;
        height: 30px;
        background-color: #7092c3;
    .twoColFixLtHdr #header h1 {
        margin: 0;
    .twoColFixLtHdr #sidebar1 {
        float: left; /* since this element is floated, a width must be given */
        width: 380px;
        height: 600px;
        padding-top: 0px;
        padding-right: 0px;
        padding-bottom: 0px;
        padding-left: 0px;
    .twoColFixLtHdr #mainContent {
        height: 579px;
        width: 940px;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-right: 0px;
        padding-bottom: 0;
        padding-left: 0px;
        margin-left: 0px;
        background-image: url(images/GDRmaincontent.jpg);
        background-position: right top;
        background-repeat: no-repeat;
    .twoColFixLtHdr #footer {
        width: 940px;
        top: 630px;
        height: 30px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-style: normal;
        font-weight: 600;
        font-variant: normal;
        text-transform: none;
        color: #FFF;
        background-color: #7092c3;
        text-align: center;
        border-top-width: 1px;
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 1px;
        border-right-style: solid;
        border-bottom-style: solid;
        border-top-color: #006;
        border-right-color: #006;
        border-bottom-color: #006;
        border-left-color: #006;
        padding-top: 5;
        padding-right: 5;
        padding-bottom: 8;
        padding-left: 5;
    .twoColFixLtHdr #footer p {
        margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
        padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-style: normal;
        font-weight: normal;
        color: #FFF;
        vertical-align: middle;
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    a:link {
        text-decoration: none;
        color: #FFF;
    a:visited {
        text-decoration: none;
        color: #FFF;
    a:hover {
        text-decoration: underline;
        color: #600;
    a:active {
        text-decoration: none;
        color: #CCC;
    -->
    </style><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <meta name="Keywords" content="Maine, Vacation, rentals, Great Diamond Island, Diamond Cove, vacation homes, Island, Casco Bay, Portland, Maine Coast, Atlantic Ocean, Oceanside, seaside, Family, New England, lobster, beach, beaches, islands, rental, hotel, inn, bed and breakfast, holiday, ferry, fort, historic" />
    <meta name="Description" content="Vacation on a Maine island! Beautiful historic homes available for rent at Diamond Cove on Great Diamond Island in Casco Bay near Portland, Maine." />
    </head>
    <body class="twoColFixLtHdr" onload="MM_preloadImages('images/visited_homes.jpg','images/visited_about.jpg','images/vi sited_amenities.jpg','images/visited_map.jpg','images/visited_faq.jpg','images/visited_con tsact.jpg')">
    <div id="container">
      <div id="header">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><a href="http://greatdiamondrentals.com/view_our_homes.htm" target="_top" onclick="MM_nbGroup('down','group1','viewhomes','images/visited_homes.jpg',1)" onmouseover="MM_nbGroup('over','viewhomes','images/visited_homes.jpg','images/visited_hom es.jpg',1)" onmouseout="MM_nbGroup('out')"><img src="images/nav_viewourhomes.jpg" alt="View Our Homes" name="viewhomes" width="186" height="30" border="0" id="viewhomes" onload="" /></a></td>
            <td><a href="about_the_island_2010.html" target="_top" onclick="MM_nbGroup('down','group1','about','images/visited_about.jpg',1)" onmouseover="MM_nbGroup('over','about','images/visited_about.jpg','images/visited_about.j pg',1)" onmouseout="MM_nbGroup('out')"><img src="images/nav_about.jpg" alt="images/visited_about.jpg" name="about" width="192" height="30" border="0" id="about" onload="" /></a></td>
            <td><a href="amenities.htm" target="_top" onClick="MM_nbGroup('down','group1','amenities','images/visited_amenities.jpg',1)" onMouseOver="MM_nbGroup('over','amenities','images/visited_amenities.jpg','images/visited _amenities.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="amenities" src="images/nav_amenities.jpg" border="0" alt="amenities and activities" onLoad="" /></a></td>
            <td><a href="map_2010.html" target="_top" onClick="MM_nbGroup('down','group1','map','images/visited_map.jpg',1)" onMouseOver="MM_nbGroup('over','map','images/visited_map.jpg','images/visited_map.jpg',1) " onMouseOut="MM_nbGroup('out')"><img name="map" src="images/nav_map.jpg" border="0" alt="island map" onLoad="" /></a></td>
            <td><a href="FAQ_2010.html" target="_top" onClick="MM_nbGroup('down','group1','FAQs','images/visited_faq.jpg',1)" onMouseOver="MM_nbGroup('over','FAQs','images/visited_faq.jpg','images/visited_faq.jpg',1 )" onMouseOut="MM_nbGroup('out')"><img name="FAQs" src="images/nav_faq.jpg" border="0" alt="FAQs" onLoad="" /></a></td>
            <td><a href="contact2009.html" target="_top" onClick="MM_nbGroup('down','group1','contact','images/visited_contsact.jpg',1)" onMouseOver="MM_nbGroup('over','contact','images/visited_contsact.jpg','images/visited_co ntsact.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="contact" src="images/nav_contact.jpg" border="0" alt="contact us" onLoad="" /></a></td>
          </tr>
        </table>
        <h1> </h1>
      <!-- end #header --></div>
      <div id="sidebar1">
          <div id="slideshow">
    <img src="/images/slide1.jpg" />
    <img src="/images/slide2.jpg" />
    <img src="/images/slide3.jpg" />
    <img src="/images/slide4.jpg" />
    <img src="/images/slide5.jpg" />
    <img src="/images/slide6.jpg" />
    <img src="/images/slide7.jpg" />
    <img src="/images/slide8.jpg" />
    <img src="/images/slide9.jpg" />
    <img src="/images/slide10.jpg" />
    </div>
      <!-- end #sidebar1 --></div>
      <div id="mainContent">
        <h1> </h1>
      <!-- end #mainContent --></div>
        <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
        <div id="footer">
          <p>Great Diamond Rentals, c/o Phoenix Management, P.O. Box 759, Saco, Maine 04072 - (207) 766-3005 - fax (207) 571-3066 -<a href="mailto: [email protected]"> [email protected]</a></p>
          <!-- end #footer -->
    </div>
        <br class="clearfloat" />
      <!-- end #container -->
    </div>
    </body>
    </html>

    staceyetc wrote:
    Hi folks...
    I am learning CSS in fits and starts, and clearly I don't have a good enough grasp on it. I hope someone can help me.
    I created this page, and tried to place an image in the large "main content" area to the right of the slideshow. It didn't work, kept getting shifted elsewhere. So I specified it as the background image for that div instead... It looks fine in Firefox and Safari (I'm on a Mac), however, a colleague with Internet Explorer 7 on a PC says that it shows up way down at the bottom of the page after the slideshow
    I've looked at all the ways to insert the image but none of them work. I know I must be missing something very simple. Can anyone help?
    Here's the URL... http://greatdiamondrentals.com/index.html
    The width of your #mainConent <div> is too wide hence in IE it is displaced to beneath the side bar.
    Change it to 560px wide and also add float: left; as shown below:
    .twoColFixLtHdr #mainContent {
        height: 579px;
        width: 560px;
        float: left;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-right: 0px;
        padding-bottom: 0;
        padding-left: 0px;
        margin-left: 0px;
        background-image: url(images/GDRmaincontent.jpg);
        background-position: right top;
        background-repeat: no-repeat;
      background-color:#609;

  • Need help placing images on separate layers

    I'm a novice to Javascript but I've been trying to learn. I have a project where i need to place muliple images from a folder onto separate layers (same page) in a template. I tried to modify "ImageCatalogue" script within InDesign to disastrous results. On another thread someone was kind enough to give me a short script "Objects to Layers" written by Kasyan Servetsky. This was very helpful but not exact to my needs so now I'm starting from scratch. I've been playing with the following code trying to get it to work. It doesn't and I'm getting frustrated. I keep changing this line but it keeps coming back as "undefined":
    myImage.place(newLayer);
    Can someone please point me in the right direction? Is my coding too simple? The end comments are my wish list of add-ons should I ever get these layers working.
    Thanks for your help!
    // script to place images on separate layers
    Main();
    function Main(){
              // get path to folder, ask to select which folder
              var myFolder = Folder.selectDialog("Select folder containing images");
              // use open document
              doc = app.activeDocument;
              // if folder is empty, tell user to select another folder
              if(myFolder.length == 0){
                        selectDiaglog("Folder empty, select new folder");
              else{
              // select each file in myFolder and place on new layer in active document
                        var myImage = myFolder.item;
                        newLayer = doc.layers.add(+1);
                        myImage.place(newLayer);
              alert("Done")
    // rotate image 90 CCW
    // place image at x-6.41, y9.9955 on page
    // rename layer as filename

    Hi,
    Main();
    function Main(){
         // get path to folder, ask to select which folder
         var myFolder = Folder.selectDialog("Select folder containing images");
         // use open document
         doc = app.activeDocument;
         // if folder is empty, exit
         if(!myFolder){
              alert("no Folder selected, I am quitting"); exit();
         // place each file in myFolder on new layer in active document
         // files are filtered by their extension
         var
              myImages = myFolder.getFiles(/\.jpg$|\.tiff$|\.pict$|\.bmp$|\.eps$|\.pdf$/i),
              len = myImages.length, currImg,
              mAngle = 270,
              mX = -6.41,
              mY = 9.9955;
              while (len-->0) {
                   currImg = doc.pages[0].place(
                        myImages[len],     // current file
                        [0,0],     // initial place point
                        doc.layers.add({name: myImages[len].displayName}),          // rename layer as filename
                        false,
                        false,
                        {absoluteRotationAngle: mAngle}          // rotate image 90 CCW
                        )[0].parent;
                   currImg.fit(FitOptions.FRAME_TO_CONTENT);     //  fix frame to content
                   currImg.move([mX,mY]);          // move image at x-6.41, y9.9955 on page
              alert("Done")
    Each image in the same point placed?
    Good help is served here:
    http://www.jongware.com/idjshelp.html
    Each object has properties and methods.
    Used above: folder.getFiles(), page.place(), rectangle.fit() and rectangle.move() methods.
    Jarek

  • Need help displaying images with List component for Flash CS4 (ActionScript 3.0)

    Hi folks:
    I am an inexperienced user of Flash CS4 Pro (v10.0.2). I am attempting to use the List component with ActionScript 3.0 to make a different image display when a user clicks each item in a list.
    I did find a tutorial that showed me how to make different text display using a dynamic text box and the following ActionScript:
    MyList.addEventListener(Event.CHANGE, ShowSelectedItem);
    function ShowSelectedItem(event:Event):void {
        ListText.text=MyList.selectedItem.data;
    ...where My List is the instance of the List component and ListText is the dynamix text box. In this case, the user clicks an item in the list, defined by the label value in the dataProvider parameter of the List component, and text displays as defined in the data value in the dataProvider parameter.
    However, as I mentioned to start, what I really want to do is make images display instead of text. Can anyone provide me the steps to do this?
    I appreciate your help (in advance)!!
    Cindy

    Hi...thanks for responding! I was planning on using images from the Library, but if there is a better way to do it, I'm open. So far, I just have text in the data property. This is part of my problem. I don't know what I need to put in the data value for an image to display. Do I just put the image file name and Flash will know to pull it from the Library? Do I need to place the images on the stage on different frames? I apologize for the "stupid user" questions, but as you can tell, I'm a newbie.
    Appreciate your patience and any help you can offer!
    Cindy

Maybe you are looking for