[FMX]
how to load frame label “one” of external.swf into main movie.
buton.onPress = function () { loadMovie("external.swf…???
thanks
gepo
[FMX]
how to load frame label “one” of external.swf into main movie.
buton.onPress = function () { loadMovie("external.swf…???
thanks
gepo
loadMovie("yourfile.swf", "_root.mc");
_root.mc.gotoAndplay("one");
That should load the move then allow then tell it to go to the label one
[AS]myButton_btn.onPress = function() {
myMovieClip_mc.loadMovie(“external.swf?label=one”);
};[/AS]
And put this code on the frame actions of external.swf:
[AS]this.gotoAndPlay(label);[/AS]
thansk for the help, i will give them a try
hey kax is this a typo, .swf?label
…(“external.swf?label=one”)
I never seen ? inside actionscript
thanks
gepo
If you tested the code, you’d know if it’s a typo or not.
For the record:
No, it is not a typo.
thanks kax for clearing my assumption
it works very nicely
gepo
OOOPPPSSSSSS
I didwork once but now It doesn’t ???
I have attached the two movies I’m testing the code in.
I’m trrying to load frame “one” of external.swf movie with the loadMovie action (provided by Meridian), and then another frame of the same movie by using the onPress action with a button (provided by Kax).
Please take a look at it and let me know what I’m doing wrong.
THANK YOU
gepo
You’re not referencing the MovieClip correctly, you have holderOne.mc and it should be holderOne_mc.
ok I fix it with some outside help
here is the good working fla.(attch) for someone else to use it and learn
gepo
Will kax’s version work on the desktop/CD, I was having problems with his example, but my code could have been off a little.
gepo’s second example worked, but I did not want to load the movie first and then choose a frame, I wanted to choose a frame while loading the movie.
Nope, it will only work when viewed in a browser.
However, you can define a variable holding the frame label:
[AS]myButton_btn.onPress = function() {
label = “myLabel”;
myMovieClip_mc.loadMovie(“external.swf”);
};[/AS]
In the frame actions of external.swf:
[AS]this.gotoAndPlay(_parent.label);[/As]
You might have addressing problems depending on how you set up the movie. To prevent this issue, you could simply define the frame variable in the global object:
[AS]_global.label = “myLabel”;
// frame actions of external.swf
this.gotoAndPlay(label);[/AS]
I think there are a couple of threads about this, a little search wouldn’t hurt.
that did the trick, thanks!..
btw I did do a search, but I guess my search options, did not satisfy the great search engine god.
You’re welcome.
:: Copyright KIRUPA 2024 //--