A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jul 2000
    Location
    Ca.
    Posts
    70
    Hi folks. This might sound silly, but I cannot figure it out to save me. Let me explain. I am making a picture viewer that when you click on the buttons on the main .swf file, it loads another .swf file into it with the .jpg...ok, now on the main .swf file, the area that I want the .swf file to load into, I wanted to have the shape of a TV screen, so what I did is create a rectangle with a 20 point curve on the corners. I then set the placement parameters where I wanted it to be (x=40, y=60, width=380, height=280) I then made my buttons and applied the appropriate actions. I actually learned how to do that!!!

    Ok, so now I went to create my NEW .swf file with the pic (.jpg) in it. So what I did (using the same size stage, bgcolor, etc...) was make another rectangle as my outline and set the parameters at exactly what I did in the main .swf. I then next dragged my .jpg out of the library on to the stage. Then I assigned it the same parameters as well. Now, here is my problem. The .jpg has "square" corners but my viewing area has the 20 point rounded corners so the .jpg's corners are hanging over the edge of the viewer on all 4 corners. How the heck do I get the .jpg to fit in the viewer and get it's corners rounded???? I also noticed I can not "select" my jpg on the stage...it only selects the outline (like a square box) I have a tutorial I downloaded on this, and in the example they somehow have rounded the corners and made the whole jpg selectable...and in their library, the .jpg had square corners just like mine. I have torn that FLA apart and cannot figure out how they did it. Can someone please help???

    thank you,
    daddy

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    resolved Masking might work

    Don't know how this will effect your setup, but you may want to try doing a mask to cut off the square corners. If you haven't worked with masks before, they can be tricky, but there are numerous posts about them and a tutorial or two as well - try site search to find them.

    But, basically, you create an object (rounded rectangle) to serve as your mask, and you pull your JPG in "under it". When you specify the mask, it will automatically indent the object that you attached the mask to thereby effectively putting the JPG under the mask. Now, I don't know if you are trying to let your user do any manipulation of the JPG, and using a mask may hinder that, but it is a path to explore.

    Good luck!

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    Ca.
    Posts
    70

    thank you

    Thanks for the input GGW, and yes I do know masking...but the FLA tutorial I was learning from had no masking involved!!! That's what I can not figure out bro. I can't figure out how a "squared corner" jpg was pulled from the library on to the stage and then had a 20 point curve applied to the corners. There has to be a way!!! I can send the .FLA file to whoever might help. Thanks again though GGW...much appreciated :-)

    daddy

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    3
    Maybe the actual image had rounded edges

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Posts
    170
    Hi

    This is how I think it is done in the tutorial.

    1:=Import your jpg.
    2:=Select it and click on Insert\Convert to new symbol (F8), select graphic and name it. eg Graphic_1
    3:=Now Open Graphic_1, select the image and click modify\Break apart (Ctrl+B), now you can delete the edges or even paint over it.
    4:= Group it again and your done.

    You can even break it and edit it when it's on the stage (Without converting it to graphic)

    Naz



  6. #6
    Junior Member
    Join Date
    Aug 2000
    Posts
    4
    Maybe I'm missing something but wouldn't the problem be solved if like you have done, created a rectangle with rounded corners and have it as your topmost layer?

    Then load the JPG movieclip into a layer 'underneath' the tv screen graphic?

    The edges of the tv screen (solid, the centre 'display' obviously transparent so as to 'display' the JPG) should then automatically mask out the square corners of your JPG.

    Obviously as on a real display the viewable area will be compromised - but in this case that is actually what you want!

    Hope this helps...

    pSynrg

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