1 | /*
|
---|
2 | * SoundManager 2 + useFlashBlock
|
---|
3 | * Flash positioning and flashblock / clicktoflash handling
|
---|
4 | */
|
---|
5 |
|
---|
6 | #sm2-container {
|
---|
7 | /*
|
---|
8 | * where the SM2 flash movie goes. by default, relative container.
|
---|
9 | * set relative or absolute here, and don't touch it later or bad things will happen (see below comments.)
|
---|
10 | */
|
---|
11 | position: absolute;
|
---|
12 | width: 1px;
|
---|
13 | height: 1px;
|
---|
14 | overflow: hidden;
|
---|
15 | /* screw IE 6, just make it display nice */
|
---|
16 | _overflow: hidden;
|
---|
17 | }
|
---|
18 |
|
---|
19 | #sm2-container object,
|
---|
20 | #sm2-container embed {
|
---|
21 | /*
|
---|
22 | * the actual SWF movie bit.
|
---|
23 | * important: The SWF needs to be able to be moved off-screen without display: or position: changes.
|
---|
24 | * changing display: or position: or overflow: here or on parent can cause SWF reload or other weird issues after unblock
|
---|
25 | * e.g., SM2 starts but strange errors, no whileplaying() etc.
|
---|
26 | */
|
---|
27 | width: 48px;
|
---|
28 | height: 48px;
|
---|
29 | /* some flash blockers may also respect this rule */
|
---|
30 | max-width: 48px;
|
---|
31 | max-height: 48px;
|
---|
32 | }
|
---|
33 |
|
---|
34 | #sm2-container.swf_timedout {
|
---|
35 | /* expand to show the timed-out SWF content */
|
---|
36 | position: relative;
|
---|
37 | width: 48px;
|
---|
38 | height: 48px;
|
---|
39 | }
|
---|
40 |
|
---|
41 | #sm2-container.swf_timedout,
|
---|
42 | #sm2-container.swf_timedout object,
|
---|
43 | #sm2-container.swf_timedout embed {
|
---|
44 | /*
|
---|
45 | * when SM2 didn't start normally, time-out case. flash blocked, missing SWF, no flash?
|
---|
46 | * 48px square flash placeholder is typically used by blockers.
|
---|
47 | */
|
---|
48 | min-width: 48px;
|
---|
49 | min-height: 48px;
|
---|
50 | }
|
---|
51 |
|
---|
52 | #sm2-container.swf_unblocked {
|
---|
53 | /* SWF unblocked, or was never blocked to begin with; try to collapse container as much as possible. */
|
---|
54 | width: 1px;
|
---|
55 | height: 1px;
|
---|
56 | }
|
---|
57 |
|
---|
58 | #sm2-container.swf_loaded object,
|
---|
59 | #sm2-container.swf_loaded embed,
|
---|
60 | #sm2-container.swf_unblocked object,
|
---|
61 | #sm2-container.swf_unblocked embed {
|
---|
62 | /* hide flash off-screen (relative to container) when it has loaded OK */
|
---|
63 | left: -9999em;
|
---|
64 | top: -9999em;
|
---|
65 | }
|
---|
66 |
|
---|
67 | #sm2-container.swf_error {
|
---|
68 | /* when there is a fatal error (flash loaded, but SM2 failed) */
|
---|
69 | display: none;
|
---|
70 | }
|
---|
71 |
|
---|
72 | #sm2-container.high_performance,
|
---|
73 | #sm2-container.high_performance.swf_timeout {
|
---|
74 | /* "high performance" case: keep on-screen at all times */
|
---|
75 | position: absolute;
|
---|
76 | position: fixed;
|
---|
77 | }
|
---|
78 |
|
---|
79 | #sm2-container.high_performance {
|
---|
80 | overflow: hidden;
|
---|
81 | _top: -9999px; /* IE 6 hax, no position:fixed */
|
---|
82 | _left: -9999px;
|
---|
83 | bottom: 0px;
|
---|
84 | left: 0px;
|
---|
85 | /*
|
---|
86 | * special case: show at first with w/h, hide when unblocked.
|
---|
87 | * might be bad/annoying.
|
---|
88 | * try to stay within ClickToFlash "invisible" limits (so it won't be blocked.)
|
---|
89 | */
|
---|
90 | z-index: 99; /* try to stay on top */
|
---|
91 | }
|
---|
92 |
|
---|
93 | #sm2-container.high_performance.swf_loaded,
|
---|
94 | #sm2-container.high_performance.swf_unblocked {
|
---|
95 | z-index: auto;
|
---|
96 | }
|
---|
97 |
|
---|
98 | #sm2-container.high_performance.swf_loaded,
|
---|
99 | #sm2-container.high_performance.swf_unblocked,
|
---|
100 | #sm2-container.high_performance.swf_unblocked object,
|
---|
101 | #sm2-container.high_performance.swf_unblocked embed {
|
---|
102 | /*
|
---|
103 | * 8x8px is required minimum to load in fx/win32 in some cases(?)
|
---|
104 | * 6x6+ good for fast performance, even better when on-screen via position:fixed
|
---|
105 | * also, clickToFlash (Safari <5.1) may auto-load "invisible" SWFs at this size
|
---|
106 | */
|
---|
107 | height: 8px;
|
---|
108 | width: 8px;
|
---|
109 | }
|
---|
110 |
|
---|
111 | #sm2-container.high_performance.swf_loaded {
|
---|
112 | /* stay bottom/left */
|
---|
113 | top: auto;
|
---|
114 | bottom: 0px;
|
---|
115 | left: 0px;
|
---|
116 | }
|
---|
117 |
|
---|
118 | #sm2-container.high_performance.swf_loaded object,
|
---|
119 | #sm2-container.high_performance.swf_loaded embed,
|
---|
120 | #sm2-container.high_performance.swf_unblocked object,
|
---|
121 | #sm2-container.high_performance.swf_unblocked embed {
|
---|
122 | /* high-performance case must stay on-screen */
|
---|
123 | left: auto;
|
---|
124 | top: auto;
|
---|
125 | }
|
---|
126 |
|
---|
127 | #sm2-container.high_performance.swf_timedout {
|
---|
128 | z-index: 99; /* try to stay on top */
|
---|
129 | } |
---|