|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2007
Posts: 133
|
[F8]How to access functions in external swfs and pass them variables?
Hi,
Im very close to the end of building my site, although i have one major issue i have to deal with. Basically the homepage has links to different work in the portfolio and i need each of these to link to the correct sections of the external portfolio.swf (without having to create new swfs for each possibility...). I have a function called loadPortfolioSelection(); in the portfolio.swf: function loadPortfolioSelection(selectedWork:String):Void { currentPage = selectedWork; this[selectedWork + "_mc"].gotoAndStop(7); this[selectedWork + "Text_mc"].gotoAndPlay("_in"); mcLoader.loadClip(this[selectedWork+".swf"], this[selectedWork + "Loader_mc"]); trace("It worked"); } My problem is that i am unable to call this function from the main swf and pass it a variable. My code inside home.swf is portfolioLoader_mc.loadPortfolioSelection(page); *The page variable holds the value i want (tested it with a trace(page)) I can't even trigger the trace command in loadPortfolioSelection(); so its obviously not executing this function. I've tried a number of different ways to execute the function but i just can't get it working. Any help would be greatly appreciated. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2007
Posts: 133
|
Ok i’ve done a bit of an update but im still having problems. I’ll try and outline everything.
Home.swf (relevant code): PHP Code:
PHP Code:
This has been annoying me for a while now. I would be thankful for any help anyone can provide. Thx |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2007
Posts: 133
|
^bump
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2007
Posts: 133
|
^bump... I know it's a difficult problem, but surely someone knows how to fix this?
|
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2003
Location: Ontario, Canada
Posts: 80
|
I am having teh same problem
I have a MAIN_mc.swf with a loader component in it called mainLoader I load other swf's into the load but I want to send them commnad in HTML_mc.swf there is a function called show HTML I want to be able to click on a button in MAIN_mc and have ti execute teh function in HTML_mc kinda like Code:
Actions.loadHTML = function(docPath){
loadMovie("HTML_mc.swf",_root.mainLoader);
_root.mainLoader.showHTML(docPath);
};
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2007
Posts: 133
|
Gemione i think you'd be better off using a movieclip to load the swf rather than a loader component. It gives you more control over it. Then you could access it like homeMcLoader_mc.showHTML();
Im getting closer to figuring my situation out. I've tried a few things in other swfs that seem to working (with a similar principle). I'll post my solution when i work it out. Seems like nobody else has a clue... |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2003
Location: Ontario, Canada
Posts: 80
|
Maybe im dumb but I couldnt get it to load. I made a workaround though
Teh Paretn movie clip, Wehn I execute a function that I wanted to control the client MC I sent the avriable to a textfile, then the client would load that variable when it loaded. Its messy and definatly inefficient but It works. Swf->Command->php-txt->swf oh well. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|