Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Java Script In Flash - Where Do I Put The Code?



I made a big flash application that's got a main movie with buttons that calls a preload-movie and then the other movies ("called" in levels). Now i need to put in some jave script code to count the traffic on the page (and i don't know much about java script so i need help!!!).
I got the script (someone else told me to use this):
<!-- INSTADIA START -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function Instadia_sendInfo() {};
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="http://www.instadia.net/clientstep.js"></SCRIPT>
<!-- INSTADIA END -->
to put in the main movie.

What i need now is to put some code into the sub-movies. This is the code i was told to use:

<SCRIPT LANGUAGE="JavaScript">
<!--
Instadia_sendInfo("01033","Mælk og Fløde Flash loaded");
//-->
</SCRIPT>
But where do i put it? And don't i have to rewrite it in some way - to actionscript i mean???

I have no idea what i'm doing so plzzzzz help me!!!
(sorry for the bad explanation - hope u understand me!)



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-17-2003, 08:12 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Interesting Code Test For Flash, Java, And C++
http://www.k2xl.com/boards/go/phpBB2...opic.php?p=633

Integrating Html/java/xml Code Into Flash Program
Ok im fairly new to flash, i wrote myself a webpage using ms frontpage that basicly has a searchbar and go button for the 6 or so major sites that i search for things on. The idea was to just open up one page and be able to search youtube, ircspy, purevolume, torrentspy, and several othere sites from the same page. I managed to get the page working fine and now i would like to make a flash program based around this concept. several buttons on a main page click the button and it will take you to another sceen where there is simply a icon telling you what site you are searching, a search bar, and a button. How do i go about implementing my website search code into flash. I want to be able to type in my search query and click go or enter and have it open firefox or ie to the correct search page.

hope someone can help me.
Thanks

Integrating Html/java/xml Code Into Flash Program
Ok im fairly new to flash, i wrote myself a webpage using ms frontpage that basicly has a searchbar and go button for the 6 or so major sites that i search for things on. The idea was to just open up one page and be able to search youtube, ircspy, purevolume, torrentspy, and several othere sites from the same page. I managed to get the page working fine and now i would like to make a flash program based around this concept. several buttons on a main page click the button and it will take you to another sceen where there is simply a icon telling you what site you are searching, a search bar, and a button. How do i go about implementing my website search code into flash. I want to be able to type in my search query and click go or enter and have it open firefox or ie to the correct search page.

hope someone can help me.
Thanks

How To Convert Java Code To As3 Code
package ConvertNumberIntoWords;

class EnglishDecimalFormat {
private static final String[] majorNames = {
"",
" thousand",
" million",
" billion",
" trillion",
" quadrillion",
" quintillion"
};

private static final String[] tensNames = {
"",
" ten",
" twenty",
" thirty",
" fourty",
" fifty",
" sixty",
" seventy",
" eighty",
" ninety"
};

private static final String[] numNames = {
"",
" one",
" two",
" three",
" four",
" five",
" six",
" seven",
" eight",
" nine",
" ten",
" eleven",
" twelve",
" thirteen",
" fourteen",
" fifteen",
" sixteen",
" seventeen",
" eighteen",
" nineteen"
};

private String convertLessThanOneThousand(int number) {
String soFar;

if (number % 100 < 20){
soFar = numNames[number % 100];
number /= 100;
}
else {
soFar = numNames[number % 10];
number /= 10;

soFar = tensNames[number % 10] + soFar;
number /= 10;
}
if (number == 0) return soFar;
return numNames[number] + " hundred" + soFar;
}

public String convert(int number) {
/* special case */
if (number == 0) { return "zero"; }

String prefix = "";

if (number < 0) {
number = -number;
prefix = "negative";
}

String soFar = "";
int place = 0;

do {
int n = number % 1000;
if (n != 0){
String s = convertLessThanOneThousand(n);
soFar = s + majorNames[place] + soFar;
}
place++;
number /= 1000;
} while (number > 0);

return (prefix + soFar).trim();
}

public static void main(String[] args) {
EnglishDecimalFormat f = new EnglishDecimalFormat();
System.out.println("*** " + f.convert(0));
System.out.println("*** " + f.convert(17708));
System.out.println("*** " + f.convert(16));
System.out.println("*** " + f.convert(100));
System.out.println("*** " + f.convert(118));
System.out.println("*** " + f.convert(200));
System.out.println("*** " + f.convert(219));
System.out.println("*** " + f.convert(800));
System.out.println("*** " + f.convert(801));
System.out.println("*** " + f.convert(1316));
System.out.println("*** " + f.convert(1000000));
System.out.println("*** " + f.convert(2000000));
System.out.println("*** " + f.convert(3000200));
System.out.println("*** " + f.convert(700000));
System.out.println("*** " + f.convert(5960809));
System.out.println("*** " + f.convert(123456789));
System.out.println("*** " + f.convert(-45));
System.out.println("*** " + f.convert(99565789));
// (99565789)


/*
*** zero
*** seventeen thousand seven hundred eight
*** sixteen
*** one hundred
*** one hundred eighteen
*** two hundred
*** two hundred nineteen
*** eight hundred
*** eight hundred one
*** one thousand three hundred sixteen
*** one million
*** two million
*** three million two hundred
*** seven hundred thousand
*** five million nine hundred sixty thousand eight hundred nine
*** one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine
*** negative fourty five
*** ninety nine million five hundred sixty five thousand seven hundred eighty nine

*/
}
}

