A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: How do you export the defined area only?

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    3

    Question How do you export the defined area only?

    When i export a movie clip or use the publish method, I always get all the objects that's in the stage area - outside the defined white area.

    I only want the objects in the work area (the white square) to be visible...

    Can someone help me??

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    You actually are. It all depends on how you're viewing it....

    If you're playing the SWF file, you can expand the borders of the player and view all objects not on the stage. If you view the same file through a browser using a HTML file, this extra area should be hidden.

    The best method to avoid this would be to either, avoid storing any symbol outside the border set by the stage dimensions or if you must store your symbols out there, change their visible properties to false, until you need them. You can also reduce the alpha to 0 which make the object still available, but just not visible.

    Run your project from the HTML file and see if you can still see the symbols outside of the stage.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thank you for the answer. Just a few questions still:

    Often you use the swf file and not the html - will I then run into problems with the other objects showing?

    And finally, how do I set the visibility to false?
    Do I have to convert all the objects to movie clips or??

    Again, thank you for your time

  4. #4
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Just about all objects in the DisplayObjectContainer (visible on the stage) has a visible property. You can set it by using (as 2.0) object._visible = false; or (as 3.0) object.visible = false;.

    The HTML file usually remains the same, so while testing, I'll run the SWF file since my machine has the necessary exeutable to open the SWF in a window. Many user's computer cannot open the SWF without using a browser. Does that make sense?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  5. #5
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    You could just put a box the size of the whole stage on a layer then make that layer a mask layer for all other layers

  6. #6
    Senior Member
    Join Date
    May 2009
    Posts
    213
    Yes the last method mentioned above is the easiest and simplest. I figured this out recently to use for the website im designing and it works perfectly. Aslo i seem to be facing a similar but not exact same kind of problem though. I seem to get a small white (or whatever color the browsers background is) border around my flashmovie that ive published as HTML for a website. I dont know if ive got any settings wrong in the publish to HTML settings

  7. #7
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    No you do not have anything wrong in the publish settings, you can not fix it there.
    You need to go into the html using whatever editor you use and set the margins for the html page to zero.
    They default to something like 10 pixels.

    Mark

  8. #8
    Senior Member
    Join Date
    May 2009
    Posts
    213
    I opened up the HTML file in notepad but couldnt find any command called margin.
    Where do i put this into the html text please ?

    Thanks

  9. #9
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    Inside the body tags, color should be there already make it whatever you desire
    PHP Code:
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    </
    body

  10. #10
    Senior Member
    Join Date
    May 2009
    Posts
    213
    Hi Mark,

    It worked perfectly.
    Thanks for your help.

    Regards....
    Last edited by plainman007; 05-26-2009 at 11:36 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center