The movieclip printing problem that has plagued me for many days has finally been solved. After converting a PDF file to a SWF file, the user can still print the file (that is, print the SWF file) after obtaining authorization! It is a happy thing. "There is no difficulty in the world, but you are afraid of people." As long as you focus on any problem, you can solve it step by step.
My print function implementation:
I have solved the problem of
Today, I have implemented the movieclip Moving position function for loading, including the top, bottom, left, right move function, full container function, restore initial position function, and the mouse drag and drop function. However, the mobile location function still has a problem:The zooming of the vertical scroll bar cannot be controlled! (I have not found the correct control object yet)
It took a lot of time to solve the problem of moving th
After several years of development, as3 has completely evolved into an object-oriented (dynamic) language. However, many books about as3 often only pay attention to the as3 language itself, but it diluted how to work with Flash IDE.
1. On the flash timelineCodeCreate a movieclip instance defined in the external as file?
Assume that there is a myclip. As file externally with the following content:
Package {import flash. display.
Below comesSprite, We have dealt with the most containers in this 3.0. In a word, it removes the movieclip (that is, the castrated movieclip) of the timeline ). As I mentioned in the example at the beginning, if we only want to create a containerSpriteIs the first choice. We can even say that more than 90% of our code-writing developers only needSpriteDeal. Movieclip
Object expands the new method under the MovieClip object, and all the movie clips below it benefit automatically.
Expansion of the image method:
ActionScript does not have the syntax to flip a movie clip horizontally, now using a prototype to expand a method,
Movieclip.prototype.flipx=function () {
This._xscale=-this._xcale;
}
Any movie clip can use this method to flip horizontally.
Syntax: Movie clips. flipx ();
Control all the right image
W
SWF keyword highlighted display effect:
In the previous article, I have introduced the basic idea and reprinted the key of keyword query display.Code. These are not repeated! I will release the source code at the end. I want to write about the problems and solutions I encountered during implementation -- solve the problem that keywords cannot be highlighted during movieclip frame switching.
Problem description/description:
1. after the tex
Class Border extends MovieClip {
Private var borderClip: MovieClip;
Public var x: Number;
Public var y: Number;
Public var width: Number;
Public var height: Number;
Public function Border (){
CreateEmptyMovieClip ("borderClip", 1000 );
X = this. _ x;
Y = this. _ y;
Width = this. _ width;
Height = this. _ height;
}
Public function makeBorder (): Void {
With (borderClip ){
LineStyle (0, 0xff0000, 100 );
Begin
I believe that many people, like me, will be very curious to see that the familiar duplicatemovieclip and attachmovieclip have been removed (removed) in as3, how can I implement the "simple" function of copying MC in as3?
The clue given in the help is that the movieclip constructor is used to implement this function. This sentence seems like a mystery. How can a constructor have such a function?
So I tried to create a component in the scenario and ope
Create | dynamic | mouse
How to specify mouse events for dynamically created MovieClip
1. Under normal circumstances, you can specify an event directly by setting the event handler, and here is an example
IMAGEMC = Maincontainer.createemptymovieclip ("Imagemc", 1);With (IMAGEMC){MoveTo (0,0);LineStyle (1,0XFFFF00);Beginfill (0x00ff00,60);LineTo (400,0);LineTo (400,100);LineTo (0,100);}Imagemc.onrelease = function () {Trace ("AAA");}
2. If the
The problem is that different versions of swf are released and versions are incompatible.
How to obtain the number of frames for external SWF loading in AS3
I want to copy B. SWF in a.swfand get B. swf's current frame and total frame number, and display B. SWF playback in a schedule.
But the number of frames cannot be obtained to B .swf
My code is as follows:
Import flash. display .*;Import flash. events .*;Import flash.net. URLRequest;
// Variable DeclarationVar contentSwf:
During the development process, you may need to jump from one interface to another, for example, the Window jump in the software, the page Jump in Web development... but in the Flash world: there are only frames and no windows and pages. Therefore,
Although it is not difficult to use AS to adjust the color, brightness, gray level, saturation, contrast, and inversion of an image, it is a little troublesome to use because it involves the color matrix of ColorMatrixFilter, therefore, the ColorProperty class is written.
This class extends the MovieClip class and adds these attributes to MovieClip:
Color: _ colorBrightness: _ brightnessGrayscale: _ graysc
left mouse button is released.MouseMove: This event occurs when the mouse moves.Keydown: This event occurs when the keyboard button is pressed.Keyup: This event occurs when the keyboard button is released.Data: Use the loadVariable or loadMovie action. This event occurs when Data is received.
MovieClip (object)The MC object method specifies some standard actions to operate the MC object. In addition, additional functions other than the standard actio
half.
Math.sqrt2 it as 1. 414213562373, take the square root of 2.
Math.tan Tangent
Maxscroll Max Scrolling
Mbchr the number of bytes converted to the ASCI code
Mblength the length of multiple bytes
Mbord converts this word as a multi-byte number
Mbsubstring (Value,index,count) removes a new substring from a string
Object.Method = function ([parameters]) methods
Mouse (object) mouse * * CAN
Mouse.addlistener Mouse to increase monitoring
Mouse.hide Mouse Hide
Mouse.onmousedown under the mouse pr
Flash as 3.0 keyboard control codePackage sxl {// package path, that is, create an sxl folder, which contains the MainMap. as fileImport flash. display. Sprite; // display object containerImport flash. display. MovieClip; // you need to attach coordinates and other attributes to the block, so select it.Import flash. display. DisplayObject; // you can see it for yourself.Import flash. text. TextField;Import flash. events. Event;Import flash. events. Mo
Generally, we can determine whether the two instance objects are of the same type. We can use typeof to obtain the object type and then compare them with the = sign.
Typeof applies to native types.
For user-defined types, although typeof obtains all objects, there is a stronger trick: getqualifiedclassname
The native function can be used to obtain the real types of the two instances.
However, when running the SWF created by Flash Professional, you need to know whether the two
sprite class or its subclass (such as movieclip)
Public class documentclassexample extends Sprite
{
VaR var1 = 5
Function documentclassexample ()
{
Trace (stage. numchildren) // 1
Trace (stage. getchildat (0) // [object documentclassexample]
}
}
}
The output information tells us that there is only one display object under the stage. This Display object is no longer a root, but an instance of the DocumentClassExample class, that is, root is replaced.
1. In the control scenario, the movieclip drawn by flash needs to use addchild () to add the Instance name of the movieclip you want to control to the Screen Management display list, in this way, your document class can control the movieclip drawn by flash. If there is a movieclip of mc1 in flash, there is a
Author: Ric Ewing Translator: chenlei5211 (flashmeng)
In the past, Macromedia Flash had some limitations when you tried to depict some effects. In some complex applications, ActionScript restricted developers' creativity. Now, Macromedia Flash MX's built-in drawing tools are capable of almost all the painting tasks. When you work with ActionScript, the effect is astonishing.This article is explained in conjunction with the original file. when reading this article, it will be more advantageous f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.