Toon posts:

Flash Validation

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Via W3C mijn pagina gevalideerd. En zoals altijd de flash aangepast volgens de pagina van "A List Apart" http://alistapart.com/articles/flashsatay

Al mijn flash annimatie waren tot op heden van een formaat dat onderstaande niet nodig was. Nu heb ik echter een grotere gemaakt en zou een pre-load op zijn plaats zijn. Dus aan de slag met het onderstaande verhaal. Alleen krijg ik het niet voor elkaar. Als ik ga zoeken op internet vind ik telkens dezelfde uitleg een-op-een gekopieerd van deze site. Weet iemand of dit verhaal ergens staat omschreven voor rookies. :?
The container movie
I created a new Flash movie and put the following ActionScript on Frame 1 right in the root of the movie:

_root.loadMovie(_root.path,0);
This instructs the Flash Player to load a movie, whose name is in the variable path on the root, into Level 0 of the current movie. All we need to do is make sure that the name of the movie we want to load is held in the variable called path.

Flash makes this part easy. The Flash Player loads any name/value pairs that are passed to a Flash movie on a query string into the root of the movie. This is useful for many different applications, but in our case it means that we just need to call the movie like this:

c.swf?path=movie.swf
The container movie is c.swf. I’m passing it a variable called path with a value of movie.swf. This means that our ActionScript, when evaluated, would equate to this:

_root.loadMovie("movie.swf",0);
You can modify the behavior of the container movie to do whatever you like—as long as it’s kept small. You can use GET and POST to pass variables through the container if you need to, for example. This method, however, will only work well if the container movie is just a few kilobytes in size.
Alvast bedankt

Acties:
  • 0 Henk 'm!

  • Bozozo
  • Registratie: Januari 2005
  • Laatst online: 20-02 16:10

Bozozo

Your ad here?

Gebruik je AS2 of AS3?

Deze uitleg lijkt me AS2, waarschijnlijk moet je enkel _root vervangen door stage voor AS3. Maar voor mij is AS2 zo lang geleden dat ik wellicht onzin aan het verkopen ben O-)


edit:
Flash CS3 AS3 help, topic "AS2 migration":
AS2AS3Comments
loadMovie()flash.display.LoaderUse the Loader class instead.
Dus verdiep je even in de Loader class. Of die query strings werkt kun je zelf trouwens makkelijk nagaan met een debug textboxje ofzo.

[ Voor 50% gewijzigd door Bozozo op 21-12-2008 12:29 ]

TabCinema : NiftySplit


Acties:
  • 0 Henk 'm!

  • Tsjilp
  • Registratie: November 2002
  • Niet online

Tsjilp

RS[I]ds

Het is AS2 zo te zien, wat je moet doen is:

1. Nieuwe flash fla aanmaken
2. Op de tijdlijn op frame 1 _root.loadMovie(_root.path,0); zetten
3. Save (c.swf) & run. (Je ziet niets).

4. In de html van je pagina embed je nu deze nieuwe movie (c.swf), ipv je bestaande
5. Als url van de nieuwe movie geef je c.swf?path=[naamvanjeeigenswf].swf

In de nieuwe swf wordt nu de swf ingeladen die je als get parameter (path) meegeeft. Maw, deze loader kun je voor al je flashmovies gebruiken.

Raar... Is zo gek nog niet