Avatar billede joch Nybegynder
04. april 2002 - 11:57 Der er 14 kommentarer og
1 løsning

Hente symboler fra anden *.swf

Hvis man har to *.swf filer i en mappe - kan man så hente et symbol fra den ene og bruge i den anden?

D.v.s. Jeg ønsker at bruge symbolet "logo" fra fil_1.swf i fil_2.swf

... John
Avatar billede wilweb Nybegynder
04. april 2002 - 12:01 #1
Hvorfor åbner du ikke bare fil_1.fla Open as library og tager hvad du skal bruge i fil_1.fla library til fil_2.fla?
Avatar billede joch Nybegynder
04. april 2002 - 12:12 #2
Jeg vil lave en historie i to dele som man kan downloades. For at gøre min download nummer to mindre, vil jeg genbruge baggrunde fra nr. et! - og jeg ønsker ikke de skal ligge løse som *.jpg i mappen!!!
Avatar billede pixelpaw Nybegynder
04. april 2002 - 12:31 #3
dette er fra Flash hjælpen:

Working with runtime shared assets

Using runtime shared library assets involves two procedures: First, the author of the source movie defines a shared asset in the source movie, and enters an identifier string for the asset and a URL where the source movie will be posted.

Second, the author of the destination movie defines a shared asset in the destination movie and enters an identifier string and URL identical to those used for the shared asset in the source movie. Alternatively, the destination movie author can drag the shared assets from the posted source movie into the destination movie library.

In either scenario, the source movie must be posted to the specified URL in order for the shared assets to be available for the destination movie.


Defining runtime shared assets in a source movie

You use the Symbol Properties dialog box or the Linkage Properties dialog box to define sharing properties for an asset in a source movie, to make the asset accessible for linking to destination movies.


To define a runtime shared asset in a source movie:

1
With the source movie open, choose Window > Library to display the Library panel.

2
Do one of the following:

Select a movie clip, button, or graphic symbol in the Library panel and choose Properties from the Library options menu. Click the Advanced button to expand the Properties dialog box.

Select a font symbol, sound, or bitmap and choose Linkage from the Library options menu.

3
For Linkage, select Export for Runtime Sharing to make the asset available for linking to the destination movie.

4
Enter an identifier for the symbol in the Identifier text field. Do not include spaces. This is the name Flash will use in identifying the asset when linking to the destination movie.

Note: The Linkage Identifier is also used by Flash to identify a movie clip or button that is used as an object in ActionScript. See Working with Movie Clips and Buttons.

5
Enter the URL where the SWF file containing the shared asset will be posted.

6
Click OK.

When you publish the movie, you must post the SWF file to the URL specified in step 5, so that the shared assets will be available to destination movies.




Linking to runtime shared assets from a destination movie

You use the Symbol Properties dialog box or the Linkage Properties dialog box to define sharing properties for an asset in a destination movie, to link the asset to a shared asset in a source movie. If the source movie is posted to a URL, you can also link a shared asset to a destination movie by dragging the asset from the source movie to the destination movie.

You can turn off sharing for a shared asset in the destination movie, to embed the symbol in the destination movie.


To link a shared asset to a destination movie by entering the identifier and URL:

1
In the destination movie, choose Window > Library to display the Library panel.

2
Do one of the following:

Select a movie clip, button, or graphic symbol in the Library panel and choose Properties from the Library options menu. Click the Advanced button to expand the Properties dialog box.

Select a font symbol and choose Linkage from the Library options menu.

3
For Linkage, select Import for Runtime Sharing to link to the asset in the source movie.

4
Enter an identifier for the symbol in the Identifier text field that is identical to the identifier used for the symbol in the source movie. Do not include spaces.

5
Enter the URL where the SWF source file containing the shared asset is posted.

6
Click OK.




To link a shared asset to a destination movie by dragging:

1
In the destination movie, choose File > Open or Open as Library.

2
In the Open or Open as Library dialog box, select the source movie and click Open.

3
Drag the shared asset from the source movie Library panel into the Library panel or onto the Stage in the destination movie.




To turn off linkage for a symbol in a destination movie:

1
In the destination movie, select the linked symbol in the Library panel and do one of the following:

If the asset is a movie clip, button, or graphic symbol, choose Properties from the Library options menu.

If the asset is a font symbol, choose Linkage from the Library options menu.

2
In the Symbol Properties dialog box or the Linkage Properties dialog box, deselect Import for Runtime Sharing.

3
Click OK.
Avatar billede pixelpaw Nybegynder
04. april 2002 - 12:32 #4
200 point er nok lige i overkanten
Avatar billede wilweb Nybegynder
04. april 2002 - 12:37 #5
Hvad fylder dine filer? et logo til web kan da umuligt gøre udslaget!
Avatar billede pixelpaw Nybegynder
04. april 2002 - 12:46 #6
joch, jeg lavede for et stykke tid siden et spil der brugte denne metode til de forskellige baner. Det er helt klart en fordel i størrelsen af filerne, MEN du kan ikke medregne størrelsen af filer der bliver importeret, det vil sige at en preload kan give problemer. Men hvis du er helt sikker på at brugeren har hentet den swf fil symbolerne ligger i, så er det ikke noget problem.
Avatar billede joch Nybegynder
04. april 2002 - 12:58 #7
Hej pixelpaw

Tak for hjælpen - Jeg skal lige have arbejdet mig igennem den.
Kan man godt give filen en URL linkage C:/MinHistorie ???

P.s. 200 point er måske en del - men jeg vidste ikke hvor krævende det var - og så skulle jeg hurtigt videre
Avatar billede pixelpaw Nybegynder
04. april 2002 - 13:09 #8
URL'en må ikke være som et dir, med mindre du kender den rigtige sti på serveren.
/flashfiles/mylib.swf
eller noget i den stil
Avatar billede pixelpaw Nybegynder
04. april 2002 - 13:10 #9
du får lige 100 point tilbage:

http://www.eksperten.dk/spm/193589
Avatar billede joch Nybegynder
04. april 2002 - 14:24 #10
Takker - Men jeg har lige lidt problemer med at få det til at køre...

Skal jeg ikke nøjes med at i filen fil01.swf at skrive /flashfiles/ i linkage

... og så i fil02.swf også skrive /flashfiles/fil01.swf ???

Jeg kan ikke få det til at virke ....
Avatar billede pixelpaw Nybegynder
05. april 2002 - 04:09 #11
heh, det kniber lidt med hukommelsen, jeg ser på det i morgen
Avatar billede joch Nybegynder
05. april 2002 - 08:13 #12
Jeg har downloadet et eksempel fra Macromedia - Det virker også, men... Jeg kan ikke rette i den shared fil og så få det til at virke!!!

Jeg ved godt hvor jeg falder af.. tror jeg! (Open as Shared Library) Hvor finder jeg det???
Avatar billede wilweb Nybegynder
05. april 2002 - 08:21 #13
SÅMENT I
FIL MENU! (øverest venstre hjørne)
Avatar billede joch Nybegynder
05. april 2002 - 08:31 #14
Takker - Fandt den selv - Den hedder jo bare ikke "open as shared"... Nogen gange, når tingene ikke vil virke, får man bare set sig blind på de små ting...

Jeg har også fået det hele til at virke nu - Takker alle for hjælpen

/John
Avatar billede wilweb Nybegynder
05. april 2002 - 08:58 #15
Det er fordi du sidder med MX, at den ikke hedder "open as shared"... for det gør den i Flash5.
Godt du kunne bruge det!
Gizom:>
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester