Scaling problems, Flash and Dreamweaver


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
 

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
 

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?
 

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
 

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!!
 

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!
 
Top