Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 14 of 14

Thread: Position of Background Images/HTML

  1. #1

    Position of Background Images/HTML

    Hello All,

    I'm really enjoying learning my way around medialab, but I've now run into a snag that I can't seem to fix.

    I want to put some html as a background to a scaled response item. On my home computer it looked fine, but when I tried it on my school computer, the alignment was off. So I figured that I needed to use % in the location to keep things more consist. What I'm finding is that no matter what I do, the location parameters don't seem to matter or they are erratic. For example, I'll fix the location to be 30% from the top of the screen, I'll run the experiment, and it's in the lower right-hand corner off the screen totally. Most of the time, though, they make no difference whatsoever.

    I'm trying to specify the location of the html location after the file name in the backimage column. Such as: movies\elem.html (t70,l100,w400,h150)

    So I tried making a jpg image of the portion of the html that I wanted, and the same thing is happening.

    So then I looked on the threads here to see if there were any examples of using html that I could follow. I found the following example: htmlBackground(2).zip. But when I ran this example, the html ran off the page there.

    Is there something odd about my computer, refresh rate or something like that?

    Any help would be appreciated.

    Kind regards,

    Mary

  2. #2

    Position/Size Questions

    Hello All,

    I am still working on trying to get the position size to work for two things:

    1) background HTML
    2) movie

    I would like to try to use the % percentage since I'm building this on one machine and running it on another.

    The position doesn't seem to be working right, and for the life of me, I cannot figure this out.

    Two files to look at (where I've stripped things down for purposes of illustration).

    1) movie.que. The problem? The position isn't where I think it should be. Also, the HTML doesn't seem to wrap at all. There are two different possible positions included in there.

    2) funny videos.que. The problem? The video isn't in the position where I would assume it should be. Also, as an aside, when I first run this questionnaire, the video is black (but the sound is there). Upon second running, however, the video will be there consistently.

    There are other questions, too.

    1) Sometimes when I save a revised questionnaire in the experiment editor, the revisions don't seem to be reflected when I test in media lab using CNTL-R. I have to go and explicitly ask to test this questionnaire using the dialogue boxes.

    2) When I use the "Show Location Points" and the "Sizing Movies and Images" dialogue box in medialab, the image jumps to the upper right hand corner of the screen immediately. Is this the way it's supposed to work? I'm having so many problems trying to get the location right that I'm now wondering.

    BTW, this is happening on more than one machine now. I originally built it at home and it looked ok. Took it to school and it's off. Tried to fix it at school and its not right. Brought it home and it's still not right.

    Thanks in advance for any help that anyone can provide.

    Kind regards,

    Mary
    Attached Files Attached Files
    Last edited by jarvis24; 10-09-2008 at 01:17 PM.

  3. #3

    Does anyone have examples of using % for positions?

    Hi All,

    I'm still unable to get the top and left position thing to work using the percentage. For example, the parameter t.45 puts that image/text or whatever I'm trying to position about 80% down the page. I'm at a loss after working on this since last night.

    If anyone has any questionnaire where they have done this successfully and can send me as an example, I would be very grateful. My e-mail is mbo@psu.edu.

    Thanks in advance.

    Kind regards,

    Mary

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    Mary, this sounds very odd. What version of MediaLab are you running on your school computer? And on your home computer?

  5. #5
    Hi There,

    I'm running 2008.1.11 at home (and at school, too, I'm pretty sure). I've posted a follow up to this question where I also attached some files:

    http://www.empirisoft.com/Support/showthread.php?t=1631

    In the meantime, this morning, I'm just looking at a simple thing -- a scaled response. Let's say (for example) that I use the following paramters for that:

    (p7, w.6, t.9)

    This would make the scale disappear off the screen.

    Then let's say I tried:

    (p7, w.6, t.5)

    This would make the scale appear about 80% down the screen.

    I can't seem to the use the % locations.

    Any help you can provide would be great, as right now I'm having to consider other means within medialab of presenting the information in a way that's consistent. Ultimately it means that I can't use background images, which is a real shame.

    I'm sure that my home and office computers use different screen resolutions, but wouldn't the use of %s help account for that?

    Thanks in advance for your help.

    Best,

    Mary

  6. #6
    Join Date
    Nov 2005
    Posts
    3,328
    Mary,

    There is a lot going on here. One issue I think we can deal with quickly is the HTML. If you put the text within an HTML <Table> then you can specify how much of the HTML window it will take up. Try using the revised HTML file and see if that helps with the wrapping. As for the other issues, it's very unusual--everything looks appropriate here. Are you using XP or Vista? It might be helpful for me to log onto one of your machines from here so I can do some direct problem solving. Let me know via email if that would be convenient for you sometime tomorrow. I agree it would be much faster than doing this piecemeal via email and the support board. Also, do check the versions at school because there were a few releases during v2006 where some location issues were coming up like this.
    Attached Files Attached Files

  7. #7
    Blair,

    First of all, many thanks for your assistance.

    Okay, here's an update. Putting the DPI to large settings seems to have helped a great deal. When I used the external monitor to my laptop, I could get things to work okay.

    Today I went into the lab and at first noticed some wonky kind of spacing issues, but I reset all of the lab computers to large DPI and it seemed to help. I had to adjust the spacing to deal with the monitors, but I think that's ultimately due to the fact that I'm working on wide-screen (pretty much) from home and from my office, and the monitors at school aren't that. That I understand.

    Here's one issue that I continue to be confused about -- the placement of video. So if I specify a question as a video item (with no parameters), then the video appears in the upper left-hand corner (though not absolutely so). So it's at about 25% down and 15% from the left -- or therebouts. I thought it was supposed to be centered?

    So here's my temporary work around. I convered my avi videos to flash and embedded them into a webpage. Then I used a webpage (with the % locations) to position in the video (with a webpage used as a background image). The flash video in the webpage is in the upper-left hand corner. This seemed to work both at in our lab and at home. So that would be the workaround that I would use.

    Ultimately, the dodgy position associated with just using a movie file has led me to suspect (perhaps mistakenly so), that there's something up with the medialab-media player thing. Does media player mess with stuff? I don't know. I'm guessing at this point. But here's a potential hint. I noticed in the manual that when the height/width of a video is specified, then the video will appear at the upper-left hand margin. Well, I thought I was at full size, but I hadn't specified it. So to approximate it, I set it at h.99. At that point it was fully in the upper left position. So might medialab be resizing the image somehow? In other words, might media player video be centered, but the video it plays is not because it's not positioned right? This is my guess, but what do I know.

    In case it's relevant, these are videos that I downloaded from youtube. I used dvdvideosoft to do it (freeware). I was going to try this, too, on a video that I created from converting from a VHS, but to be honest, I just ran out of time. This &*($ job is getting in my way of having fun with this program.

    Thanks again for any insight you can provide.

    Best,

    mbo
    Last edited by Mary; 10-12-2008 at 07:59 PM.

  8. #8
    Join Date
    Nov 2005
    Posts
    3,328
    If you open the video in the Windows Media Player, does it look and play as you would expect? If you click on the file properties while in WMP, what size does it say the video is? Does that seem to match what you are getting when it is displayed in WMP?

  9. #9
    Hello,

    Yes, the video looks exactly right in WMP. The file size is 320x240. It looks that size in media lab. I've tried embedding it as a background image, I've tried using it as a movie item, I've tried different types of video (e.g., wmv, avi). Nothing. Nothing. The only thing I can do is the work-around of coverting everthing to flash, embedding it in a webpage, then using the webpage as a background. This sure seems like a lot of work just to get the position right, so something is obviously not working here. At this point I'm beginning to run out of time on this experiment, so I have to use the work around unless I can get some alternative. Any thoughts? It sure would be nice to be able to use the program properly. I just cannot figure out what is going on. And this problem comes up on my machine at home, with or without the external monitor, it comes at on every lab computer at school, and it comes up at my office computer.

    Any help would be greatly appreciated.

    Kind regards,

    Mary

  10. #10
    Join Date
    Nov 2005
    Posts
    3,328
    If you like, I can log onto your system and see if I can tell what's up. Send me an email if you like--I could it today between now and 2pm.

  11. #11
    Join Date
    Nov 2008
    Posts
    8

    having problem applying parameters to background image

    I'm having a similar problem. No matter what I do, the background image in a scale response item, does not move around the screen. I use, as the help file says, "1.bmp (t10)" for instance, or try different t and l values, even using %. The image always stays on the center of the screen.

    This is happening on a Win XP with Medialab 2008 1.33.

  12. #12
    Join Date
    Nov 2008
    Posts
    8
    The problem was spontaneously solved. I don't know what is different from before.

  13. #13
    Join Date
    Nov 2005
    Posts
    3,328
    Thanks for the update--please let us know if the problem recurrs.

  14. #14
    Instead of setting up margins and padding around each image in a style tag (which causes a lot of code bloat) you can instead set up classes for the margins and padding along with floats that you use the most in CSS and then add that to a div tag that surrounds the image, i.e., like this:
    .mar12 {margin:12px; }
    .mar12l {margin-left:12px; }
    .mar12r {margin-right:12px; }
    .mar12b {margin-bottom:12px; }
    .mar12t {margin-top:12px; }
    .pad12 {padding:12px; }
    .pad12l {padding-left:12px; }
    .pad12r {padding-right:12px; }
    .pad12t {padding-top:12px; }
    .pad12b {padding-bottom:12px; }
    .floatleft {float:left;}
    .floatright {float:right;}
    Repeat these for whatever margin and padding sizes you use the most.
    Then put the image in a div and list the padding and margin like this (divs don’t add extra spacing where P tags do):
    <div class=”floatright Mar12l”>
    <img src=”images/name-of-image.jpg” alt=”describe image”>
    </div>
    This will float the image to the right with 12pixels of margin on the left (to separate the text from the image). Then add a class for padding if needed.


    You will need at least CSS for sure for this.
    I think you expect not only by using HTML. So either you can use position absolute and adjust with different top, right, bottom, left values.
    Or use flexbox.

    Removing background of a picture is a tough job. We usually use Photoshop to remove the background of a picture but think is it possible to have your laptop or computer with yourself everytime. So, then we take out our android phone from our pocket.

Similar Threads

  1. Continous mouse position
    By rkreager in forum Hardware: How Do I...
    Replies: 3
    Last Post: 03-25-2021, 04:50 AM
  2. Mouse position
    By rothers27 in forum MediaLab Older Versions: How Do I...
    Replies: 2
    Last Post: 07-08-2008, 04:09 PM
  3. displaying images very fast
    By duindain in forum DirectRT Older Versions: How Do I...
    Replies: 4
    Last Post: 04-25-2008, 02:55 AM
  4. Cycling through images over and over again
    By jarvis24 in forum DirectRT Older Versions: How Do I...
    Replies: 1
    Last Post: 01-24-2006, 12:45 PM
  5. Resizing Images?
    By jarvis24 in forum DirectRT Older Versions: How Do I...
    Replies: 1
    Last Post: 12-07-2005, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •