-
merging functions
Hi all
i'm using mx2004. With an imported .txt file that has links to load an image into my main movie. It's done using the following function in my main flash movie:
function loader(whichFile) {
_root.image.loadMovie(whichFile);
}
this calls an external image into empty clip called 'image'. the following code creates the text link in the external .txt:
<font color="#0066FF" size="14"><a href="asfunction:_level0.loader,gallery1.jpg">IMAG E 1</a></font>
when you click the link IMAGE 1 it calls gallery.jpg into my 'image' mc. THIS WORKS!
now my problem is i want to load another separate image into a separate empty mc called 'enlarge'. i used my own logic to create this new function on the main timeline:
function loader2(whichFile) {
_root.enlarge.loadMovie(whichFile);
}
But how do i MERGE the href part to use the SAME TEXT LINK,(its just a syntax thing i cant get correct)?
<a href="asfunction:_level0.loader2,gallery1.swf">
cheers
Rat
-
Bearded (M|G)od
do you mean something like this?code: function loader(target_whichFile:String){
var target=target_whichFile.split("|")[0];
var whichFile=target_whichFile.split("|")[1];
_root[target].loadMovie(whichFile);
}
then you can call either:
<a href="asfunction:loader,image|gallery1.swf">
or
<a href="asfunction:loader,enlarge|gallery1.swf">
is that what you had in mind?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|