ActionScript 3.0 :: Importing A Large Text File And Print It With A Footer?
Dec 17, 2009
I'm importing a large text file and trying to print it with a footer. My method for all of this is very simple. I'm dynamically creating a sprite container that is fed to the the printjob() class. Inside that I'm creating a dynamic text field and scaling it to the right page height/width (408x574) and adding a footer below that.
Using a loop, I'm scrolling the text field to the top of the next page and adding the page number to the footer and adding the page to the job. Mostly, this works fine, but I'm noticing some lines from the text field are not printing. This happens at the page breaks and is not consistent across different printers I use.
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.
I'm having an issue where when I try to print a larger image via printjob one of two things happens. One either the job fails or two the output of the image is literally diagonally cut off. I am simply passing the stage to the print job. I've tried both with and without using printAsBitmap.
I use Flash primarily for animation. The project I'm working on currently is a hefty 1920 X 1080 square pixel file and currently weighs in at 187mb because of all the sounds and jpg images.It's 2 minutes long.
The problem occuring is new to me as I've never worked with projects this long or in this resolution. Or with this much data (sound effects, jpgs, etc).
The problem is this: I'm trying to import a high resolution photograph (3500x2500) onto the stage or even just in the library. I'm using the photos to get an idea on where the final animation will be placed (photo backgrounds, flash animation, composited in After Effects, think Roger Rabbit).
I'm currently using XML to import geo-location data to my flash application.Even though my XML scheme is about as small as can be, I still feel i would do better downloading the variables as text and exploding them. If i manage to change the xml to raw text I can compress the data to about 35% of the original size.I want to load the data in the form a_b_c_d-e_f_g_h.So, to the question; how do I explode a datastring in flash?
I have a very large text file (it's a 270,000 word list with one word per line) which I need to bring into my AS3 code. Importing it via url works just fine - loading it in as a string then converting to an array - no problems.
However, I need to embed it into my code somehow so that there are no external files (for easy distribution). Using a search and replace tool, I've tried several things, none of which have worked including:
Code: Converting to an array: var wordList:Array = ["word1","word2","word3", ...]; Result: crashes compiler too.
The same tests work fine with much smaller sized word lists, but apparently the size of my word list is too large to work. I know flash can handle strings and arrays of this size, because as I said, it works fine when importing the text file via url. I just can't seem to get it to compile it when I embed it into code.
How can I save data to a text file and also append a record to data in an existing text file? I've used Authowrware previously and it was quite easy to create a large string of data (a comma separated list) and export that to a text file (and create the text file if it didn't already exist). I could then easily append additional rows of data (records) to the text file. We want to build a questionnaire that will store the data locally on the computer in a text file. Each record may have a few hundred data points in a comma separated list.
This is what i'm trying to do. I want to have a footer at the bottom of my website with information about me, and a place to link to my friends. I want to set the position to the absolute bottom of the browser no matter how big the screen size is and have a background that repeats on the x axis to fit the page.I've been looking into Listeners to do this, but its new territory that i'm not 100% with.
I'm running into a brick wall here. My dictionary.txt file, which is loaded into ActionScript and shoved into an array, cannot be uploaded by the licensing company to license my game. However, I wrote a program to convert the space-delimited text file into an .as file, looking like so:[code]Thing is, now the .as is 3MB in size, and all ActionScript in the game fails to load.So I either need two things:
- Some way to embed the .txt file within the .swf
- Some way to make the .as file load without issues.
My Flash CS4 banner works OK. However if I place the above code just above the </head> tag, the banner does not seem to load! I am trying to load a video file just above the footer div and the above swf code. The video loads and plays but the Flash banner and <body. tag background color do not load. Is the SWFObject a necessary tool
I want to have a footer at the bottom of my website with information about me, and a place to link to my friends. I want to set the position to the absolute bottom of the browser no matter how big the screen size is and have a background that repeats on the x axis to fit the page. I've been looking into Listeners to do this, but its new territory that i'm not 100% with. If someone could in the right direction, or show me an example that would be great!
I am working in Flash CS4 (AS3).What I have created is basically a simple photo gallery. About 5 thumbs that when rolled over a larger version appears. Both the thumbnail images and larger images are loading dynamically.I've got that working.What it's missing is a headline and a sub headline for each pic that comes up. I need to do this from an external text file.
I was able to do this with AS2.AS3 not so much. How do I control the content of multiple dynamic text boxes on different places throughout the timeline with an external text file in AS3? I just want to name different text boxes different names and have the external text file pass the variables into my swf for each text box.
I would like to import text from a XML file into a dynamic text field. The XML file contains database records. I have found that Flash does not support the DOM command 'getElementsByTagName()' which I was endeavouring to use to find the record in the XML file that I wanted to associate with a particular dynamic text field.
Is there any other way to search through the XML file for the particular record I am looking for?
it will go back to frame 1 on the root... and i trace the value and it goes to undefined... but it goes back to frame 2 and loads the movie again.this is my first attempt at a sharedObject..
best way to read in like 200k words and have them each tween from the center of the screen as small dots and tween up to the word filling the SWF then "fly through my head" not literally, but you probably get it...
When am importing the xfl type file to flash Many blank Static text box is appering. Is there anyways to remove the blank static text box without selecting one by one. Check by Ctrl+A
I really like the text effect Pom used in the footer contest, and would like to use the same grid-type method of creating mc letters but with a different effect. i understand how to change the parameters and shapes of the letters, but can't seem to figure out which piece of code is purely for the explosion effect. basically, i want the letters but with the 'Repel' effect from[URL] here is Pom's AS:
[AS] cellSize=3; radius=10; damp=.85;
[code]....
and here is the .fla using the repel effect using pre-made mc:
I'm currently trying to set up my game so it pulls in all text from an external XML file (to make switching between different languages easier). The problem is that on several occasions I need to use the special code "" to start a new line (for formatting purposes) but when I'm pulling the text in from the XML file this is not starting a new line any more - it is just appearing as normal in the text. (e.g "Here is some example game text") How do I get around this?
i need to split a large text file into an array at line breaks so one array element = one line.i have tried the using "" in both match() and in RegExp but it doesnt work.i had the g and m flags on. tried the $ sign too.
I am having an issue where if I import a graphic to the library or directly to the stage, it causes my movie to stop on frame #1, even though the graphic is on frame #40. I have tried a .png, .jpg, and .psd and they all cause this behavior. I have put other graphics in and never had this issue.
basically i imported a SWF within my flash file from an external file and only the randomize button works on the file none of the rest from the imported flash can anyone let me know why, if you need me to let me know and i will upload files
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();
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?
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.