A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: different colour in one scene

  1. #1
    Senior Member
    Join Date
    Mar 2000
    Location
    Barcelona
    Posts
    225

    Question

    I have a movie which its background colour is black,but in one scene I want the background to be blue.In one layer of the scene I've made a blue rectangle covering the black background,but when I test the movie to see how it would look in a browser(File>Previsualization of publication>HTML),you still can see the black behind the blue rectangle.How can I solve this problem?.I want the full screen in blue in this particular scene.
    Thank's.

  2. #2

    Post

    Because your initial Flash movie is black, Flash interpid it as that and when it export, will generate the HTML code for a black body background. There are several things that you can do, you can make your movie fill up the whole browser window (100%, 100%), or make a popup that is the exact size of your movie, or I believe you can use javascript to change the background colour of your HTML page either though a command in your Flash movie or timed in the javascript code itself. Hope that helps.

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Location
    Barcelona
    Posts
    225

    Question

    Hi ParkyX,
    At the publishing setting I've set the dimension as 100%x100% to fill up the whole browser window and it doesn't work.Could you explain me what's a popup and how can I make it.
    Thank you.

  4. #4

    Smile

    Try publishing the whole movie to an html page first, don't use preview. Then go to your html document and use this code:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
    &lt;body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&gt;[/code]

    That should take away any margin on the page.

    As for the popup, what you need is two html documents, one to call up a popup window with the specific size you choose and the other is the popup itself with your flash movie in it. This is accomplished by using Javascript. Here are the codes, the first set are what you put right after the &lt;/head&gt; code:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>&lt;script language="JavaScript"&gt;
    function newwindow()
    {
    window.open('http://www.yourdomain.com/yourhtml.html','newwin','width=300,height=200,loca tion=no,toolbar=no,resizable=yes,screenX=0,screenY =0,top=0,left=0');
    } &lt;/script&gt;[/code]

    This is what you use in the body to call upon the javascript:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>&lt;a href="javascript:newwindow()"&gt;link&lt;/a&gt;[/code]

    So what this basically does is open up a new window with the name of "yourhtml.html", dimensions is 300x200, with all bars taken out, resizable, and pop up at the location of 0,0 on screen. Make sure you use the set of codes
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
    &lt;body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&gt;[/code]

    in your new popup window's source and that's it.

  5. #5
    Senior Member
    Join Date
    Mar 2000
    Posts
    103

    Smile

    a pop-up is a extra browser window appear on top of the default browser. The most comman seen popup is that small window that contain advertisement on some website.

    To elimelite the different color of the background, some people do use this "popup" technique.
    You can check on the tutorial on flashkit that will generate a pop up javascript and instruction of how you insert the code.
    http://www.flashkit.com/cgi-bin/links_tute/jump.pl?ID=8


    hope this will help.


    ------------------

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