Solved

Adding a background image in "pop up" page.

Posted on 2004-04-10
13
515 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?
0
Comment
Question by:pamelagillie
  • 6
  • 6
13 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 10803348
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

0
 

Author Comment

by:pamelagillie
ID: 10803700
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?
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10804361

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
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:pamelagillie
ID: 10807767
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?
0
 
LVL 9

Accepted Solution

by:
krishnaprathab earned 500 total points
ID: 10810509
Hi,

Dreamweaver tiles (repeats) the background image if it does not fill the entire window, just as browsers do. (To prevent the background image from tiling, use Cascading Style Sheets to disable image tiling. Use should use CSS to define the no-repeat option.

The syntax in CSS is :

'background-repeat'
Value:   repeat | repeat-x | repeat-y | no-repeat | inherit  
Initial:   repeat  
Applies to:   all elements  

If a background image is specified, this property specifies whether the image is repeated (tiled), and how. All tiling covers the content and padding areas of a box. Values have the following meanings:

repeat
The image is repeated both horizontally and vertically.
repeat-x
The image is repeated horizontally only.
repeat-y
The image is repeated vertically only.
no-repeat
The image is not repeated: only one copy of the image is drawn.

Example(s):


BODY {
  background-repeat: no-repeat;
}

If you still have doubts refer to the below URL:

http://www.w3.org/TR/REC-CSS2/colors.html#background-properties

Thanks,
KP
0
 

Author Comment

by:pamelagillie
ID: 10810975
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
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10812198
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
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10824245
Hi pamelagillie,

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

Many Thanks,
KP
0
 

Author Comment

by:pamelagillie
ID: 10830402
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
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10841207
Did you set the left and right , top and bottom margins to 0?

Thanks,
KP
0
 

Author Comment

by:pamelagillie
ID: 10856802
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?

0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10857146
Can you upload the files somewhere and let me know. I will fix it when iam free.

Thanks,
kp
0
 

Author Comment

by:pamelagillie
ID: 10857322
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!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question