Solved

problem in calling a javascript print function from a flash file.

Posted on 2004-03-22
12
212 Views
Last Modified: 2008-02-01
i'm having a print icon in the flash file. when the user clicks on it a javascript function is called where i print a frame.the problem is that in IE 6.0.2800 the flash file inserted in the HTML gets inverted, when we click the print icon. but there is no problem with the print functionality it is the flash file that gets inverted.so pls help me out .

it is working fine in the previous versions of I.E like I.E 5.5 etc.. only in IE 6.0.2800 the problem occurs

the code i use is

getURL("javascript:myfn()") // in the flash

in the html under javascript

function my()
{
     printFrame.focus();
     printFrame.print(); // where printframe is the frame that contains the content to be printed
}
0
Comment
Question by:arun_3k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 10651864
why not just use Flash's inline print functionality?

here is a page that will help you figure this out...

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary625.html


let me know if you need more help...

rp
0
 
LVL 5

Accepted Solution

by:
stef4s earned 70 total points
ID: 10656709
If you use the document.write method in javascript then make sure you call document.close(); before printing


printFrame.document.close();
printFrame.focus();
printFrame.print();
0
 

Author Comment

by:arun_3k
ID: 10657122
thanks stef4s partly soved now the flash file remains stable and it is not inverted but the thing is the color of the flash file is changed i.e color of the characters and other objects in the flash file are changed. anyhow great job done pls solve this problem too...
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 5

Expert Comment

by:stef4s
ID: 10657252
How have they changed colour?
0
 

Author Comment

by:arun_3k
ID: 10657305
everything is changed to blue color.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10657706
so I am confused why you would not want to use the superior print functionality in Flash...  you have much better control, the quality is better, and from your problems above, it seems it would be much easier to implement...


the tool is there, why not use it?

rp
0
 
LVL 5

Expert Comment

by:stef4s
ID: 10664857
please give us a link s we can see this colour change ourselves. What browser r u using?
0
 

Author Comment

by:arun_3k
ID: 10674664
in reply to stef4s : i'm using the I.E 6.0.2800.

in reply to rascalpants : i want to print a html frame not the frame in flash.this html frame contains a html page which contains the content to be printed.
0
 
LVL 5

Expert Comment

by:stef4s
ID: 10674761
arun_3k is it possible to post a link to your file so that I can see what happens?
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10823106
"in reply to rascalpants : i want to print a html frame not the frame in flash.this html frame contains a html page which contains the content to be printed."

I am not sure why this question was posted in the Flash Forum then...  what specific Flash problem was there and what was the solution?  

points to stef4... great, but this should not be PAQed in the Flash area...  people will later find this question thinking that they will get a Flash solution...  they will not...

rp
0
 
LVL 5

Expert Comment

by:stef4s
ID: 10830973
rascalpants, arun_3k thought it was a Flash Problem.

"problem is that in IE 6.0.2800 the flash file inserted in the HTML gets inverted".

Because Flash is embedded in HTML it is a valid question for both topics.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10833102
I disagree....  but oh well...

rp
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.

728 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