accessing variables and actionscript in externally loaded Swf from main movie

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 1st, 2007, 14:24
Junior Member
Join Date: May 2007
Location: india
Age: 25
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 4th, 2007, 15:52
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 5th, 2007, 06:30
Junior Member
Join Date: May 2007
Location: india
Age: 25
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
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
.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 5th, 2007, 15:12
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 8th, 2007, 17:19
Junior Member
Join Date: May 2007
Location: india
Age: 25
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
external swf, variable

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 23:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42