Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Junior Member
    Join Date
    Mar 2009
    Posts
    22
    Thanks
    0
    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!!

  2. #12
    Junior Member
    Join Date
    Mar 2009
    Posts
    22
    Thanks
    0
    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!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Flash CS4 scaling query
    By leanne in forum Website Coding & Programming Forum:
    Replies: 12
    Last Post: 06-18-2010, 09:49 AM
  2. Illustrator pattern swatches - scaling
    By MattBlack in forum Adobe Forum:
    Replies: 2
    Last Post: 03-02-2010, 11:30 AM
  3. IE Nav Bar problems
    By Connor in forum Website Coding & Programming Forum:
    Replies: 2
    Last Post: 10-23-2009, 12:56 AM
  4. More CSS Problems...
    By MarkS in forum Website Coding & Programming Forum:
    Replies: 1
    Last Post: 04-28-2009, 11:33 AM
  5. Scaling swf in Dreamweaver
    By leanne in forum Website Design Forum:
    Replies: 2
    Last Post: 03-26-2009, 01:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •