To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash 8

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 11-24-2009, 10:56 AM   #1
pointguard
...dishing dimes on an .fla!
 
pointguard's Avatar
 
Join Date: Dec 2001
Location: Cambridgeshire, England
Posts: 1,017
[as2] external image tiled background [help please!]

Hi...

I've run into a bit of a small -ish prolem.
I'm using my trusty tiled background code which tiles an image in my library, with the linkage name of 'tile'.
PHP Code:
    var tile:BitmapData = BitmapData.loadBitmap("tile");
    
_parent.tileMC.beginBitmapFill(tile);
    
_parent.tileMC.moveTo(0, 0);
    
_parent.tileMC.lineTo(Stage.width, 0);
    
_parent.tileMC.lineTo(Stage.width, 4000);
    
_parent.tileMC.lineTo(0, 4000);
    
_parent.tileMC.lineTo(0, 0);
    
_parent.tileMC.endFill();
};
I know there must be a way to have the original image loaded via xml, so it can be chnaged quickly if necessary without opening up flash.
I've got my xml set up so it loads the tile jpeg into a variable called '_parent.BgdImage', and have tried this as my code to tile that, but I get no joy!
PHP Code:
    var tile:BitmapData = BitmapData.loadBitmap(_parent.BgdImage);
    
tile.draw(_parent.BgdImage);
    
_parent.tileMC.beginBitmapFill(tile);
    
_parent.tileMC.moveTo(0, 0);
    
_parent.tileMC.lineTo(Stage.width, 0);
    
_parent.tileMC.lineTo(Stage.width, 4000);
    
_parent.tileMC.lineTo(0, 4000);
    
_parent.tileMC.lineTo(0, 0);
    
_parent.tileMC.endFill();
};
Does anyone have any ideas on where to go from here. Thought this would be a simple thing...

Cheers for any advice offered
Jeff
pointguard is offline   Reply With Quote
Old 11-24-2009, 12:00 PM   #2
nstanziani
Member
 
Join Date: Nov 2009
Location: Philadelphia
Posts: 40
I would trace _parent.BgdImage to see if it is really grabbing the data. I bet your variable is not set correctly.
__________________
- Nick Stanziani

pls support: www.whowantsacookie.com

My site: pebcak
nstanziani is offline   Reply With Quote
Old 11-24-2009, 07:35 PM   #3
pointguard
...dishing dimes on an .fla!
 
pointguard's Avatar
 
Join Date: Dec 2001
Location: Cambridgeshire, England
Posts: 1,017
Quote:
Originally Posted by nstanziani View Post
I would trace _parent.BgdImage to see if it is really grabbing the data. I bet your variable is not set correctly.

Yes, thanks...it does grab the data fine from the xml. I've already traced it out to make sure...
I'm not sure if you can take an image file externally and load the bitmapData in this way I'm trying...does anyone know if you can?
pointguard is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash 8

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:44 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.