Load Movie

7 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€64.91
List Price:  €92.74
You save:  €27.82
£55.84
List Price:  £79.77
You save:  £23.93
CA$95.73
List Price:  CA$136.76
You save:  CA$41.03
A$105.88
List Price:  A$151.27
You save:  A$45.38
S$94.74
List Price:  S$135.35
You save:  S$40.60
HK$546.74
List Price:  HK$781.10
You save:  HK$234.35
CHF 63.47
List Price:  CHF 90.67
You save:  CHF 27.20
NOK kr758.86
List Price:  NOK kr1,084.13
You save:  NOK kr325.27
DKK kr484.32
List Price:  DKK kr691.91
You save:  DKK kr207.59
NZ$116.44
List Price:  NZ$166.35
You save:  NZ$49.91
د.إ257.06
List Price:  د.إ367.25
You save:  د.إ110.18
৳8,192.12
List Price:  ৳11,703.53
You save:  ৳3,511.41
₹5,845.24
List Price:  ₹8,350.71
You save:  ₹2,505.46
RM331.19
List Price:  RM473.15
You save:  RM141.96
₦101,684.97
List Price:  ₦145,270.47
You save:  ₦43,585.50
₨19,468.63
List Price:  ₨27,813.52
You save:  ₨8,344.89
฿2,574.93
List Price:  ฿3,678.63
You save:  ฿1,103.70
₺2,254.33
List Price:  ₺3,220.61
You save:  ₺966.27
B$360.86
List Price:  B$515.53
You save:  B$154.67
R1,285.96
List Price:  R1,837.17
You save:  R551.20
Лв126.94
List Price:  Лв181.36
You save:  Лв54.41
₩95,732.56
List Price:  ₩136,766.67
You save:  ₩41,034.10
₪261.33
List Price:  ₪373.34
You save:  ₪112.01
₱4,047.59
List Price:  ₱5,782.52
You save:  ₱1,734.93
¥10,909.97
List Price:  ¥15,586.34
You save:  ¥4,676.37
MX$1,171.54
List Price:  MX$1,673.70
You save:  MX$502.16
QR255.51
List Price:  QR365.03
You save:  QR109.52
P951.34
List Price:  P1,359.12
You save:  P407.77
KSh9,168.69
List Price:  KSh13,098.69
You save:  KSh3,930
E£3,292.89
List Price:  E£4,704.33
You save:  E£1,411.44
ብር4,020.45
List Price:  ብር5,743.75
You save:  ብር1,723.29
Kz58,375.85
List Price:  Kz83,397.65
You save:  Kz25,021.80
CLP$64,835.23
List Price:  CLP$92,625.73
You save:  CLP$27,790.50
CN¥506.35
List Price:  CN¥723.39
You save:  CN¥217.04
RD$4,074.29
List Price:  RD$5,820.67
You save:  RD$1,746.37
DA9,399.01
List Price:  DA13,427.73
You save:  DA4,028.72
FJ$158.92
List Price:  FJ$227.04
You save:  FJ$68.12
Q544.02
List Price:  Q777.21
You save:  Q233.18
GY$14,649.16
List Price:  GY$20,928.27
You save:  GY$6,279.10
ISK kr9,756.60
List Price:  ISK kr13,938.60
You save:  ISK kr4,182
DH701.90
List Price:  DH1,002.76
You save:  DH300.86
L1,242.81
List Price:  L1,775.52
You save:  L532.71
ден3,996.50
List Price:  ден5,709.54
You save:  ден1,713.03
MOP$563.52
List Price:  MOP$805.07
You save:  MOP$241.54
N$1,287.85
List Price:  N$1,839.87
You save:  N$552.01
C$2,577.61
List Price:  C$3,682.46
You save:  C$1,104.85
रु9,354.77
List Price:  रु13,364.54
You save:  रु4,009.76
S/258.41
List Price:  S/369.18
You save:  S/110.76
K271.72
List Price:  K388.19
You save:  K116.47
SAR262.50
List Price:  SAR375.02
You save:  SAR112.51
ZK1,916.71
List Price:  ZK2,738.27
You save:  ZK821.56
L323.04
List Price:  L461.50
You save:  L138.46
Kč1,610.16
List Price:  Kč2,300.33
You save:  Kč690.17
Ft25,114.33
List Price:  Ft35,879.15
You save:  Ft10,764.82
SEK kr760.20
List Price:  SEK kr1,086.05
You save:  SEK kr325.84
ARS$61,800.59
List Price:  ARS$88,290.35
You save:  ARS$26,489.75
Bs483.82
List Price:  Bs691.20
You save:  Bs207.38
COP$272,193.39
List Price:  COP$388,864.37
You save:  COP$116,670.97
₡35,883.99
List Price:  ₡51,265.04
You save:  ₡15,381.05
L1,730.53
List Price:  L2,472.30
You save:  L741.76
₲524,817.92
List Price:  ₲749,772.03
You save:  ₲224,954.10
$U2,694.96
List Price:  $U3,850.11
You save:  $U1,155.14
zł278.08
List Price:  zł397.28
You save:  zł119.19
Already have an account? Log In

