javascript > flash help
- Started
- Last post
- 15 Responses
- ********
hey guys, I posted this the other day but still can't figure ot out...
I'm going to rephrase my objective:I want to pop up a window via a javascript in getURL.
I want the x & y dimensions to be variables pulled from flash.
i.e.
button.onLoad = function(){
newX = 100;
newY = 450;button.onRelease = function(){
getURL(javascript:open the window by passing newX & newY in here...
}I can't figure how talk to js from as...
help me, please!
}
- stewart0
why don't you define the window width and height in the javascript?
- ********0
because I'm creating a menu dynamically from a multi-dimensional array; it'll be like this:
newX=array[i][2];
newY=array[i][3];which will make newX & newY different per items in the array...
- preston0
here check this out:
function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=25,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "_blank", windowprops);
}I copy/pasted from:
http://members.rogers.com/camero…
that page just has HTML/CSS links, but it should work the same way using getURL.
- stewart0
i see...
maybe Boz knows the answer, i think he's smart.
- ********0
OH Preston that's it!
I'm such a javatard that I don't understand how to translate that into a getURL thouhg...
could someone help????
please???
thanks...
- tomkat0
maybe this helps:
Object.prototype.newWindow = function(url,width,height,xPosit...
if (url.substr(0,4)!="http") { url = "http://"+url }
getURL ("javascript:window.open('"+url... Date().getTime()+"','width="+wid...
void(0);");
}
- ********0
exactly, define the height and width in the external or included JS within your html file
- ********0
man just search Flashkit or one of the other site, shit Google.com might have it if you type: 'pop-up window in Flash'
- ********0
Google: http://www.google.com/search?hl=… and http://jimmont.com/resrc/popmeup… they also provide you with a downloadble .FLA for it and also http://wow.organicpixel.com/mc/t… wow that was tough, try Google everytime man before asking silly questions here, no offense :)
- ********0
Hey JazX I have tried every possible sample .fla and message board I can find, I keep trying people's suggestions and still nothing.
I've never had a problem in Flash that has taken me this long to figure out.
Now that I have given you the background of my situation I think you'll agree with me when I call you astupid fucker.
Thanks for sending me a flash4 version of how to pop up a window using javascript.
Dood I don't think you even understand flash well enough to understand what I'm trying to do. I've made a multi-dimensional array, then from that created a menu. The javascript has to be dynamicFuck it I'm done explaining myselfgood night
- unformatted0
it's gettin' hot in here, so take off all.......
i think tomkat has the solution. did you read it?
- stewart0
pffft, multi-dimensional array...
- ********0
Sorry for my little outburst there, no hard feelings...
Thanks unformatted, I'm pretty lost right now....I don't understand what tomkat is trying to do there...I think I'm going to give up flash and join the human/horse folk...
- unformatted0
basially he made a prototype function in flash which is calling a javascript function with the width, height, x, y and url.
i think, i didn't look that closely though.
- ********0
Oh man. I just figured it out. Three long crappy days and I figured it out finally. It works. Thanks everyone for your help. Time to sleep.