ActionScript 2.0 :: Print Function, Clearing Variables?

Oct 2, 2009

I'm using this code

Code:
on (click) {
var x = 1;
print(x,"bmovie");
}

To print out the current page as displayed on the screen. The command works great, but when the button is pressed all of my variables seem to be reset, along with various combo boxes.The print function works as intended except clearing all my values .Is there a way around this?

Edit: I just ran a small test on a blank .fla with 3 buttons 1 - set variable = 1, 2 - trace variable, 3 - my print code

This does not clear the variables like it does in my application.What exactly goes on during the print function? If I can isolate and trace the problem, I could find a fix for it, but I have no idea whats going on.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Clearing A Function?

May 12, 2004

I set a function for

this.onEnterFrame = function(){
code;
}

[code]....

View 4 Replies

ActionScript 2.0 :: Possible To Clearing A Function?

May 12, 2004

I set a function for

this.onEnterFrame = function(){
code;
}

but later I want this onEnterFrame to stop functioning to conserve on processor resources.setInterval isn't too good of an option from the way I have things set up, so right now I just set it to a new function with a trace action which overwrites the old one.

View 4 Replies

ActionScript 2.0 :: Clearing SetInterval From A Different Function?

Jun 25, 2006

how to clear the interval in this code? I'd also like to know if there is a better way of firing makeStars() than using setInterval in a function - like I'm doing. I've looked at the Kirupa tutorial and I'm not seeing what should be done.

Basically, this attaches a number of stars within the Stage width and height properties. When the browser resizes I rewrite the stars to the screen with the new bounds. But I can't get the interval to stop, so the stars just keep getting replaced - disappearing and relocating abruptly.

It all works great outside of the resizeIt() function, but once inside she goes down hill from there. A couple of things I need cleared up (pun intended) are:

1. Am I creating a new interval each time resizeIt() is executed?

2.What is the scope of the interval(s), and does how you access them change depending on where you are in the code, or are they more global?

stop();
//number of stars to make
var numstars:Number = 100;
_root.attachMovie("background","bkgd",this.getNext HighestDepth());

[Code].....

View 4 Replies

ActionScript 2.0 :: OnFocus Function Is Clearing Variable?

Apr 3, 2007

osting to PHP - but decided to have an initial message in my textInput to instruct people to input their email address.But now that the onFocus function is telling the textInput it equals "" when clicked, it is posting the variable as "" instead of what the user has input!!How do I clear my textInput for the user but still post the user's info?The onFocus code is:

Code:
this.email_address.text = " your@email.com";
tiListener = new Object();

[code].....

View 2 Replies

ActionScript 2.0 :: SetInterval Function And Counter Var Not Clearing?

Oct 16, 2007

i'm reusing a function as a timer with setInterval. it works the first time around but then for some reason the counter var gets stuck at 10 (the delay var = 10) and won't reset and start counting up from zero again...code:

Code:
_global.count=0;
startTimer1=function(){

[code].....

View 5 Replies

ActionScript 3.0 :: Clearing Output Panel After A Function Is Completed?

Oct 16, 2009

Is it possible to clear the output panel after a function is completed?

View 7 Replies

Actionscript 3 :: Cannot Print Variables Onto The Screen?

Dec 11, 2011

I want to print variables onto the screen of my game. I am using text boxes to display the variables. When I try update the text boxes, the text boxes are blank.

I use an EventListener to update the text boxes:
// Add the EventListener that updates the game HUD
addEventListener(Event.ENTER_FRAME, updateHUD);

[code].....

View 1 Replies

ActionScript 2.0 :: Way To Disable Print Function

Feb 16, 2005

I have a small client that needs to put information into Flash and prevent people from printing the document out on their printers.

Of course, you can always print anything you see on your monitor (Print Screen and other apps), but I am only concerned with preventing users from printing from 1) any browser and 2) from the Flash contextual menu.

View 3 Replies

Add Print Function To A Coloring Book?

Mar 6, 2009

How can i add a print function to a particular page for a coloring book?

View 2 Replies

ActionScript 3.0 :: Trigger A Print Function Via Flash?

Dec 27, 2010

There is an output that fits in A4 papersize with a resolution of 827x1169px. I trigger a print function via Flash AS3


[code]...

But the printout does not fit on A4 paper size (it tries to print larger and can see only a small portion on the paper). How can I arrange this with AS3?

View 1 Replies

ActionScript 2.0 :: Apply A Print Function To A Button?

Sep 27, 2004

how to apply a print function to a button, i have search through the script directory and this was all I could come up with?

on (press) {
printAsBitmapNum(_root.order, "bmovie");
}

order is the name of the movie clip. what i need is to be able to print the screen from the position where the button is situated??

This script does not print: i have played around with the settings in normal mode but there is no response from my printer.

View 3 Replies

ActionScript 2.0 :: [MX2004] Use The Print Function In A Button?

Mar 11, 2005

I'm trying to use the print function in a button, a.s. below:

on(press){
print(_root.instance_1, "bframe");
}

This works fine...the mc "instance_1" is the only thing that prints. The problem is that I need to print 2 movieclips at once. So I have tried the following:

