Solved

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

Posted on 2004-03-22
12
208 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

910 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

24 Experts available now in Live!

Get 1:1 Help Now