580
Chapter 7: ActionScript for Flash
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc.onPress = function() {
this.startDrag();
};
target_mc.onRelease = function() {
this.stopDrag();
};
};
logo_mcl.addListener(mclListener);
logo_mcl.loadClip("http://www.macromedia.com/devnet/mx/blueprint/articles/
nielsen/spotlight_jnielsen.jpg", logo_mc);
See also
MovieClip.getDepth()
,
MovieClip.getInstanceAtDepth()
,
MovieClip.swapDepths()
MovieClip.getSWFVersion()
Availability
Flash Player 7.
Usage
my_mc
.getSWFVersion()
: Number
Parameters
None.
Returns
An integer that specifies the Flash Player version that was targeted when the SWF file loaded into
my_mc
was published.
Description
Method; returns an integer that indicates the Flash Player version for which
my_mc
was published.
If
my_mc
is a JPEG file, or if an error occurs and Flash can’t determine the SWF version of
my_mc
,
-1 is returned.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
The following ActionScript displays the Flash Player version for the SWF file and for a SWF file
that loads into a movie clip instance called
fp6_mc
.
trace(this.getSWFVersion()); // output: 7
fp6_mc.loadMovie("flashplayer6.swf");
my_btn.onRelease = function(){
trace("Loaded Flash Player " + fp6_mc.getSWFVersion() + " file.");
//output: Loaded Flash Player 6 file.
};
Содержание FLEX
Страница 1: ...Flex ActionScript Language Reference ...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0 ...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally ...
Страница 135: ...case 135 See also break default strict equality switch ...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while ...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in ...
Страница 808: ...808 Chapter 7 ActionScript for Flash ...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators ...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code ...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values ...
Страница 822: ...822 Index ...