on(press){
print(_root.instance_1+_root.instance_2, "bframe");
}
on(press){

[code]....

None of these work though, the entire movie prints instead.

View 1 Replies

Php :: Taking Data From Only One Print Function In A Php Page And Passing To Flash?

Aug 5, 2011

I'm trying to take a variable from a php page and send it to flash to then use in a link.I'm having problems just selecting ONE variable from the print function, the code will help explain:

PHP page

<?
print"fbook=facebook";
print"tweet=twitter-test";[code]....

It collects all the data fine but it does not print it out correctly, it prints out all the variables in the php in one link. For example: If i click the facebook icon, i will be taken to http:[url].... This also happens with the other icons (Youtube and Twitter).

View 2 Replies

ActionScript 3.0 :: IE Print Button Gets Around Print Movie Clip With Alpha?

Aug 24, 2010

I have a print button with this code in it:

Code:
var pj:PrintJob = new PrintJob();
var printOptions:PrintJobOptions = new PrintJobOptions();

[code].......

View 1 Replies

ActionScript 2.0 :: Print The Contents Of A Textfield Or String Using The Print Command?

Mar 16, 2004

Is there any way to print the contents of a textfield or string using the pring command in AS?

View 2 Replies

ActionScript 3.0 :: Create A Print Button To Print One Frame?

Jan 3, 2012

I am trying to create a print button on the last frame that will allow the user to print just that frame. I've tried using the printjob object, but all that I can get to happen is print a blank sheet of paper. Here is the code that I have so far:

function printScore(event:MouseEvent):void
{
var printJob:PrintJob = new PrintJob();

[code].....

View 1 Replies

Print From Flex App By Clicking Print In Context Menu?

Jul 5, 2011

I want my flex 4 application to print proper picture when I click on print in context menu of Adobe Flash Player.Is it possible?

View 1 Replies

ActionScript 2.0 :: Print MovieClips When Press A Print Button

Jun 5, 2007

i want to simply print 2 movieClips when i press a Print button. so i have the "_root.container_mc" and "_root.logo_mc"... paste the simplest code for printing a "landscape" page with these 2?

View 3 Replies

ActionScript 2.0 :: Make A Print Button That Will Print The Contents Of A Mc?

Jan 14, 2008

I am trying to make a print button that will print the contents of a mc...this mc basically holds a dynamically drawn floorplan which can be zoomed and panned...I want to be able to print the contents of the mc, and only what is viewable in the mc at the time of the print...so if you are zoomed in, all that prints are the actual objects visibly seen in the mc...I think it may be with the print command using bmovie but I have no idea how to assign a #b lable to the frame.

View 3 Replies

ActionScript 2.0 :: Print Section And Then Check Out The Print Pieces?

Jul 15, 2004

[Code]... and go to the print section and then check out the print pieces. for some reason my resizing gallery movie is doing some weird stuff and i cant figure out how to fix it. my actionscript goes like this :

[Code]...

View 4 Replies

ActionScript 3.0 :: Unable To Print More Than 5 Pages In One Print Job?

Dec 19, 2008

I am not able to print more than 5 pages in one go. I want to print almost 12 pages in one print job. I am creating the movieclips of each page by adding the dynamic data in to it and store in an array. When all the movieclips created and stored in an array(pagesAry) then it call the following function to print those pages:

private function sendToPrinter():void
{
pj = new PrintJob();
try

[code]....

Getting error: Print job canceled as it took more than 15 seconds to complete.

View 5 Replies

ActionScript 2.0 :: Print Button Shows Up On Print Out?

Jul 19, 2005

how do you set a print button so that it does no show up in the print out?

View 1 Replies

ActionScript 2.0 :: Print Entire Page But When Text File Is Scrollable It Doesn't Print Whole Text?

Jul 14, 2005

how do I go about printing entire, scrollable text area in flash movie, I know how to print entire page but when text file is scrollable it doesn't print whole text.

View 8 Replies

ActionScript 3.0 :: Getting Variables Out Of A Function?

Apr 5, 2011

i have got a php file (exemple.php) that give a data call MyDataPhp (ex : echo "MyDataPhp=something";)

In my actionscript i try to retrieve MyData with URLLoader with this script

var request:URLRequest = new URLRequest("example.php");
// Build the varLoader variablevar varLoader:URLLoader = new URLLoader();varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;varLoader.addEventListener(Event.COMPLETE,

[Code].....

View 1 Replies

ActionScript 3.0 :: Variables Outside Of A Function?

Jan 14, 2010

I need to be able to use a function to change a variable outside of it, and it seems like global scope and the like went out with 2.0 and I need to use 3.0.I would just have the function return a value, but I'm using an 'addEventListener' which has the event and then the function inside.

Example:

Code:
var finished = false;
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
function done(evt:Event) {

[code]....

How can variables be changed through a function when you can't set the scope or return a value through it?

View 8 Replies

ActionScript 3.0 :: Accessing Variables From Outside A Function

Jul 25, 2011

[Code]....

I want to use the variable var_page3_title for dynamic text boxes in movie clips further on down the timeline. Of course I don't want to repeat this code for every textbox so my question is, how to I access the variables from the function loading();

View 2 Replies

ActionScript 3.0 :: Using Variables In A Button Function?

Dec 26, 2008

I am new to AS3 and building a simple flash banner. There will be four movie clips consisting of just one word each (in the sample below I'm just using rectangle for now). When moused over each word will show a rectangle with a message in it, like a large tool tip. I have a rudimentary version working fine, see code below.

Question 1: Is there a way to just write on function which will work with all four buttons changing the message, say using variables like AS2?

Question 2: Does the code below look relatively efficient? I'm sure there are better ways to write it.Here's a link to the rudimentary version, http:[url]....

View 2 Replies

ActionScript 3.0 :: Pass Variables In A Function From Swf To Swf?

Sep 26, 2008

How do i pass variables in a function from swf to another swf?

View 4 Replies

ActionScript 3.0 :: Accessing Variables Outside Function

Jun 23, 2010

I need to access the contents of a variable that is filled inside a function, but is declared outside the function.. [URL] says that if you declare the variable outside of the function the variable should be accessible even when its content is filled by a function. I have declared the imgs variable at the start, outside the function, as an array. After that the function retrieves a string from the URLLoader and splits that string into to the imgs array/variable.

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved