Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript and flash why god why!

Status
Not open for further replies.

irthy

Technical User
Jan 26, 2006
9
US
on (release) {
getURL("javascript:eek:penNewWindow(' ");
}

does not work it just brings an excisting browser window to the front of the screen and if all browser windows are closed then it just opens a blank one. Why is this so freak'n hard to figure out. This seems like this should be easy. In dreamweaver it's super easy why not flash!! Help before I kill myself and all the flash programers!
 
well it seems easy enough except it doesn't work!!! copy paste and this is what i get.

**Error** Symbol=tracks_mc, layer=Layer 2, frame=20:Line 1: Mouse events are permitted only for button instances
on (release) {

**Error** Symbol=tracks_mc, layer=Layer 2, frame=20:Line 2: Syntax error.
getURL ("javascript:NewWindow=window.open(' NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(400/2); top_point = parseInt(screen_height/2)-(100/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");

Total ActionScript Errors: 2 Reported E


rrors: 2
 
tried again and i got this

got this from the generator. Still doesn't work Hah! I'm so sick of this stupid java crap.

on (release) {
getURL ("javascript:NewWindow=window.open(' NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(400/2); top_point = parseInt(screen_height/2)-(100/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");
}

heres the error report

**Error** Symbol=tracks_mc, layer=Layer 2, frame=20:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

and it does the same thing as before, nothing. brings the webbrowser to the front of my desktop or if not then it just opens a blank page

heres the url: go to "buy beats" and click on the only beat that comes out called genises. Maybe its my browser i'm using firefox!?
 
Can't check your link, 'cause no other button appears within "buy beats".

Furthermore the error you get, is simply because you've put that code on a frame action rather than a button symbol itself.
Right-click the button on stage and hit "Actions" (the windows title should say "Actions - Button" and not "Actions Frame"...), that's where you should be pasting that script.



Regards. Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
okay i got ride of the timeline action problem so now i'm not getting an error can you put an action on a button if it is tween cause it wont let me put an action on the button until it stops moving not really that big of deal but it's kinda lame if you can't, seems like your should. In any case it's working so i'm can go out and drink but seriously. I was going to blow up.
ps that's not me rapping. I just produce Love you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top