-
Printing part of a frame from a projector file
Im in the process of making a game for kids where they can create their own vehicle. Is there a way I can create a print button to print just part of the frame (the bit with their vehicle on) and to print only that 1 frame and not the rest in the time line, although I will also need to be able to print the other frames when the user is on them. I hope that makes sense!
I've seen a few tutorials but still cant seem to get it right
Thanks Steve
-
I'd be happy with printing the whole page but just the frame that you are on not all of them, from what I've seen the below should work but it still prints all frames.
getURL("printAsBitmap:","window=/InstanceNameHere");
Does anyone have any ideas? Thanks Steve
-
the cheesy child
getUrl? don't use that if you are making a projector file! but don't worry, its as simple as print();
well not just print() there is parameters but yeah.
put the printable stuff in a movieclip so that the print() function will have a target instead of allowing all frames to be printed.
print(target,someThing);
target is where you will put the instance name of the movieclip. or put _root if its the main stage.
where someThing is you can put one of the following:
bmovie Designates the bounding box of a specific frame in a movie clip as the print area for all printable frames in the movie clip. Assign a #b frame label to the frame whose bounding box you want to use as the print area.
bmax Designates a composite of all the bounding boxes of all the printable frames as the print area. Specify bmax if the printable frames in your movie clip vary in size.
bframe Indicates that the bounding box of each printable frame should be used as the print area for that frame, which changes the print area for each frame and scales the objects to fit the print area. Use bframe if you have objects of different sizes in each frame and want each object to fill the printed page.
i copied that info right from flash so please don't say it doesn't make sense.
Last edited by bounceboy; 03-13-2009 at 06:40 AM.
Reason: I made a few mistakes...
-
Thanks for your help, I'll try that
-
D'oh! I still cant get it to work.
on (release){
print(testy, bmovie);
}
testy is the instance name of the movieclip
and I've assigned a #b frame label to the frame with the correct bounding box.
It comes up with this error:
**Error** Scene=Scene 1, layer=print button, frame=3:Line 2: Bounds type must be bmovie, bframe or bmax
print(_root, bmovie);
Total ActionScript Errors: 1 Reported Errors: 1
I'm guessing I've missed something simple?
Thanks Steve
-
the cheesy child
use "" for bmovie.
so do this:
print(_root, "bmovie");
EDIT: you actually have to use the "" if you use bmax or bframe or any of them!
Also i like the idea of your game and wish you luck
Last edited by bounceboy; 03-13-2009 at 09:02 PM.
-
Thankyou very much, it works! You're a legend mate, I knew it would be quite simple but for some reason I just couldnt figure it out
on (release){
print("testy", "bmovie");
}
Thanks again
-
the cheesy child
that's alright, everybody makes mistakes! I hope your game is successful!
-
Cheers, its just a bit of fun really, just something im working on when we're not busy at work.
Just checked out your website, it mad! I like it!
-
the cheesy child
really? cool, thank you for that! do you have a website?
if you do PM me please
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|