actionscripting question..
- Started
- Last post
- 10 Responses
- twooh
i didn't know where else to ask, but i got this nagging actionscript dilemma.
i have an external .swf loading into another .fla file. thing is, i want that .swf to load certain target movie clips in the main .fla file. is this possible?
- JazX0
see resource thread
- twooh0
i understand i could do searches and find it after about a full day worth of researching.
there really isn't much of a better way to explain it though to narrow it down simply to find it in one search though. you know?
if someone just knows the syntax off hand, like: _parent._parent or something that'll work, it would save a lot of time, that's all.
- cvirus0
_root always takes you to main/topmost level, no?
- twooh0
it takes you as far as the scene goes. but its exported as an SWF and then put into another FLA, so it doesn't recognize that as the root.
- pkny0
what you should do is in your main.fla - if you are using i forget the technical term for it - but when you make a movie clip you can assign a name to it - make a name for that (i think its under the target field when you click on the movie clip).. in the timeline of main.fla add the actionscript to load mc_clip or whatever its called and have the target field labeled as that movie clip you made in your main.fla and the url would be location of the swf file you want to load.. after that you can play with the x and y locations by setting "target" as the name of the mc in main.fla.. hope htat makes sense - its been a while since i've played with flash :P
- lvl_130
make an empty mc on the main timeline of your fla. instance name it "holder" or something.
call in your external swf like so:
loadMovie("_root.holder.yourmovi...
- MLVR0
www.flashkit.com go to the board and search....
- twooh0
okay, i think i need to go into further detail on whats wrong with my fla. and yes again, i could look on flash resource sites, but i have looked for the most part, and most of them just discuss how to load external swf's or loading internal the internal _root.
i have a movie clip within my .SWF (this .SWF will get exported). within that movie clip are a like 5 buttons that when i set: onRelease(), will instruct flash to do something. that's not important.
i want each button in that movie clip, of that SWF file to load certain frames in the main FLA that the SWF will get imported into.
Geh. It's confusing I know, but does anyone get it?
- ddefenba0
if clipA loads clipB, then calls to _root.whatever() from inside clipB will look for the function whatever() in the root of clipA.
otherwise, if the button calling the function is on the main timeline of clipB (not nested any further) and clipB is loaded into the main timeline of clipA, then _parent._parent.whatever() should call the function at the root of clipA.
- ozhanlion0
can you load that swf to your main fla, if so and if you did referenced those buttons in that swf before, and if you can target them from the fla yes you can do what shit yo want.
no ?