I originally posted this problem at:
The good news is that I have been able to get the urls to open as new windows rather than just replacing what is already on the screen by adding javascript to the getURL order, ie:
item.item_button.onRelease = function()
{
getURL(item_url[this._parent.no],“javascript:NewWindow=window.open(‘newWin’,‘width=100,height=200,left=400,top=400,toolbar=No,location=Yes,scrollbars=No,status=No,resizable=Yes,fullscreen=No’); NewWindow.focus(); void(0);”);
}
at this point, however, the windows that open aren’t obeying any of the javascript popup specifications (size, location, scrolls etc.). Does anyone out there know why not?
Here´s the full actionscript:
var item_title:Array = new Array();
var item_url:Array = new Array();
var item_description:Array = new Array();
var total:Number;
var i:Number = 0;
var p:Number = 0;
var item_spacing:Number = 5;
var scrolling_speed:Number = 0.30; // 0.00 to 1.00
var cv:Number = 0;
var cv_old:Number = 0;
var on_drag:Boolean;
var xml:XML = new XML();
item_list_area._visible = false;
item_list.setMask(item_mask);
stop();
xml.onLoad = function()
{
item_list.fm_item._visible = false;
var nodes = this.firstChild.childNodes;
total = nodes.length;
for( i = 0; i < total; i++)
{
item_title* = nodes*.attributes.title;
item_url* = nodes*.attributes.url;
item_description* = nodes*.attributes.description;
}
create_item_list();
scroller();
}
xml.load( “Prensa.xml” );
xml.ignoreWhite = true;
function create_item_list():Void
{
for( i = 0; i < total; i++)
{
var item = item_list.fm_item.duplicateMovieClip(“fm_item”+i, i);
item._y = i * (item_list.fm_item._height + item_spacing);
item.item_title.text = item_title*;
item.item_description.text = item_description*;
item.no = i;
item.item_button.onRelease = function()
{
getURL(item_url[this._parent.no],“javascript:NewWindow=window.open(‘newWin’,‘width=100,height=200,left=400,top=400,toolbar=No,location=Yes,scrollbars=No,status=No,resizable=Yes,fullscreen=No’); NewWindow.focus(); void(0);”);
}
}
}
function scroller():Void
{
scroller_mc._y = scrollable_area_mc._y;
item_list._y = item_list_area._y;
sr = item_list_area._height/item_list._height;
scroller_mc._height = scrollable_area_mc._height * sr;
sd = scrollable_area_mc._height - scroller_mc._height;
cd = item_list._height - item_list_area._height;
cr = cd / sd;
if( item_list._height <= item_list_area._height )
{
scroller_mc._visible = scrollable_area_mc._visible = false;
}
else
{
scroller_mc._visible = scrollable_area_mc._visible = true;
}
scroller_mc.onPress = function()
{
this.startDrag(false, this._x, scrollable_area_mc._y, this._x,
scrollable_area_mc._y + scrollable_area_mc._height - this._height);
on_drag = true;
this.onEnterFrame = function()
{
new_y = item_list_area._y + scrollable_area_mc._ycr - this._ycr;
cv = (new_y - item_list._y) * scrolling_speed;
item_list._y += cv;
if( on_drag == false && cv_old == cv )
delete this.onEnterFrame;
cv_old = cv;
}
}
scroller_mc.onRelease = scroller_mc.onReleaseOutside = function()
{
this.stopDrag();
on_drag = false;
}
}
The xml is set up like this:
<items>
<item title=“Headline” url=“http://www.websiteaddress.html”
description=“A few words about the article” />
etc.