My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* This code is part of the Bumpslide Library by David Knape
* http://bumpslide.com/
*
* Copyright (c) 2006, 2007, 2008 by Bumpslide, Inc.
*
* Released under the open-source MIT license.
* http://www.opensource.org/licenses/mit-license.php
* see LICENSE.txt for full license terms
*/
package {
import flash.utils.getTimer;
import flash.display.Loader;
import flash.net.URLRequest;

import com.bumpslide.ui.Applet;
import com.bumpslide.ui.Panel;

/**
* Barebones Panel Test - content is unare of the panel
*
* @mxmlc -sp+=../../classes -debug=true
* @author David Knape
*/
public class Demo_01_Panel extends Applet {

private var panel:Panel;
private var image:Loader;

override protected function addChildren():void {

// create panel with x=10, y=10
panel = new Panel();
panel.move(10, 10);

// load an image
image = new Loader();
image.load(new URLRequest('http://farm4.static.flickr.com/3053/2572693685_c5a3718e05.jpg'));

// put the image in the panel
panel.content = image;

// show the panel
addChild(panel);
}

// on stage resize, update the panel size
override protected function draw():void {
panel.setSize(width - 20, height - 20);
super.draw();
}
}
}
Show details Hide details

Change log

r70 by tkdave on Aug 14, 2008   Diff
- added spacing to grid/gridLayout
- updated examples
- some bugfixes
Go to: 
Project members, sign in to write a code review

Older revisions

r67 by tkdave on Aug 13, 2008   Diff
messing with component base class,
always bad news ;)
r58 by tkdave on Aug 11, 2008   Diff
working on example cleanup
All revisions of this file

File info

Size: 1264 bytes, 53 lines
Hosted by Google Code