Transcript

Hello, Aruba media welcomes you to one more useful tutorial. You know, we are able to tell flash to play a movie clip without placing it on the timeline. That's right, and it only takes a few lines of ActionScript. In this tutorial, you will learn how to use ActionScript to load a movie clip from another Flash file library. Let's get started out of the two in the first file, we will create the movie clip animation. Start by creating a new flash document.

In this we are using the default document size. You can modify it as per your needs. Name the layer as object. This is the layer where we will work on the animation. Draw a circle and press f8 to convert it into a movie clip. Let's create a simple animation for this circle.

The main thing we will focus on is the ActionScript. That's the file and save it as animation. You can think of your own animation if you want to experiment again, hit Ctrl plus Enter to export the SWF of animation name. This SWF can be found on the same path, where the actual Flash file is saved. This SWF will be called in another Flash file. So take another new file in Flash with ActionScript 3.0.

Save this file to at the same location where the previous animation file is located. Name this file load underscore movie. Currently, this file is totally blank. To load the previous animation, the first thing we need here is a container. named the layer as container. insert a new empty movie clip and name it container.

This movie clip is dynamically created in the Documents Library. So open the library by Ctrl plus L and place that container movie clip on stage. This movie clip is completely empty. So you will just notice its registration point. For both the Flash files, we use the default document size which is the same for both. Now to call that circle animation at the same placement, where it is placed in its own file.

We will have to place this empty movie clip registration point add zero axes that means for that container the movie clips x&y position should be zero. So let's do it. Select this movie clip and put x equal to zero, y equal to zero. You can see its position now. give it an instance name as well as this movie clip plays a role of the container, which we will need in ActionScript. Give the instance name as container underscore MC.

Add a new layer for the action script, name it actions and press f9 on its frame for the action panel. Now the first thing we need is the loader on which the external content will load and display. So get a variable for it. Variable LDR will be the loader next thing we will need is the URL Have the SWF file, we need to display ActionScript file, and the SWF file is on the same folder path. So for here, we will only put the file name of the animation, along with its extension, add a variable for the URL and put the file name here. Animation dot SWF.

One last variable we need here is of the URL request. This URL request sends a request to load that file on the given URL path. in brackets, assign the URL value on which the URL request will be sent. Now, let's add a last action script for the loader where the actual request URL request will be sent to call the SWF file on the about given URL path. So what all we added is one A loader, which loads the data from a URL to a URL, where the actual file is located. And three, a URL request.

This prepares or sends a request to the URL to load. And here a script for the about loader to play the animation dot SWF through the URL after the URL request is sent. hope you understood the connection between all these variables and the script. This animation will be placed inside the container movie clip. So add a script for it. Add child will assign loaders value to this container underscore MC.

In order to display an object on the screen, we need to use the Add child method our scripting part is done. Let's face the movie Control plus enter. Circle animation from the animation file is playing in the load underscore movie action script file. This output is viewed only when the SWF is published. The circle animation is also playing at the same placement as in its original file. Save your file.

Now for a change. Let's see what happens if we vary the position of the container movie clip on the stage x equal to 250 y equal to 250. Of course, you will notice the position of the container changes and according to that, you will also get this circle animation position changed. Using this technique, you can place your animation at any position. We are finished with this tutorial, but there are several reasons and you uses to load external SWF files. For example, multiple files can be combined in one single file, even if they are handled on separate FLV files.

A heavy project can be divided into multiple files, and one individual SWF file can bring it together as an SWF file loads faster. Thank you for watching this tutorial.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.