Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : Window Target Property?


Rocky
5/18/2004 9:05:07 PM
I'm new to ActionScript and Flash, so I am working with a nav bar I found
on FlashKit.com. Of course, it is in Italian, which doesn't help me a
whole lot...

It wants me to populate three arrays, one for the primary nav, one for
subnav, and then links for the subnav. Unfortunately, the subnav links
always open a new window, and I don't want that to happen.

I know that in the GetURL() function a WINDOW arguement is available to
target a browser frame, which I would like to do, but using the Movie
Explorer, I cannot find ANY reference to a GetURL() function.

The only thing I can find is during the subnav loop, it populates a
property called .link (_root[nome1].link = links[a];). I assume there
should be a .window property, but that doesn't work.

Any ideas where I should be looking?

Thanks,
MyFlashMXIN
5/18/2004 9:37:48 PM
Rocky
5/19/2004 1:20:20 PM
"MyFlashMXIN" <webforumsuser@macromedia.com> wrote in news:c8dvnc$e48$1
@forums.macromedia.com:

[quoted text, click to view]

Here is the FLA: http://443dds.wwdd.net/menu.fla

The loop to populate the navs is here:
clip._visible = 0;
clip1._visible = 0;
cont = 0;
for (i=0; i<n.length; i++) {
nome = "oggetto"+i;
duplicateMovieClip(_root.clip, nome, i+72);
traguardo[i] = i*16+72;
inizio[i] = i*16+72;
_root[nome].tasto = i;
_root[nome]._y = i*16+72;
_root[nome].title = titoli[i];
for (a=cont; a<cont+n[i]; a++) {
nome1 = "oggettonuovo"+a;
duplicateMovieClip(_root.clip1, nome1, a);
traguardof[a] = i*16+72;
_root[nome1].field = a;
_root[nome1].link = links[a];
_root[nome1]._y = traguardo[i];
_root[nome1].title = fields[a];
}
cont = a;
}

Under the "_root[nome1].title = fields[a];" line I expected to add
something like: "_root[nome1].window = 'Content;".

It is a framed site, and the frame name I want to target is called
'Content'.

TimSymons
5/19/2004 1:37:10 PM
There are a few places he could be setting this information.

1) Look in all of the "on(release)" event holders or "movieClipName.onRelease
= ". The link would be activated once you have clicked on something. So I would
look in those areas.

2) If it is a text link and he is populating a dynamic textfield and then
using TextFormat object to set the linking URL you should go through the code
in the library. Try editing all of the pieces that came with program.

3) If it is a custom component, he may have hidden the actual getURL call
within the class definition of the component. Again, I would try editting each
piece that came with the component in the Library and look at every element and
frame for attached scripting.

HTH.

Tim
TimSymons
5/19/2004 1:57:10 PM
Based on the FLA you gave a link to there is an on(release) function in the
following location:

On the stage there is an instance of the "fields" mc named "clip1". Edit this
clip. Lock the top layer, this is the dynamic text field. Select the bottom
layer, then on stage, right-click on the button, and select the "Actions"
option. This will show the following code:

on(release){
_root.spegni1();
gotoAndStop(5);
getURL(link,"_BLANK");
}

And you can change this to what you need it to point to.

Tim
Rocky
5/19/2004 2:02:16 PM
"TimSymons" <webforumsuser@macromedia.com> wrote in
news:c8fnu6$oql$1@forums.macromedia.com:

Thanks for helping, Tim.

[quoted text, click to view]

This was my first thought, but I can't find any mouse events in the movie
explorer. There are load and enterFrame events, but those seem to just
'expand' the nav.

[quoted text, click to view]

They are buttons. I did search in the movie explorer for TextFormat and
found none.

[quoted text, click to view]

I'm not familiar with class definitions, so when I'm in the library and I
right-click on the buttons/movie clips, I have an option for Component
Definitions. Is that what you mean? In any case, there is nothing
defined for any of the objects in Component Definitions.

Any other thoughts?

Can the call really be hidden? Should I scrap this idea and make my own?
I really like the smooth opening and closeing action of this nav, which
is why I was using it. I imagine I can start from scratch and see how it
goes, but I have trouble using the duplicateMovieClip function, so it
will take some trial and error I suppose.

Thanks,
Rocky
5/19/2004 2:04:35 PM
[quoted text, click to view]

AWESOME!!!

Thanks VERY much!

Later,
AddThis Social Bookmark Button