Solved

How to hide content offstage

Posted on 2004-03-27
30
1,696 Views
Last Modified: 2008-02-01
I have a movieclip that I'm printing out and I want to hide it offstage so that it never gets seen. Am using Flash MX Pro and running in fullscreen mode. With large high resolution monitors or dual monitors the clip can still get seen offstage, what is the trick?
0
Comment
Question by:Chris_Granger
  • 8
  • 7
  • 6
  • +5
30 Comments
 
LVL 5

Expert Comment

by:zenlion420
ID: 10696869
What's the instance name of the movie clip you're trying to hide, what level is it on, and what frame?

j

P.S. - You're trying to hide a clip that you're also trying to print?  This is hard for me to understand, can you explain a little better?
0
 

Author Comment

by:Chris_Granger
ID: 10696892
I'm trying to hide the movie clip as it is for printing only and is dynamically created on the fly for this purpose. It is not for viewing purposes so I don't want it seen. Obviously I can change it's alpha or visible properties or it wont print...

instance name:  printclip
level: 0
frame: 125

Cheers
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10696914
>>Obviously I can change it's alpha or visible properties or it wont print...


This is the problem I'm having with what you're trying to do.  How will the user even know the clip is there to print if it's hidden?  Could the clip just be put on, say, the frame after what is currently the last frame of your movie, with a stop() on the frame before it?  Then we could just call that frame with some script and it would appear, but never show in the movie.  I'm sorry Chris, this still isn't making much sense to me, but I'm trying :)

j
0
 

Author Comment

by:Chris_Granger
ID: 10696986
The user knows they are printing the clip because they are selecting a print button on another part of the movie which demonstrates exactly what they want to print. The clip is not part of the interface it is for printing only so the user does not need to see or navigate or interact with this clip to print it. It is not for viewing.

I'm using the print class. Technically I should be able to have frome 1 of the clip blank and use this line:
my_pj.addPage (_root.printclip, {xMin : startx, xMax: xmax, yMin: starty, yMax: ymax},{printAsBitmap:false}, 2);

but this will still print frame 1
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10697041
Hello Chris,

Being that I've never tried to do exactly what you're doing, I had a look around online, and these are some interesting things I found in the process.  It appears that you need to add a #p label to the frame/s you'd like to print, then use the bframe parameter. Look at the first two links I've posted first, then look at the last one.  I hope this sheds some light.  Let me know what happens after reading those, and we'll go from there.

http://flash-list.com/archive.0104/0198.html
http://flash-list.com/archive.0104/0200.html
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary628.html

j
0
 

Author Comment

by:Chris_Granger
ID: 10697065
I believe the #p label is only for standard flash print command as is bframe, these aren't for when using the print class. I need to use the print class as I need the extra control it gives me over page layout and setup.
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10697067
Okay, sorry Chris.  I didn't know you were locked into the print class.  I'll look around some more for answers, and hopefully in the meantime, someone else will show up that's done what you're trying to do.

j
0
 
LVL 4

Expert Comment

by:RedLava
ID: 10700883
Hi Chris,

Is there the option to alter the _x and _y properties of the instance to move it off screen?
Or create the container so it is off screen? E.g. when the movie is loaded it is loaded into a movie that is designed off sceen.

RedLava
0
 

Author Comment

by:Chris_Granger
ID: 10700934
Hi redlava,  yes I'm currently doing this (they are shifted as far off stage as Flash will allow) but when in fuillscreen mode on a large monitor or dual monitor setup the offstage content is viewable, very irritating and I can't work out for the life of me why the program does this... EG: if you put something offstage why would you ever want it viewable offstage???
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10700959
Chris,

The offstage contrent won't be visible when the movie is published, only in test mode.

j
0
 
LVL 4

Expert Comment

by:RedLava
ID: 10700972
Chris,

Can you move it off stage to the top left of your screen.

If you know the maximum width and height make sure that the _x any _y are set to -MaxWidth and -MaxHeight.

RedLava
0
 

Author Comment

by:Chris_Granger
ID: 10701104
zenlion420, the content is clearly visible in published (projector - fullscreen) version, which is what I find very strange with Flash, why oh why would you ever want to see something you've set off stage????

RedLava, this would still be visible in certain circumstances...
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10701116
Wow, that's really crazy!  I've never had flash show offstage content for me after publishing.  I do alot with stuff that's offstage for periods of time, then  will move into view when called.  

j
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10705052
something simple to do would be to use a mask that is on the first layer of the movie, and is the same size as the stage...

there are performance issues when used on older machines, but it seems like your viewers have up to date systems with large screens and such...

that or just movie your clips using the mentioned _x & _y   and visible properties, but set them like this:

movieClip._x = -5000;
movieClip._y = -5000;
movieClip._visible;

that not only moves them off stage, but disables them...


let me know if you need more help...


rp

0
 
LVL 1

Expert Comment

by:dub2k
ID: 10705075
The simple way to do it would be to make a massive box ( prolly about 2500x2500 or so) with the same colour as your stage colour on the 2nd from bottom layer, then your print mc in the layer below.  It wont show if you hide it all behind your massive box.

