Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control function in main movie from loaded movie

Status
Not open for further replies.

logandw

Programmer
Aug 19, 2003
5
US
I have a main movie (securityGrid) setup. It is a form for adding and updating user information for an application.

I have a second movie (empSearch) that allows me to search the user database, so I can add a new user to the application. I want to use this movie as the default search movie in other movies

I have an empty movie clip (holdMovie) in the main movie (securityGrid) that loads (empSearch) using a on press function with a button. It also passes in parameters from (securityGrid) to tell (empSearch) what the output parameter is and that it is a movie and not an HTML call. This part works fine.

loadMovie(empSearch + varString,_root.holdMovieMC);

After I use (empSearch) to find the person I want, I click a button to send that information back to (securityGrid). This part does not work. I've tried many methods of getting this work.
Set a global
outputResults = itm.empName + "," + itm.loginId
_global[outputVariable] = outputResults;

This works, but I can't find a way to trigger a function in (securityGrid) to unload (empSearch) and then fill in the add row form in (securityGrid).

_root.getAddUserForm(outputResults);


Does anyone have a simple example of what I am doing, so that I can possibly figure out what I am doing wrong? The movies and database are on a Intranet, so I can't post an example.
 
not quite sure i follow you completely

however it looks like itm is your loadvars object. i think that i would look to direct output from the onload function of this object to the function in securitygrid

make any sense ?
 
The loadvars isn't the problem. I can get the value back and pass it into the global parameter.

The problem is, that I can't call any function in the main movie or even populate a text box in the main movie from the loaded movie.
For example:
addAssociate_mc.vName.text is the text box in another movie clip to be populated with the outputResults.

I've used _root, _parent, _parent._parent, _level0 and none of them will populate the box.

I've tried using onClipEvent(onUnload) on the holdMovie Movie Clip. It triggers when the movie is loaded and it triggers when the movie is unloaded, but all I can do is trace the output, it won't populate the text box or call any functions within the main movie. Which is really weird because the holdMovie MC is in the main movie.

Does that make more sense?

 
stick a trace in to see if its a path thing

eg wherever addAssociate_mc.vName is

stick trace(this)

in the frame action and it will return the path. it sounds like this has to be a path thing. the trace will return the path from the root
 
I had that in there already.

securityGrid = _level0
holdMovie = _level0.holdMovieMC
empSearch = _level0.holdMovieMC

Are you saying that because empSearch and the empty movie clip holdMovie are saying that they are in the same place, this would cause an error or conflict? If this is the case, how would I load the empSearch without it being in conflict?

I did a loadMovieNum before and loaded the empSearch into _level1, but that didn't change anything.
 
_global.outputResults = itm.empName + "," + itm.loginId


then instead of targeting the instance try giving a variable name to
addAssociate_mc.vName.text

myVar say

then myVar = _global.outputresults;

that ought to at least get something into the textbox

is there no way you can post the fla ? getting to the root of the problem would be much easier then.
 
I could send it to you, but the data part won't work.
I don't see how you can attach a file to the post.
 
ok

email me the fla...i can add dummy data if i have to

hp_sauce46@yahoo.com
 
In case anybody was wondering.

Bill figured out that I just needed to run the Flash application on the web page instead of running it through the Flash editor. It was just that simple.
 
Good for Bill!

Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top