Need some help from the pros

Discussion in 'Web Design and Development' started by ukjabber, Sep 27, 2007.

  1. ukjabber macrumors member

    Joined:
    Sep 27, 2007
    #1
    Hi,

    I am a total newbie (at 35... erm nearly 36 yrs old) at web design. My specialty is print but I thought its about time I played around with flash and dreamweaver. And now I'm stuck.

    I have created a very simple flash intro and being a very anal person I want this to sit in the middle of the page. I have created it at 800x600 as I guess that most people would work on a larger screen res than that.

    How do I go about it?
    1. I know nothing of scripting
    2. This is my first little personal project and want to learn. I've nearly bought books on web design but to be honest my eyes glaze over when i start reading the stuff, so hence I'm here.

    At the moment when i drop the flash intro into dreamweaver it just sits in the top left and I would like it to be central both horizontally and vertically regardless of what screen size people are using.

    Any help would be greatly appreciated.

    P.S. Would it be better to do the whole thing in flash or use a combination? I only ask as I'm not even sure if I'm setting the page up right in dreamweaver!:eek:
     
  2. dunc85 macrumors regular

    Joined:
    Jul 23, 2006
    #2
    Hi,

    before we get to the positioning, we need to look at how the SWF file is being inserted.
    Because of some crazy lawsuit, in IE flash movies must be clicked on before they will activate. They will also show a horrible box round them and a tooltip.

    Anyway, the solution to this is to use some javascript which is explained here:
    http://blog.deconcept.com/swfobject/

    It might be overwhelming if you've not done any Javascript before, but I'm sure you'll get back to us if you need help.

    As for centering, when you insert the flash using the method on that website you'll create a div with and id of flashcontent.
    e.g.

    <div id="flashcontent">
    This text is replaced by the Flash movie.
    </div>


    You'll want to assign a style to this div. Probably the easier way would be:

    <div id="flashcontent" style="margin-left:auto; margin-right:auto">
    This text is replaced by the Flash movie.
    </div>

    This will give that div automatic margins on the left and right and should centre it.
     

Share This Page