Solved

Adding a background image in "pop up" page.

Posted on 2004-04-10
13
508 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
Comment Utility
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
Comment Utility
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
Comment Utility

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
 

Author Comment

by:pamelagillie
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 9

Expert Comment

by:krishnaprathab
Comment Utility
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
Comment Utility
Hi pamelagillie,

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

Many Thanks,
KP
0
 

Author Comment

by:pamelagillie
Comment Utility
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
Comment Utility
Did you set the left and right , top and bottom margins to 0?

Thanks,
KP
0
 

Author Comment

by:pamelagillie
Comment Utility
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
Comment Utility
Can you upload the files somewhere and let me know. I will fix it when iam free.

Thanks,
kp
0
 

Author Comment

by:pamelagillie
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Flash Player White Screen Facebook 5 736
Microsoft WSUS 4 82
Adobe Flash Player won't install on Windows 7 3 210
black magic design 1 108
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…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now