I've run up against that before myself, and the above solution worked for me :)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Expert Comment

by:rascalpants
ID: 10705077
WHOOPS!

forgot to set the value of visible  :)

use this:

movieClip._visible = false;



rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10705098
dub2k,

I think that technique would put a drain on any processor and slow connection speeds...  what you are doing is the opposite of a mask...  a smaller "Frame Box" work work much better...

but using code is even better than that  :)


rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10705164
Chris,

after reading the comments above again...  I forgot to mention that putting the movieclip offstage to the top or bottom is the best way to go, because of the screen orientation...   with a dual monitor set up, it won't matter, because the _y value should be set to a higher level...


and why can't you use the visible property of the movieclip?  


rp
0
 

Author Comment

by:Chris_Granger
ID: 10705208
hmmm, dub2k, i think your suggestion would work and i only need a box a bit larger then the stage because my print clip is a little larger then that, will give it a whirl when I get back toit - now have other things to worry about   :-)

Dub2k, I think I tried that one and the print clip wont publish if it's visible is set to false.

I'm sure this isn't supposed to be happening...
0
 
LVL 1

Expert Comment

by:dub2k
ID: 10705212
rascal,

To my understanding of how flash works, and the way it deals with vector shapes (this could well be a flawed understanding btw..) is that it doesnt matter how big/small the shape is, its how many points it has.  and if its moving also... if it was a massive box 2500x2500 that was animated (either with actionscript or motion tweens) then it would be processor intensive, but as the box is sat still, its not really going to affect it.

I'm quite interested to find out if thats true or not tho... I'll look some more into that later :D
0
 

Author Comment

by:Chris_Granger
ID: 10705215
oops, meant wont print...
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10705867
dub2k,

that theory would be correct except if you have ever tried to enlarge a SWF quite a but, and then the processor starts to slow down quite a bit along with the animation.

So this means that "Size does matter" :)     My findings are from personal testing and QA work...  even though the processor only has to calculate the points and then fill the shape, there still seems to be a connection between the actual size of the shape and how smoothly the processor plays the SWF.

I tend to believe what I see, and not so much as to what other developers write articles about...  I do believe in anomolies though, and I have seen them happen quite a bit with this program...


rp
0
 

Author Comment

by:Chris_Granger
ID: 10705997
The size of something animating onscreen will affect playback with cpu and graphics cards, I'd assume but if it is a static vector shape onscreen I would have thought this wouldn't affect anything.

...but what do I know I know I can't even stop flash from displaying offstage content...


...hmmmm maybe I should go back to Director...   :-)


nah...   :-)
0
 
LVL 8

Expert Comment

by:ccarey
ID: 10709457
just draw a box over it in the same colour as the background of your movie. The simple ways often work the best ;)
0
 
LVL 1

Accepted Solution

by:
dub2k earned 500 total points
ID: 10711902
Rascal,

I have tried most things in my usage of flash over the years (including helping of how to construct swfs without using fla's).. We're not animating anything here, so i'm not 100% sure where this worry about processors comes from.. "size will matter" when animating, but as we're not, it wont :)

The _x = -5000, _y = 5000 techinique will work.. (but not the _visibility part) as will as the big box covering it.  I only suggested that route because its how i hid a  print clip in a previous project.
0
 
LVL 2

Expert Comment

by:SandyCooke
ID: 10725258
Can't you just do

troublesomeBox._x = Stage.width;
troublesomeBox._y = Stage.height;

?
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10868943
Chris_Granger,

I am not sure why the above particular comment was accepted as an answer...  If you were just accepting the last comment in a tread of comments that solved your problem, then please post your own comment stating this...  This will help out everyone who views this question in the future...

But if you were accepting the above comment because of the "  _x = -5000, _y = 5000 " phrase, then you just gave credit to the wrong person...  

Please come back and explain why you accepted the above comment as an answer...

thanks

rp
0
 
LVL 1

Expert Comment

by:dub2k
ID: 10869227
RP,

The post that he's accepted gives the answer to his question. (Sorry to point out the obvious)

"The _x = -5000, _y = 5000 techinique will work.. (but not the _visibility part) as will as the big box covering it.  I only suggested that route because its how i hid a print clip in a previous project." (From the accepted answer)

As the above quote says that both techniques will work (without the _visibility part of your suggestion.. as he stated that he tried turning the _visibility to 0, but that didnt work ("Dub2k, I think I tried that one and the print clip wont publish if it's visible is set to false." ... as I didnt suggest that I'm guessing that comment was aimed at you rascal)).  

Hope that sorts things out for the ppl reading this in the future

dub
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10870115
Thanks for answering Chris' question for him/her...

but you are taking credit for a solution that was not yours...  the first person who posted about using x and y properties was RedLava, and if that is the solution that worked, then neither you nor I should be receiving these points...

A comment from the owner of this question is still needed....

thanks


rp
0
 

Expert Comment

by:bchalker
ID: 14546651
When you say fullscreen are you scaling the movie to fullscreen, or just using the fullscreen real estate without scaling the movie? The offscreen content is not visible when the movie is set to "allowScale=false"...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

762 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

17 Experts available now in Live!

Get 1:1 Help Now