Java Code
This is my problem, @ this address http://www.kfyi.com/fitnessinstitute.html, I have the locations of his place appear in a Java Pop Up.

Only thing is i have to have them appear in a new pop up each time. Currently, if you have one open and do not close it, when click on another location, it pops up in the same window.

I have this code on the buttons...
javascript:window.open(.../camelback.html','win1','width=372,height=325,top=0 ,left=0'); void(0);

HELP PLEASE!

Help On Java Code
ok. i got this code that shakes the screen when ever the browser window is loaded. i tried to put the code in flash on a certain frame. can someone tell me what i need to do or fix the code for me? here is the code. just save it as html.


Code:
<HEAD>

<SCRIPT LANGUAGE="JavaScript1.2">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function shake(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->
</script>
</HEAD>
<BODY onload="shake(2)">

<center>
<form>
<!--<input type=button onClick="shake(2)" value="Shake Screen">-->
</form>
</center>

<!-- Script Size: 1.09 KB -->

Converting *.SWF To Java, Or Some Other Code
I should know how todo this, but I don't. My question is how do I convert the *.SWF to JAVA, or anyother coding.

I seen it done.

Thankyou.

Where Java/scripting/code?
If I want to put in a code into flash. Like puting into HTML(like resizing a page). Were do that or how do that. Or editing in HTML or how to edit. ThanX

Java Code In A Combobox
I currently have a table the contains a large number of links. The links are in java and currently have an onmouseover command and an onmouseout command which affects a flash clip. When you click this like it will take you to a specified page.
I'd like to make my page more visually appealing, and was wondering if I could get the exact same function from within a combobox.

If the above is possible, please help me with he scripting as well, because I am fairly new at flash.

Java Code Needed. Or Something Else?
I made a form, and want to be able to post a link to this form on my web site for others to view and fill out, but I don’t want any one stealing it, “copying it, saving it” etc… on their PC’s. It’s a form relating to a specialty with a nice lay out, etc.. All done using html.

Here’s my question.
Now I would like to know where I can get some code to put in it to block any one from using the "file save" option located on there browser, or “view source also located within their browser. I have java code that blocks the right mouse button from being used to view source code, but not the browser’s “view source” I just want to block any "would be thief" from copying my three days of hard work. Any help here would be greatly appreciated. Thank you in advance for your time and replies.

Back to top

Java Window Code ?
I have a button and when it is clicked it loads a java window. In the window I have a close button that I want to close the window when done. Can someone tell me what the code should be for this window to close? Someone told me to use an Fscommand, but I can't get it right. Your help is appreciated.

thanks,

How To Use Java Code Open New Window?
can anybody paste me the code and tell me how to put it in html? thanks

Error In HTML Java Code - Pop-Up
Guys,

Check out the html code on, http://www.vmvisions.com/layout

What am I NOT doing right?

Thanks,
Marc

Convert Java Code To ActionScript
Hi All,

Here I am attaching a java class regexp.txt , which I need to convert to ActionScript code. Please help .............

Java PopUp Window Code Error. Help
Hey everyone. I am having a problem with the java code for the simple old pop up window. I enter it in and it says it's ok, but when I test it, it opens up the file & a seperate window that is all white that says [object] in it.

Here is the code I am using:

on (release) {
getURL ("javascript:NewWindow=window.open ('http://www.maykreal.com/Organic_Technology.html','newWin02','width=1024,he ight=768,left=0,top=0,toolbar=No,location=No,scrol lbars=no,status=No,resizable=no,fullscreen=no'); NewWindow.focus(); void(0);");
}

Also tried this code but it just gives me a syntax error.

on(release){
getUrl("java script:window.open('http://www.maykreal.com/Test. html','newwindow','width=420,height=420,top=0,left
=0'); void(0);")
}


Help!!!

Java And Flash
Im trying to pass java paremeters into actionscript to determine wheteher or not a window has finished loading. If it did finish, make the Flash movie show the loaded window instead. Any help with integrating Java and Flash and ActionScript would be great.

Java & Flash
Ok I must be some sort of jack-ass cause i still can't get flash to make a new window pop-up. One that i can specify Height, Width, Scroll bars, and junk like that. If any one reads this and can give me any clues I would appreciate it. I've been tryin' to do this for a couple weeks now and it's bein' the biggest pain. It's the hardest thing i had to do so far; as far as takin' time to get it finished goes.

Thanks
Mike

kreski@beadfans.com

Java App In Flash
Hello all,

Anyone know of any way I could put a Java App in my flash 5 project? any ideas at all would be a great help thanks alot for your time and have a great day. ( ps hang in there 2 days to go till the weekend hehe)

Flash & Java ?
G'Day All,

Is there any way to get Flash and Java to communicate in a similar way to ASP and Flash???

The reason is that I want a intranet site built with a Java back end that also uses flash for the front end. Any clues?

Can You Help Me With Flash Vs. Java?
i want to go from 1.html (src = 1.swf)
to the 2.html (src = 2.swf) ...easy
but i want to choice 1st or 2nd frame from the 2.src
i used for the button in 1.src this code:
A HREF=javascript:MM_controlShockwave(','2.html','Go toFrame','2')
but it doesn´t work
t.y.

Flash And Java...
I need a java script(run from flash) that lists every file in a directory and puts every file in an array in flash.

Java With Flash
Hello. I am learning Web page development, and now trying to incorporate Flash. I am using the following JAVE script to open 2 frames at the same time:
<TD><A HREF="javascript:location='index.html';parent.page name.location='hometext.html';parent.middle.locati on='homemiddle.html';parent.links.location='linkta ble.html'">HOME</A> </TD>

It works fine, but I want to replace HOME with a Flash button. I can't seem to make it work.

Any suggestions?

Thank you very much!

Flash And Java
How do you get Flash to call a java application?
Do you use Fscommand ("Exec", "name")
Can Fscommand call a java application directly or do you need a batch file?
If so ..what's a batch file and how do you create it.

Can all this be done with a .swf or do you need a projector file.

(This is for Flash MX)

Java & Flash
How can I include a Java applet in a website made in flash MX?
I don't know where to put the javascript or if I have to do directly.
Thank you very much.

Flash And Java ...
Flash and Java ...

I am developing Flash content for use on my companies intranet site. The navigation menu for the whole intranet has been made with Java - its one of those fly-out menus and in this case, runs down the left hand side of the browser and flies-out to the right.

We developed the menu with the intention of being able to get to anywhere (or at least one level above) with one click of the mouse. Therefore there are about 160 links in the menu. At most the menu will have 5 fly-outs (i.e: you can select a link from the 5th menu, which flies out from the 4th menu, which flies out from the 3rd menu and so on). This means that at times the menu covers up to about 3/4 of the screen (at 1024 x 768 res).

Now the problem at hand: The fly-out menu always sits under the flash content (or flash sits on top if you like). I need this to be the other way around in that the menu covers over the flash content.

Does anyone know if this is possible ?.

Thanks,
Stephen.

Flash And Java
I need to know how to open a new window(size and location) from flash, i see it all the time but how do you do it?

Flash 5

Java Pop-up's In Flash
I need to create a java pop-up in flash with specified sizes (no scrolling). You know, the crap that fills are screens all day long whilst surfing. This i assure you is not for spam. But i need it to come from a button within flash. Anyone can help please reply. Regards Shott_away.

Java + Flash
Does anyone know of some good examples of Java (not javascript) and Flash being used together?

The New Flash W/Java
When is the new Flash that uses Java coming out? I heard about it and I'm curious.

Flash On Java
How do you put a flash movie on a HTML page? If you can please explain it from A-Z thanks alot!!

Flash And Java
I have a javascript I use in a flash movie (see below) to open a new, smaller browser window. It works on my and other Macs but on PCs, the new window opens properly but the main window goes blank and the URL in the address bar is the javascript:window.open...etc script. Any suggestions on how to make this work with both Macs and PCs?

The URL to see this is at:
www.richbuyer.com/vami

Thanks for any help!

Rich


on (release) {
getURL("javascript:window.open('xxx.html','newWind owName','width=500,height=450,menubar=0, resizable=0, scrollbars=1, status=0,titlebar=1, toolbar=0');");
}

Flash+java
Hi, I am planning to design a real time communication chat room by using java. Is it possible?
Could anyone briefly describe the requirement of establishing the connection between flash and java?

Which program should I use, JSP or others?

Which action script do I use when communicating with java?
is loadVariables("*.class")?

Flash With Java
html file with swf embedded. There's a bit of javascript thrown in for the popups. It works fine on my Mac, but my client's PC gets a blank screen while opening the html file. could someone glance over the source code and see if there's a glaring mistake. maybe he just has java disabled or something.

http://soundstaging.com/pktest/hanov...ructorold.html

Flash & Java
I designed a flash movie with flash mx6 and have a drop-down menu in java script right above it however every time i point to the java it goes behind the flash, not in the front. Is there a way to make the java drop down menu come in front of the flash.??????

Java And Flash
Im tryin to change the background image of my html page, not the color.

Script in html page

<SCRIPT LANGUAGE=JavaScript>
<!--
function changebackground(newbackground) {
document.background=newbackground;
}
//-->
</SCRIPT>

AS on button

on (release) {
getURL ("javascript:changebackground(bg1.png)");
}

Cant get the above to work.
I found a buttload of threads about changing the color, which I can do, but none about changing the actual tile for the background.
Help!
Josh

Sorry Not Flash But Java
I know it's not flash but can anyone point me to some Java rescources??

I want to build a menu like the on on sony.com

I Need Java Help In Flash,
I want some basic things from java to be in my flash, like The title of my page, a popup on load alert box with text in it, and text on the status bar, can someone show me an exxample FLA or shwo me how please

Flash And Java
hello everyone


I have a web page where is a swf and nex to it, there´s a menu (which I created on fireworks, and added a pop-up menu). the problem is that this pop-up menu is been loaded behind my swf file.

what can I do to show this pop-up menu in front of the swf file?

DAvid

Flash And Java Help.
So im working on a site. I have a JS that makes anchor on the normal html page to scoll down instead of jumping down. Now i want that external JS to be run when the menu which is in flash to be clicked so it scrolls down to the anchor on the html page instead of jumping as it does now.

the site in progress is located here.

http://www.sincerelyhiten.com/test/af4es/main.php#p18

let me know if this is possible.

Thanks

Java In Flash?
how can i import java applet in my fully flash site?
any help or sujjestions will be appreciated

[F8] Is It Possible To Put A Java App In Flash?
i would highly doubt it w/ my limited knowledge... but figured i'd ask anyway...

creating a Java application to lease to clients where they just paste the HTML code into their sites for the app to be called off our server, but some of them have Flash sites, so i was curious as to if there was a way they could put the same code into their Flash sites...

Java In Flash?
is there a way to import java applets in flash ?
as i know there are similarities between java and AS but is there a way to use applet in flash or how can i rewrite the js code in AS ?

i have that code for example

<applet archive="galaxy.jar" code="galaxy.class" width="240" height="160">
<param name="particles" value="6">
<param name="random" value="0">
<param name="script" value="10">
<param name="gpalette" value="1">
<param name="persist" value="30">
<param name="dinamic_persist" value="2">
<param name="dinamic_min" value="6">
<param name="dinamic_max" value="50">
<param name="overimg" value="NO">
<param name="overimgX" value="0">
<param name="overimgY" value="0">
<param name="textscroll" value="NO">
<param name="regcode" value="NO">
<param name="reglink" value="NO">
<param name="regnewframe" value="NO">
<param name="regframename" value="_blank">
<param name="statusmsg" value="Galaxy applet">
<param name="memdelay" value="1000">
<param name="priority" value="3">
<param name="MinSYNC" value="10">
<param name="fixnetscape" value="NO">
</applet>

how must i rewrite it in AS. in kinda newbie so i please for good good and fully explanation
ty

Flash And Java.
hi

i have a problem. i need a flash movie, which is in a html page, to change the bg color of the page. but i need it to happen on a "once movie is loaded".
heres the thing i have a preloader loading a movie and in the pre loader "Phase" the flash bg is black then when the movie is loaded the it turns to white (dont ask the client wanted it). anyway the problem is, if you havnt guessed it, when the movie changes the html bg doesnt and you can see the dimensions of the swf.
so ive had a dig around and it seems that you need a bit of java. the tuts i have found are all 'on mouse click' and stuff where as i need it on an "on comlete" of a pre loader component. ive tried to get it working but no joy.

on my Pre loader component i have
on (complete) {
this.setVisible(false);
myLoader.content._lockroot=true;
_root.BG_Mc._alpha = 0
_root.Black_mc._alpha = 0
_root.getURL("javascript:document.changeBgColor=#f fffff");
}

some tuts say u need a javascript function, .bgcolor, in ur html others don't specify this? and im not too sharp on java!

oh and the pre loader component is in an mc so i have to use _root to affect something out side of the compnent, not sure if this is an issue?

can any one help?

thanks in and advance

Is There Java In Flash?
Hi all,

I have a question I need to get answered.

It is to do with IE6 and the java virtual machine and flash.

Basically, do you need the JVM to run flash movies? IE6 on XP does not have the JVM installed, so I need to find out if the flash player still works without it.

Also, and a bit of a long shot here, does anyone know if the JVM is needed for director?

thanks a lot,
A

Java In Flash
Is it possible to insert java script in a flash file. I want to put the amber alert ticker code into a flash file. If its posible, how do I do it? I have attached the code.







Attach Code

<!-- Begin Code Amber Ticker code. -->
<P ALIGN=CENTER>
<SCRIPT LANGUAGE="JavaScript1.2" src="http://www.codeamber.org/js/hcodea.js">
</script>
</P>
<!-- end of Code Amber Ticker code (c)Copyright codeamber.org 2002 - 2007-->

Flash/Java Pop Up
Hi all. I am putting togther a site and I am looking for some Java code that I could place in the falsh script to block the sound from the site I am linking to in a Pop Up window.

Any ideas?

Flash And Java?
Hello, I was wondering how you would put a java applet into flash? Is it possible? or am i going to have to find another way.

Thanks!

Flash And Java
hi there,

i thought this would be the appropriate place to put in my question......
can anybody tell me if there could use java with flash.......or any site where there is any information about flash in combination with java......
this question might seem sily but i ned to know abt this.......

Flash With Java
hello take a look at this site http://www.elitefrenchpolishing.com/main/index.php

in the photo gallery section when you click to enlarge the image another html window with a specific size depending on the image appears can anyone point me a tutorial or el flash so i can see the code.. thankks alot

Copyright © 2005-08 www.BigResource.com, All rights reserved