Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Scaling problems, Flash and Dreamweaver

Discussion in 'Website Coding & Programming Forum:' started by leanne, May 23, 2010.

  1. leanne

    leanne New Member

    Hello!

    I'm hoping someone can help me. I have designed a website for myself in Flash CS4 and am using Dreamweaver CS4 to upload it. I want my website to scale so that the background images fit any window size that it is opened in. In Flash the publish settings are currently set to Dimensions 100%, Scale Exact Fit; in Dreamweaver I am using the Exact Fit option in the properties inspector. When I publish it in Flash it fits the screen apart from a small, annoying white border. When I publish it in Dreamweaver, which is how it will look online, it does not scale at all and stays at 1024x768px.

    I've looked online and in books but I can't figure it out. I know it's possible as I've seen many websites that can do this.

    Any help would be great,

    Thanks Leanne
     
  2. b4bod

    b4bod New Member

    Hi,

    Have you got background images on your site, or is it just that when your .swf is set to 100%, its leaving a white border around the outside on the .html?

    Take a look at this....moock>> web>> flash>> fill the browser window

    I know its an ancient post, but its a problem I used to have, and this solved it

    Bod
     
  3. leanne

    leanne New Member

    Hi,

    Thanks for getting back to me. In my flash document the background images fit the stage with no border but when I publish it a border appears. I also need to know how to make it fit exactly in Dreamweaver, as this is how I'm uploading it.

    I'll try out what the tips suggested in that link.

    Leanne
     
  4. chris17

    chris17 New Member

    Hi,

    It might be easier to see the problem if you post the site, when you have uploaded it.
     
  5. rgregory

    rgregory Member

    This may be a long shot but it could be a default margin issue - have you tried resetting all margins to 0 within a CSS file?
     
  6. socreative

    socreative Member

  7. leanne

    leanne New Member

    Thanks socreative that video seems to be just what I need. It's not working for me quite yet because I think CS4 uses a newer version of action script, which doesn't let me add an identifier to the background image so I think I will need to look at this further and perhaps my coding will need some tweaking. Also, when I try and open the html file in text edit it is just blank but I'm not sure if this is because of the coding problems. I can only work on this in the evenings so I'll keep persevering this week and let you know how I get on.

    Leanne
     
  8. chris17

    chris17 New Member

    What are you coding in AS2 or AS3?
     
  9. leanne

    leanne New Member

    I'm using AS3.

    Leanne
     
  10. socreative

    socreative Member

  11. leanne

    leanne New Member

    socreative thanks for the AS3 code. I've just been trying to use it and I can't seem to get it to work (I know this will be something I'm doing wrong). Do I position the code in my actions timeline or the timeline for each background image? Do I need to link the background images to the Action Script? I have looked at the code and if I do it is not clear where to put the file names.

    Sorry but I find any code really confusing!!
     
  12. leanne

    leanne New Member

    This is the code I'm using at the moment:

    stage.scaleMode = StageScaleMode.NO_SCALE
    stage.align = StageAlign.TOP_LEFT;

    stage.addEventListener(Event.RESIZE,resized);
    function resized(ev:Event):void
    {
    var bmd:BitmapData = new tile(width, height);
    this.graphics.beginBitmapFill(bmd);
    this.graphics.drawRect(0,0,stage.stageWidth, stage.stageHeight);
    this.graphics.endFill();
    holder._x = Stage.stageWidth / 2;
    holder._y = Stage.stageHeight / 2;
    }

    resized(null);


    I'm getting an error message of 1126 Function does not have a body. I thought this was perhaps two of the lines don't end with a semi colon but when I add one that doesn't seem to solve it. Any ideas how to fix it? Also should this code be positioned in the Actions timeline or individually for each background image?

    Thanks!
     

Share This Page