Some time ago, Insus.net has implemented "MVC uses Flash to show pictures" Http://www.cnblogs.com/insus/p/3598941.html in the demo, it can also display Flash's SWF media file. But you have to download that swfobject.js component.
This time, insus.net wants to show you another way, MVC combined with jquery. You do not need to download any third-party falsh components.
You need to be under the MVC application,
Based on the #87 code in the previous
This openness of this way has certain limitations, through the efforts can be overcome. It also has a certain superiority. Unlike previously used memory searches and local modifications, this approach can be modified not only locally, but also completely recompiled without the limitation of file size. By and large, this approach can replace a lot of things, not just SWF, which can be applied from the server. Of course, caching is a problem, as mention
Some time ago, Insus. NET has implemented "MVC use Flash to show pictures" http://www.cnblogs.com/insus/p/3598941.html in the demo, it can also display Flash swf media files. But you have to download the swfobject. js component.
This time, Insus. NET wants to demonstrate another method, combining MVC with jQuery. You do not need to download any third-party falsh components.
In the MVC application,
According to the Code #87 in, we use the Acti
it in the format of [SWF (width = "1024", height = "768"] (FLEX), or directly set it in FLASH IDEVar offX: int = Math. floor (UIData. SCREEN_WIDTH-stage. stageWidth)/2 );Var offY: int = Math. floor (UIData. SCREEN_HEIGHT-stage.stageHeight)/2 );
// This refers to the main class. For the reason for this, seeThis. x = offX;This. y = offY;
// Internal UI adjustment. Here the adjustment is a Y value in the lower toolbar.MDownToolBar. y = stage. stageHeigh
/*The following php flash file generation code is from simple SWF file generation to Flash Animation file generation. Each instance is classic.*/// First enable PHP extension php_ming$ F = new swffont (_ sans );
$ T = new swftextfield ();$ T-> setfont ($ F );$ T-> setcolor (0, 0, 0 );$ T-> setheight (400 );$ T-> addstring (Hello world );
$ M = new swfmovie ();$ M-> setdimension (2500,800 );$ M-> Add ($ t );
$ M-> Save (hello.swf );?>
*****************
Flex retrieves parameters from the page url (Summary)
Flash Builder 4: http://g.csdn.net/5128184
I used to take notes on how flex transmits parameters to a page, flex can also pass parameters to the flex page through URLLoader + URLRequest + URLVariables in non-AmfPHP interaction with the background. The receiving parameters on the backend php end are very simple. Now we will discuss how the flex end processes the parameters transmitted from the page url.
There are a lot of articles on the Inte
browsers use the Netscape plug-in technology to play flash.
The following is a simple example of code for inserting flash into a webpage: replace 1.swf with your own Flash animation to display it.
Complete code:
2. Why should all the above labels be used? Can some labels be omitted?
The object tag is used in Windows ie3.0 and later browsers or other browsers that support ActiveX controls. The "classid" and "codebase" attributes must be exactly
not checked by default, it can be displayed normally. The method is very simple. Add the following sentence:
1
objectheight="100%"width="100%"border="0"classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
2
paramvalue="../../webapp/pig.swf"name="movie"/>
3
paramvalue="High"name="quality"/>
4
paramname="scale"value="noscale">
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 ne
interface adjustment.
Screenadjust (null );}
// 4.1 adjust sample instancePrivate function screenadjust (EVT: Event): void{
// Uidata. screen_width and uidata. screen_height indicate the compiled Flash width and height.
// You can set it in the format of [SWF (width = "1024", Height = "768"] (Flex), or directly set it in Flash ideVaR offx: Int = math. Floor (uidata. screen_width-stage. stagewidth)/2 );VaR offy: Int = math. Floor (uidata. SCREE
Function:1. Translate like a book2. Click the navigation button to flip the page3. A paging statement can be added anywhere. For example, the "directory" button in my source code isOn (release ){GotoPage (3)}4. Support for book turning of dynamic text5. Static or dynamic frames are optional during book turning.6. You can design the page in the whole way.7. The book thickness is displayed (reflecting the border of each page you have designed). You can modify the book thickness by settin
JQuery does not use plug-ins and swf to upload non-refreshing files. jqueryswf
File Upload is a common function for websites, such as the attachment or image upload function. There are also many solutions. Today we will introduce a new file upload method with no refreshing jQuery.
First, we put a form in the page to upload files:
Copy codeThe Code is as follows:Enctype = "multipart/form-data" target = "asyncTarget">
Then, put an iframe in the page and
/"+ DateTime.Now.Year +"-"+ DateTime.Now.Month +"-"+ DateTime.Now.Day +"/"; Directory.CreateDirectory (Path.getdirectoryname (Server.MapPath (dir)));//If there is no file directory, create.Fulldir = dir + OnLineBooks.App.Common.WebCommon.GetStreamMD5 (file. InputStream) + Fileext;//constructs a complete path, and takes the file stream the MD5 value as the file name, solves the file name duplicate question. File. SaveAs (Server.MapPath (Fulldir));//File SaveResponse.Write (Fulldir); }
FrameId ++;
}
}
// Add a new layer
// Tl. addNewLayer ();
// Name the action Layer
// Tl. layers [0]. name = "actions ";
// Add the first and last actions
// Tl. setSelectedFrames ([0, len-1, len-1], true );
// Tl. converttoblkkeyframes (1 );
// Tl. layers [0]. frames [0]. actionScript =
// "If (this ['cyc'] = null) {\ nthis ['cyc'] = false; \ nstop (); \ n} \ nif (! This ['cyc']) {\ nstop (); \ n }";
// Find the mc and add the class path link to it.
// Var li = lib. items [lib. findItemIndex (
move the whole, this time to break all the circle than the circle to convert the symbol and then copy is much smaller.
6, need to reuse the animation components, such as you have a bird from left to right, you want to replicate a few, this time the bird animation in the film clips than do in the graphic components in a lot smaller.
7, vector map is converted through the bitmap, such a vector map with too many color points, so that the flash file is very large.
8, bitmap transparent place too
This article illustrates the function usage of JS accessing SWF. Share to everyone for your reference. The specific analysis is as follows:
About Flash and JS call each other example has been said a lot, this is not a problem, of course, call error This is not flash and JS error, we today to completely solve the IE,FF and chrome between the incompatibility problem!
We know that in Flash, if you access the external JS function, just
The code is as 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.