We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Adding a background image in "pop up" page.

pamelagillie
pamelagillie asked
on
Medium Priority
560 Views
Last Modified: 2012-06-27
I would like to add an image as background to an .htm page created in Dreamweaver. I have a button in Flash MX with this actionscript on it.


on (release) {
     getURL("javaScript:window.open('3yr_am_daily.htm','3yr_am_daily','width=400 height=450')")
}


3yr_am_daily.htm is the page that needs a background image. I actually did add an image in the properties panel in the dreamweaver document but when I view the page online my image does not show up.

What else do I need to do?
Comment
Watch Question

Commented:
you don't need the sub-window parameter

try..

on (release) {
    getURL("javaScript:window.open('3yr_am_daily.htm','width=400 height=450')")
}

if there is still no background..the problem will be with your htm page..not the call

Z

Author

Commented:
Z,

I deleted the sub-window parameter and now the page doesn't show up at all. Maybe the problem is with my htm page. Do you know what it might be?  The page is just a simple page with text only and an image that I added in the "properties panel" in the dreamweaver document.

Any ideas?

Hi,
 
There may be two reasons why this is happening.

1) If the HTML and the image are not in the same directory.
2) If the HTML pages are not in the same folder as the HTML page with the embedded Flash object(swf).

Possible solution is try placing the swf and the html (both the calling html and the html with background) in the same folder. Also place the background image in the same folder.

Try and use relative path (../) if your swf , html and/or images are in different directory.

In my flash movie iam using the action :

on (release) {
      getURL("javascript:window.open('imagehtml.htm','image','width=400 height=450');void(0);");
}

and all my HTML's , iamge and swf are in the same directory and it wrks for me.

I have uplodaed a set of test files (htmlproblme.zip) to :

http://s6.invisionfree.com/flashmx/index.php?showtopic=5

Unzip the file into a folder and open the main.htm file and then click on the black button in that page.

Hope this helps !

Thanks,
KP

Author

Commented:
okay, my background is showing up now but it is tiled and I can see it repeating on the top and bottom of my window that opens up. How do I stop the repeating image?
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
KP,

I got the image to stop tiling, but now my window that pops up is not the sze that i want it to be.

In the code for the button in Flash MX, I specify the size for the page based on the table/cell size in Dreamweaver. When the window pops up it automatically has a scroll bar on it and doesn't display the whole page as intended.

You can view what I'm talking about at www.colonialhousepreschool.org. go to CURRICULUM, then TWO YEAR OLDS, then at the bottom of the page, the first link to the class schedule 12:00-2:15.

Pleaase help!

PG
Hi,

In the 2yr_epm_daily.htm file i found an unwated tr portion which is :

  <tr>
    <td width="371" height="20">&nbsp;</td>
  </tr>

Remove this and set the left and right margin of this file to 0. It will work. By the way the site looks very good and the color combinations are too good.

In my computer Ima not able to see the scrollbar!!

If still you have problems then istead of opening a window from within flash call a javascript function written in your html and from you HTML open the window with specifictions such as scrollbar=no etc..

In your getURL method use some function like:

getURL("javascript:openSmallWin();");

and in your HTML write a function with the same name :

function openSmallWin()
{
      MM_openBrWindow('2yr_epm_daily.htm','name','scrollbars=no,width=300,height=460');
}

Cheers !!
KP
Hi pamelagillie,

 If my answer has solved your problem please close this question.

Many Thanks,
KP

Author

Commented:
I have removed the tr portion that you said to remove and nothing has changed.

I'm a little lost when you talk about "calling a javascript functio written in your html". Are you saying to put this (getURL(javascript:openSmallWin();"); as actionscript on the button in flash? And then put the following in dreamweaver?:

function openSmallWin()
{
     MM_openBrWindow('2yr_epm_daily.htm','name','scrollbars=no,width=300,height=460');
}

Can you please be more specific?  I tested this site on a PC, (I have a mac) and the scrollbar does not show up, but instead the window is just too small and cuts off information. (The last item in the window should be "Good-bye!")

PG
Did you set the left and right , top and bottom margins to 0?

Thanks,
KP

Author

Commented:
this just isn't working for me and there seems to be so many inconsistencies depending on what browser the user is using.

i've decided to create the pop-up window in flash. to do this would i create a flash document at the correct size 380 x 380 and create a .swf file that i will then link to?

how do i link to this .swf file?

Can you upload the files somewhere and let me know. I will fix it when iam free.

Thanks,
kp

Author

Commented:
kp,

i ended up creating a .swf in flash with all elements in place, rather than putting it all together in dreamweaver. then i imported the .swf file into a dreamweaver doc and this seemed to work.

thanks for all of your help!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.