![]() |
|
|
#11 | ||
|
Junior Member
Join Date: Mar 2009
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
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 | ||
|
Junior Member
Join Date: Mar 2009
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
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! |
||
|
|
|
![]() |
| Tags |
| dreamweaver cs4, flash cs4, scaling |
| Thread Tools | |
| Display Modes | |
|
|