-
Notifications
You must be signed in to change notification settings - Fork 117
Inconsistencies and bad documentation #20
Comments
Hey Robin, 2011/11/25 Robin Duckett <
maybe should clarify that a little bit more.
Best,
|
Hi Ibon, Thanks for your quick response. I've managed to get it working, the minified files are still producing errors for me, and I have figured out how to switch rendering by changing the javascript file depending on what I'm going for. More concerns:
var Scene;
var Director;
(function() {
function scene() {
Scene = Director.createScene();
var bg = new CAAT.ActorContainer()
.setBounds(0, 0, Director.width, Director.height)
.setFillStyle('#333');
Scene.addChild(bg);
var img = new CAAT.Actor()
.setBackgroundImage(Director.getImage('car1'));
Scene.addChild(img);
}
function init() {
Director = new CAAT.Director()
.initialize(700, 300, document.getElementById('gallery'))
.setClear(false);
Director.enableResizeEvents(CAAT.Director.prototype.RESIZE_WIDTH);
new CAAT.ImagePreloader().loadImages(
[
{id: 'car1', url: 'http://dark-car-wallpaper.carwallpapersdesktop.co.uk/images/street-car-wallpapers-3.jpg'},
{id: 'car2', url: 'http://dark-car-wallpaper.carwallpapersdesktop.co.uk/images/street-car-wallpapers-2.jpg'},
{id: 'car3', url: 'http://dark-car-wallpaper.carwallpapersdesktop.co.uk/images/street-car-wallpapers-1.jpg'}
],
function(counter, images) {
console.log(counter, images);
if (counter == images.length) {
Director.setImagesCache(images);
scene();
}
}
);
CAAT.loop(60);
}
init();
})(); Then after the page gets past 1760px wide, the background no longer gets set and it just appears while on the right hand side.
So for example if I wanted the above scene to have a 20px border on the left and right hand side, there is no way to do this currently? Or maybe I have just missed it again.
|
Hey Robin, regarding the px size limit i can (fortunately) say it doesn't seem to be a var con= new CAAT.ActorContainer(). scene.addActor(con); the only concern with this is that the bounds are defined for the current director.enableResizeEvents( about your js errors with different source files i can't figure them out. best 2011/11/25 Robin Duckett <
|
That's with caat-css-min.js - take off the -min and it works fine. Thanks for the resize tips! |
Hey Robin, When them both are the same, will close this issue, do you agree ? -ibon 2011/11/25 Robin Duckett <
|
yes :)
|
Uploaded and tested new caat library files. |
Just a quick request that your resizing info here be added to the tutorial. (The current resize tutorial page doesn't mention the callback) I searched around for almost an hour before finding this - seems like adjusting actors on resizing would be a fairly common thing. Thanks! |
You're right. |
Whilst I commend your efforts and am really eager to use this library, it's basically a non starter for me at this point since it just doesn't work.
The text was updated successfully, but these errors were encountered: