up to my .as in code
Hahaha...see how quick? Now you can pop an xml array and push to a window with ease. Great job!
yeap, and very much thanks to you :-) well, if I understand it all is another thing.. but if I repeat it often enough.. I´ll get there :-)
check out my site now.. http://kunst.no/mariusmellebye/ what do you think? :-)
I even added a movie.. that I made music for... sow now I´m updating it with 4 more movies/comercials :-)
something that would have been really cool, is if that popup window, would launch in the middle of the screen :-)
up to my .as in code
Originally Posted by
mariusmellebye
something that would have been really cool, is if that popup window, would launch in the middle of the screen :-)
Ask and ye shall receive...
Code:
on(press){
getURL("javascript :window.open('"+_root.foo1+"','newWin','width="+_root.foo2+",height="+_root.foo3+",top='+((screen.availheight/2)-(400/2))+',left='+((screen.availwidth/2)-(500/2))+',menubar=no,menubar=no,scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=no');void(0);");
}
I fixed some gaps... but I can´t see any difference... when I click the picture, the popup still opens in the upper left corner... or did I miss out something again? ;-) or did I forget to ask hehe :-)
up to my .as in code
The code in the textfield is the code on the button. Exact same I posted earlier....gaps and all .
http://actionscript.hobby-site.com/e..._CENTERED.html
Last edited by Chris_Seahorn; 05-21-2006 at 07:02 PM .
this is what happens when I click youre button:
this is how I wanted it to look like:
but maybe the browser overwrite the code somehow... :-)
up to my .as in code
Firing fine in IE6and FF 1.5.+
Please don't make me make two screenshots ;(
hi chris, I have a challenge for you :-) or hrm.. I guess it´s my challenge, but I wonder if this is possible:
take a look at this jave script lightbox
would it be possible to use that in flash.. and instead of opening pictures... it opens a html document.. so I still can show videos.. ? it looks very cool, and it´s centered in the screen, and it doesnt opens a popup window.. now that most browsers have popup blocks..
any idea? :-)
up to my .as in code
Scripting and Backend.
I´m not to steady in english... so that means it´s possible? :-)
up to my .as in code
I know Musicman and Nunomira in the Scripting and Backend forum can shove an elephant through an html page so they would be the javascript gurus to head for. If what you wish is possible...they can do it blindfolded.
oh I see.. thanks! I´ll drop them a note and see :-)
hehe that note became three posts... I didn´t know there was a limit for how many words you can post :-)
Can someone help me? my thumbNailScroller cant been show in 1 row!
Attached Images
Below is my script
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image_p = [];
location_text = [];
pcode_txt = [];
psize_txt = [];
pprice_txt = [];
pcolour_txt = [];
mypath = [];
mywidth = [];
myheight = [];
total = xmlNode.childNodes.length;
for (a=0; a<total; a++) {
location_text[a] = xmlNode.childNodes[a].childNodes[1].firstChild.nodeValue;
image_p[a] = xmlNode.childNodes[a].childNodes[2].firstChild.nodeValue;
pcode_txt[a] = xmlNode.childNodes[a].childNodes[3].firstChild.nodeValue;
psize_txt[a] = xmlNode.childNodes[a].childNodes[4].firstChild.nodeValue;
pprice_txt[a] = xmlNode.childNodes[a].childNodes[5].firstChild.nodeValue;
pcolour_txt[a] = xmlNode.childNodes[a].childNodes[6].firstChild.nodeValue;
mypath[a] = xmlNode.childNodes[a].childNodes[7].firstChild.nodeValue;
mywidth[a] = xmlNode.childNodes[a].childNodes[8].firstChild.nodeValue;
myheight[a] = xmlNode.childNodes[a].childNodes[9].firstChild.nodeValue;
thumbnails_fn(i);
}
CreateMenu(this);
firstImage();
} else {
content = "file not loaded!";
}
}
portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = loadXML;
portfolio_xml.load("ca_wetbikini.xml")
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
loaded = image_mc.getBytesLoaded();
filesize = image_mc.getBytesTotal();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 50*loaded/filesize;
} else {
preloader._visible = false;
if (image_mc._alpha<100) {
image_mc._alpha += 10;
}
}
};
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function DisplayInfo(){
descriptionbox_mc.content_txt.text = this.location_text;
image_mc.loadMovie(this.image_p);
productcode_txt.text = this.pcode_txt;
size_txt.text = this.psize_txt;
price_txt.text = this.pprice_txt;
colour_txt.text = this.pcolour_txt;
}
var item_spacing = 24;
var item_count = 0;
function CreateMenu(menu_xml){
var items = menu_xml.firstChild.childNodes;
for (var i=0; i<items.length; i++) {
if (items[i].attributes.type == "squirrel") {
var species = items[i].childNodes[0];
var location = items[i].childNodes[1];
var picture = items[i].childNodes[2];
var pcode = items[i].childNodes[3];
var psize = items[i].childNodes[4];
var pprice = items[i].childNodes[5];
var pcolour = items[i].childNodes[6];
var mypath = items[i].childNodes[7];
var mywidth = items[i].childNodes[8];
var myheight = items[i].childNodes[9];
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
item_mc.species_txt.text = species.firstChild.nodeValue;
item_mc.main_btn.location_text = location.firstChild.nodeValue;
item_mc.main_btn.image_p = picture.firstChild.nodeValue;
item_mc.main_btn.pcode_txt = pcode.firstChild.nodeValue;
item_mc.main_btn.psize_txt = psize.firstChild.nodeValue;
item_mc.main_btn.pprice_txt = pprice.firstChild.nodeValue;
item_mc.main_btn.pcolour_txt = pcolour.firstChild.nodeValue;
item_mc.main_btn.mypath = mypath.firstChild.nodeValue;
item_mc.main_btn.mywidth = mywidth.firstChild.nodeValue;
item_mc.main_btn.myheight = myheight.firstChild.nodeValue;
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
function thumbNailScroller() {
//thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._heig ht)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
function firstImage() {
image_mc.loadMovie(image_p[0], 1);
productcode_txt.text = pcode_txt[0];
size_txt.text = psize_txt[0];
price_txt.text = pprice_txt[0];
colour_txt.text = pcolour_txt[0];
descriptionbox_mc.content_txt.text = location_text[0];
_root.foo1 = mypath[0];
_root.foo2 = mywidth[0];
_root.foo3 = myheight[0];
}
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