This is a discussion on "accessing variables and actionscript in externally loaded Swf from main movie" within the Flash & Multimedia Forum section. This forum, and the thread "accessing variables and actionscript in externally loaded Swf from main movie are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
accessing variables and actionscript in externally loaded Swf from main movie
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
accessing variables and actionscript in externally loaded Swf from main movie
Can any one teach me how to access the variable and action script in a externally loaded swf from Main Movie and vice versa
|
|
|
|
#2
|
|||
|
|||
|
Re: accessing variables and actionscript in externally loaded Swf from main movie
To path to the function you path to it as if it were a part of your main flash file. Just where the root used to be for the external SWF, it is now the movie clip it was loaded into.
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
#3
|
|||
|
|||
|
Re: accessing variables and actionscript in externally loaded Swf from main movie
Thank you for your reply. main thing i'm struggling is how to name the loaded swf. Just to make thing clearer can you give the paths to acces the following i have a main movie with a preloader and four buttons. on clicking the buttons will load the respective swf in to the movie. now i have a variable in the external swf (bala.swf) named Age and a function findage() . now i need to access these variable and function from the main movie and how can i access the function that lies in the 2nd frame of the main movie (for example loadmov() )from the bala.swf. i also have question. which one of these is best to use for loading swf in to main movie loadmovie or loadmovienum or movicliploader class . |
|
#4
|
|||
|
|||
|
Re: accessing variables and actionscript in externally loaded Swf from main movie
I use loadmovie to load in my external .swfs.
As for accessing that function it'd look something like this. _level1.movieClip.functionName(); Where movieClip is the name of the shell you loaded your MC into. Mess around with this and if it doesn't work, remove the _level1 and try it without. Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
#5
|
|||
|
|||
|
Re: accessing variables and actionscript in externally loaded Swf from main movie
I'll try that . Can you tell is there any naming methods for naming the swf that's loaded in to a movie clip .
for example main.swf is the main movie. in that i load sub.swf (having var named counter)in to a movieclip container . can i access the counter variable by this way. _level1.container.counter or _level 1.container.sub.counter can we name the loaded swf by the above method . if there is any methd to name it please tell me |
![]() |
| Tags |
| external swf, variable |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| guidance in accessing variables | balaakrs | Classic ASP | 3 | Nov 2nd, 2007 08:06 |
| how to Reference variables of external swf loaded in flash movie | balaakrs | Flash & Multimedia Forum | 1 | Jun 11th, 2007 14:47 |
| Movieclip actionscript to move to main movie | nutbolt | Flash & Multimedia Forum | 3 | Apr 30th, 2007 16:58 |
| Form loaded into main movie doesn't work | papalazarou78 | Flash & Multimedia Forum | 4 | Apr 3rd, 2007 18:57 |
| Preload and caching of externally loaded JPGs | hip | Flash & Multimedia Forum | 5 | Nov 8th, 2006 13:49 |