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








ExternalInterface Actionscript To Javascript In Safari Not Working


I have done some testing and the method I currently am using works in :

Mac:
Firefox Yes
Safari No

PC:
Firefox Yes
IE Yes

Above are the only browsers I am currently concerned with. I am looking for a solution that works for Safari too. I have been doing research and found a few instances of ExternalInterface actionscript to javascript not working in safari. But I haven't found any solution that works.

Does anyone have a sample the works in all browsers html,javascript,fla, and swf?

I would very much appreciate the help.

Thanks,
Aubrey




KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 03-24-2008, 01:18 PM


View Complete Forum Thread with Replies

Sponsored Links:

Actionscript -> Javascript In Chrome/Safari Not Working
Hello,

I've been working on a flash project that is able to issue commands to the browser window via ExternalInterface.call. It is all working perfectly in IE and FF.

However, in Chrome and Safari, i cannot get AS -> JS communication working at all. Besides ExternalInterface.call not being received by JS, I've also tried tests with navigateToURL (which I understand to be the replacement of getURL) such as:

navigateToURL(new URLRequest('javascript:alert("hi there");'), "_self");
navigateToURL(new URLRequest('javascript:function foo(){alert("hi there");}foo();'), "_self");
ExternalInterface.call("function () { alert('hello');}");
ExternalInterface.call("alert", "hello");

all of which which work fine in IE and FF but do not work in Chrome/Safari. I've tried invoking both named and unnamed function via ExternalInterface.call and navigateToURL, all to no avail.

does anyone know the "magic" fix or workaround to get things rolling in Chrome/Safari?

Thanks!

View Replies !    View Related
Javascript, ExternalInterface And Safari
Hello, I'm sending my flex app a command when the user closes the browser window (triggered off of "onbeforeunload" in javascript).

My flex app is connected to a server and when a user closes the window I want the flex app to inform the server that it's logging off.

I have it working well for firefox and IE but it doesn't seem to work in Safari. Then I noticed that it happens sometimes, but rarely. Turns out the command is working in safari but I think what's happening is Safari closes down my app too quickly and my goodbye message to my server never gets sent.

I put in a "return" message in the javascript right after my flex call back to slow it down.. after doing that Safari worked fine (which the exception that I now have a dialog to hit, which I don't want).

Any ideas how to force Safari to get this command callback sent before shutting it down? I think because the command I'm calling does a urlrequest which is threaded it doesn't wait around for it to complete. I need to find a way either in as3 or in javascript to slow it down a little and confirm the command

Thanks for any advice

Daniel

View Replies !    View Related
[F8] ExternalInterface Not Working :-(
...and Flash is not providing any clues as to why not!

I'm publishing to Flash 8, AS2.

In main timeline I have inserted this:

import flash.external.* ;

on a button, later in the movie, I put this:


Code:
on(release){
ExternalInterface.call("sendMessageToVT", "erwerwerwerewr");
}


That doesn't seem to do anything. The button is NOT inside a clip or anything. Does it have to be named? What am I doing wrong?

I know the function works, because it echoes back the data when I use the old getURL method of calling JS.

What are the cons of resorting to old getURL method? I'm afraid I'll have to if I can't sort out ExternalInterface.

PS: I tested Macromedia's own example and it works fine. YES I know it must be uploaded to server to work.

Thanks

View Replies !    View Related
[CS3] ExternalInterFace Not Working
Hi My head is rotating because of this code....
there this is my flash code
But problem is External interface is not working.....

import flash.external.*;


var array:Array = Array("New Limpopo Province.swf","New Gauteng.swf","New Mpumalanga.swf","New North West Province.swf","New Kwazulu Natal.swf","New Free State.swf","New Eastern Cape.swf","New Western Cape.swf","New Northern Cape.swf");
numCountry = 20;
mov = _root.createEmptyMovieClip( "movie", _root.getNextHighestDepth());
i = 1;
while (i < numCountry)
{
newName = "a" + i;
var Depth:Number = new Number(0);

eval(newName).onRollOver = function()
{
Depth = this.getDepth();
this.swapDepths(2);
var __reg2 = new mx.transitions.Tween(this, "_xscale",regular.easeOut, this._xscale, 150, 1, true);
__reg2 = new mx.transitions.Tween(this, "_yscale",regular.easeOut, this._yscale, 150, 1, true);
this.gotoAndStop(2);
};

eval(newName).onRollOut = function ()
{
this.swapDepths(Depth);
var __reg2 = new mx.transitions.Tween(this, "_xscale", regular.easeOut, 150, 100 , 1, true);
__reg2 = new mx.transitions.Tween(this, "_yscale", regular.easeOut, 150, 100 , 1, true);
this.gotoAndStop(1);
};
eval(newName).onRelease = function ()
{
/********** the code here is showing
External interface not working***********/
var isAvailable:Boolean = ExternalInterface.available;
if(!isAvailable){
logo._visible = false;
}
_root.ExternalInterface.call("as");
/************************************************** ***/
for( count = 0 ; count < numCountry ; count++ )
{
Name = "a" + count;
eval(Name)._visible = false;
}
for( count = 0 ; count < numCountry ; count++)
{
Name = "b" + count;
eval(Name)._visible = false;
}
file = parseInt(this._name.substr(1,1));
//mov = "image"+this._name ;
mov.loadMovie( array[ file - 1 ] );

};//"http://devserver/prototype/modules/mod_flash/"+
++i;
}

logo.onRelease = function(){
mov.unloadMovie();
for( count = 0 ; count < numCountry ; count++ )
{
Name = "a" + count;
eval(Name)._visible = true;
}
for( count = 0 ; count < numCountry ; count++)
{
Name = "b" + count;
eval(Name)._visible = true;
}

}


My javacode is :

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>New South Africaa</title>


</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script>
function as()
{

alert("yjid t");
return 0;
}
</script>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="1024" height="768" id="New South Africaa" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="New South Africaa.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="New South Africaa.swf" quality="high" bgcolor="#ffffff" width="1024" height="768" name="New South Africaa" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

</body>
</html>
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : mario:

View Replies !    View Related
Why Isn't This ExternalInterface Working?
I have been trying to use ExternalInterface to record "pages" in my flash site so I can see stats of them in google analytics. For the most part I have been doing this using the following:

ExternalInterface.call("urchinTracker('/main/stock')");

This is working fine. My problem is when I want to dynamically create the path name. I have used the following code but it is not working.

page = "'/"+button+"'"; //button is a variable which holds different strings
tracker = ""urchinTracker("+page+")"";
ExternalInterface.call(tracker);

Anyone spot what I am doing wrong?

Thanks

View Replies !    View Related
Externalinterface Not Working On Mac
Hello,

I'm trying to capture a click on a link in HTML (javascript) in a swf file (flash object). I use following code (see bottom)

On PC everything works in every browser... On mac it doesn't work on any browser.

I use allowScriptAcces = always ...

Does anyone have a clue what to do

By the way : in Opera on mac , an object is returned but I get a message afterwards TypeError. In Safari and in firefox no object is returned (null).

Thanks !









Attach Code

/* page is always a number
function callExternalInterface(page) {
getMovieName("kiosk").gotopage(page);
}
function getMovieName(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}

View Replies !    View Related
ExternalInterface Not Working On IE
I think it has to do with the ID tag, but no matter what solution that i have tried (have been working on it for a few hours) it doesn't seem to resolve the problem. Any ideas?







Attach Code

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="220" height="100" id="server/images2/gadget/gadget_messages">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="server/images2/gadget/gadget_messages.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="server/images2/gadget/gadget_messages.swf" quality="high" bgcolor="#ffffff" width="220" height="100" name="server/images2/gadget/gadget_messages" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

View Replies !    View Related
ExternalInterface Not Working On IE
I think it has to do with the ID tag, but no matter what solution that i have tried (have been working on it for a few hours) it doesn't seem to resolve the problem. Any ideas?











Attach Code

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="220" height="100" id="server/images2/gadget/gadget_messages">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="server/images2/gadget/gadget_messages.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="server/images2/gadget/gadget_messages.swf" quality="high" bgcolor="#ffffff" width="220" height="100" name="server/images2/gadget/gadget_messages" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

View Replies !    View Related
ExternalInterface.call() Not Working
Hi, I have problem making ExternalInterface.call() method work. I use Flash Pro 8 and .net 2 (COM Shockwave flash object) on Windows Form. I've based my app on "IntrovertIM_CSharp" sample, so I use ExternalInterfaceProxy.dll to manage calls.
Actionscript and c# code are at bottom.
My c# calls to actionscript (proxy.Call) work fine, but my actionscript calls to c# are not executed. "proxy_ExternalInterfaceCall" never gets executed.
Oh, yes, and if I leave "if(ExternalInterface.available)" check, I get app. exception, so app works only if I remove that check (partially though).

Can anyone help on this?









Attach Code

ACTIONSCRIPT:

import flash.external.*;

if(ExternalInterface.available)
{
ExternalInterface.addCallback("testFuntion", null, testFuntion);

function testFuntion(txt:String):Void
{
txtTest.htmlText = txt;
}

ExternalInterface.call("someCall", "something");
}


C#:

...
proxy = new ExternalInterfaceProxy(axShockwaveFlashControl);
proxy.ExternalInterfaceCall += new ExternalInterfaceCallEventHandler(proxy_ExternalInterfaceCall);
proxy.Call("testFuntion", "test");
...
private object proxy_ExternalInterfaceCall(object sender, ExternalInterfaceCallEventArgs e)
{
MessageBox.Show(e.FunctionCall.FunctionName); // does not execute!!!
switch (e.FunctionCall.FunctionName)
{
case "someCall":
MessageBox.Show((string)e.FunctionCall.Arguments[0]);
return null;
default:
return null;
}
}

View Replies !    View Related
Pop Up Not Working In IE - FSCommand? ExternalInterface?
Hi there! i'm having a problem with a javascript popup window not working in IE. It seems to be the getUrl and an active X issue. It works fine in FF and Safari. When i try it in IE the javascript transparent overlay shows up, but the pop up window does not open.

After reading post after post it seems that I either I need to be using an FSCommand with a VB Script for ie, or ExternalInterface class which is way beyond my comprehension at this point unfortunately. I have tried several things on my own as well, and can't get anything to work.

I was wondering if someone here had a moment to either lead me in the write direction or help me change the code I have into what will work for IE? There are a few others having the same problem that you would be helping immensly!!

Here's my AS code (the obvious)...


Code:
on (release) {
getURL("javascript:LightboxDelegate1('images/eyes1.jpg','Editorial & Promotional')");
}
and here's the code I have in my html file...

Code:
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />

<script type="text/javascript">
function LightboxDelegate1(url,caption) {
var objLink = document.createElement('a');
objLink.setAttribute('href',url);
objLink.setAttribute('rel','lightbox[editorial]');
objLink.setAttribute('title',caption);
Lightbox.prototype.start(objLink);
}
</script>

</head>

<body bgcolor="#808160">
<!--url's used in the movie-->
<a href="contact.html"></a>
<a href="images/eyes1.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/eyes2.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/eyes3.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/80s1.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/80s2.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/red1.jpg" rel="lightbox[editorial]" title="Editorial"></a>
<a href="images/red2.jpg" rel="lightbox[editorial]" title="Editorial"></a>

<div style="text-align:center; background: url(images/head.jpg) no-repeat top;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="990" height="520" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="home.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#808160" />
<embed src="home.swf" quality="high" bgcolor="#808160" width="990" height="520" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<p style="font-family: arial; font-size: 9px; color:#333; padding-top:20px;">This site, unfortunately, does not currently work on IE (Internet Explorer) due to it's lack of Active X. We are currently working on getting this fixed. You can view it on Safari or Firefox. If you do not have one of these browsers, you can download <a href="http://www.mozilla.com/en-US/">Firefox free here</a>!</p>
</div>
</body>
The site is www.saldestro.com if that helps

THANK YOU in advance!!!

View Replies !    View Related
Can't Get ExternalInterface.call() Working
ok, im changing a iframe via javascript, i got the js working fine, i can use a button to activate it.

im trying to use ExternalInterface.call("changeBody") ot call call my javascript "changeBody", however i can't get this to work. the page recognizes that something is getting called but i don't know something is just not rigth.

as3 script

Code:
function togBody(event:MouseEvent) {
ExternalInterface.call("changeBody");
}
home.addEventListener(MouseEvent.MOUSE_UP, togBody);
please anyone, any answers or even clues would help

View Replies !    View Related
F8|AS2 ExternalInterface AddCallback Not Working - Help
I have never posted to this forum before but I am about to pull my hair out. Please help.

I've created a page that used External Interface before with no problems and I can't figure out what makes this one different. It works fine on both Firefox and Safari on a Mac. On a pc, however, the Flash has no problem calling JavaScript functions but the JavaScript can't call the ActionScript function. It doesn't matter if I try Firefox, IE7 or IE6. The error IE gives is that the object doesn't support the property or method.

Here is the AS:

Code:
this.createEmptyMovieClip("samplework_mc", 999);

function loadWork(workname:String):Void {
loadMovie(workname, samplework_mc);
samplework_mc._x=0;
samplework_mc._y=0;
}

ExternalInterface.addCallback("loadWork", this, loadWork);


Here is the HTML/JS:

HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style>.popup { position: absolute; visibility: hidden; width: 200; z-index: 20 }</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
// <![CDATA[
function thisMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
function changePop(str) {
thisMovie("flashpopup").loadWork(str);
}
function viewPop(str) {
changePop(str);
document.getElementById('example1').style.visibility='visible'
}
function hidePop() {
document.getElementById('example1').style.visibility='hidden';
}
// ]]>
</script>
</head>

<body bgcolor="#ffffff">
<div id="flashcontent" style="z-index:10; position:absolute;"></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("thumbnails.swf", "thumnails", "750", "350", "8", "#d5d3a7");
so.addParam("wmode", "transparent");
so.addParam("allowScriptAccess", "always");
so.write("flashcontent");
// ]]>
</script>

<div class="popup" id="example1"></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("flashpopup.swf", "flashpopup", "800", "500", "8", "#d5d3a7");
so.addParam("wmode", "transparent");
so.addParam("allowScriptAccess", "always");
so.write("example1");
// ]]>
</script>

</body>
</html>


I would be grateful for any help or suggestions. I can post the FLA(s) if anyone wants to see them. Thanks!

View Replies !    View Related
ExternalInterface Not Working When Browser Closes
Hi

We have an SWF embedded in an html page as follows:
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
id="Music_Player" width="469" height="250"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="Music_Player.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#3c3c3c" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="Music_Player.swf" quality="high" bgcolor="#3c3c3c"
width="469" height="250" name="Music_Player" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>

On closing the html (browser), I want to call the closeBrowser function within the swf application. Hence I have used the following in my JS in the same html:

window.onbeforeunload = clean_up;
function clean_up()
{

Music_Player.closeBrowser();
//alert('This is a test alert');
}

Application:

if (ExternalInterface.available)
{
ExternalInterface.addCallback("closeBrowser", closeBrowserHandler);
}

Now, what happens is that, unless the alert is put in, the closeBrowserHandler is not executed at all, but when you have the alert, it works like a dream.

Any inputs on this would be appreciated, since this issue has been nagging us for months now.

Secondly, is there a way to detect that the Flex application is exiting / terminating from within the player. I could use this to execute the closeBrowserHandler function too. I could not find any applicationExit event similar to creationComplete .

Thanks,
Pooja

View Replies !    View Related
ExternalInterface.call Inside Iframe Not Working In IE
Hi all,

The structure of my site is as follows:

mainPage.html contains - menu.swf & iframe1

iframe1 contains - subpage.html

subpage.html contains - subMenu.swf & contentpage.html


The way it works is that when menu.swf is clicked it changes the .src of iframe1 to load the appropriate subpage.html. Then when you click the subMenu.swf it changes the .src of iframe2 to load the appropriate contentpage.html

This is all probably better illustrated if you have a look at the site http://www.curvecreations.com/portfo...cv_navnew.html

It all works perfectly in Firefox but in IE the ExternalInterface call from the subMenu never reaches the container page to change the .src of the iframe.

It seems as though it's something to do with the .swf being inside the iframe because I am still able to call a javascript function from within the iframe using an html button.

If anyone can help in any way i would be very grateful as my head is beginning to hurt from banging it against my desk.

View Replies !    View Related
Not Working In Safari, Nor At All On PC's
Hey all, I know this must be a snap, but....

I'm trying to load random swf files into a seperate swf file - it works, but only on mac

my actionscript for the mother swf file i copied from the Kirupa tutorial:

http://www.kirupa.com/developer/acti...ndom_movie.htm


check it out:
http://zero.eng.ucmerced.edu/snow/steve/index.html

here is the path to the 'mother' swf:
http://zero.eng.ucmerced.edu/snow/steve/flash/array.swf

Is there a bit of html I need? Is there some ActionScript to let things work on pcs?

why won't this work in all platforms?

?

stvgrn

View Replies !    View Related
FLV In Safari Not Working
Hi All!

I've been lurking around here for about a year now, and I've learned quite a bit from this site since then.

My FLV videos aren't playing when trying to view it in Safari (2.0.4) online. Weird thing is, Safari works completely fine LOCALLY. Something is causing the flv's to fail (when trying to view them in Safari) once it goes up on the web server, but works fine with every other browser I've tested it on (PC: FF 1.5.0.9, IE 7; MAC: FF 1.0.7).

Does anybody have any kind of insight to what's going on here?

If you'd like to see the issue: www.ampdstudiosessions.com
Click on the thumbnails at the bottom of the page (yeah, bad web design but that's someone else's problem )

Thanks in advance for any help you can give...

View Replies !    View Related
Not Working In Safari, Nor At All On PC's
Hey all, I know this must be a snap, but....

I'm trying to load random swf files into a seperate swf file - it works, but only on mac

my actionscript for the mother swf file i copied from the Kirupa tutorial:

http://www.kirupa.com/developer/acti...ndom_movie.htm


check it out:
http://zero.eng.ucmerced.edu/snow/steve/index.html

here is the path to the 'mother' swf:
http://zero.eng.ucmerced.edu/snow/steve/flash/array.swf

Is there a bit of html I need? Is there some ActionScript to let things work on pcs?

why won't this work in all platforms?

?

stvgrn

View Replies !    View Related
Get URL Not Working In Safari
I use the following code to open up a new page. It works fine in IE but in Safari nothing happens. Any ideas?

Thanks

getURL ("index.html", "self");

View Replies !    View Related
ExternalInterface In Actionscript 2.0
Hi there,
I wish someone can help me. I hope to get my flash project to run in Flash CS3 with actionscript 2.0.

There are some functions like "ExternalInterface.call(...)" that I am trying to call.

I added
import flash.external.ExternalInterface;

But it still does not work.

Thank in advance.

View Replies !    View Related
Get Url Not Working In Safari Browser
I use the following code to open a new file. This works fine in IE but in Safari, it does not open the page. Does anybody know why?

getURL ("index.html", "_self");

View Replies !    View Related
Javascript Not Working In Safari - HELP
ok so i don't know if i am posting this in the right section. i am posting here b/c i am using 2004. move as you wish.

anyways, my script that i am using to resize the browser to full screen works fine in ie and firefox, but not on safair. here is the script that i am using

<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.avail Height);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.wi ndow.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}

</script>




any help is appreciated

View Replies !    View Related
Whys It Not Working On Safari?
hi everyone...
I've just had an email from a client telling me that he's just downloaded Safari ( A browser for the MAc OSX) and that he can't view the flash I've placed on the site for him.

Now this is slightly worrying of course as he's saying he's dumping I.E. But anyway why would this happen..any ideas on the subject..I need help quick.

postatomic

View Replies !    View Related
HELP : AS Not Working When Previewed On SAFARI
Hello,

I have been a PC user for the last 10 years, and just a year ago, I shifted to MAC. I haven't done anything on my website so I thought I'd update it today. The problem is, my AS is not working on SAFARI but works when it's played on the FLASH PLAYER. I have doubled checked my script and it seems to be ok so far. I need a second opinion on this one.

Please point me to the right direction.

Download my FLA at this url http://www.allanrestauro.com/downloa.../interface.fla
I use FLASH 8 for MAC and running OSX with SAFARI



Best regards,
Allan

View Replies !    View Related
Flash Not Working In Safari
http://urbaninfluence.com/clients/lavita/

it works in all other browsers, but for some reason doesn't work on Safari for Mac. Does anyone know why this is?

Thanks for lookin'
-Mike

View Replies !    View Related
Mac, Safari >> SetVariable Not Working...
I have a javascript line in my movie that runs a function containing:


ActionScript Code:
// JAVASCRIPT LINE IN MY HTML
window.document.myFlashMovie.SetVariable("myVar","value");


This works fine on the PC in both IE and FireFox, but not on the MAC (Safari, IE, FireFox). Has anyone successfully used the SetVariable method on the Mac browsers?

Tony J.

View Replies !    View Related
[F8] ExternalInterface, JavaScript N ActionScript
I am trying to understand flash.external.ExternalInterface;
I want to call a function in javascript that will return the url to flash. When I press the button in flash that is supposed to call the function, I am returned null and I do not get the alert from the function.

Here is my JavaScript code

Code:
<body>
<script language="JavaScript">
function getLocation() {
return window.location.toString();
alert("wow");
}
</script>
Here is my ActionScript code


Code:
import flash.external.ExternalInterface;

function displayPageLocation():Void {
locationDisplay.text = ExternalInterface.call("getLocation","",new Object());
}

locationButton.addEventListener("click", mx.utils.Delegate.create(this, displayPageLocation));

View Replies !    View Related
ActionScript To JavaScript, ExternalInterface
Hi, searched for this problem but the solution does not match my case. And if it does I really don't understand how this works. Anyhow.

First off I import the ExternalInterface within my class. After that I make the call.


Code:
ExternalInterface.call("myFunction", "Works!");
My script which is in the HTML looks like this.


HTML Code:
<script language="javascript">
function myFunction(string)
{
alert(string);
}
</script>
Now why won't this work? I always get some security-complaint but all the files are local. Im very very sure..

View Replies !    View Related
Flash Player Not Working In Safari
I installed the latest version of Flash Player for the Intel Mac.
For some reason it has erased flash player and I can not see any swf files on the internet webpages.

I uninstalled and reinstalled serveral times.
Cleared history and cache and restarted the computer.

I have tried everything and still flash files dont show up in the safari browser.
I never ever had this problem with Macromedia was in control. Since Adobe took over.
I have had nothing but technical problems.

Can anyone help me?

View Replies !    View Related
Javascript Call Not Working In Safari
I have a dynamic text field where I create an html link based on a couple of pieces of data.

Here's an example of the code for the link:

Code:
var aTag:String = "<p class = 'landing'><a href="javascript:openVidPlayer('/vidplayer.html?video="+sel.v_id+"&category="+sel.cat+"');" target = '_parent'>"+sel.ttl+"</a></p>";
My problem is that the popup works fine in Windows IE, Mac/Win Firefox just fine. It won't work in Safari. It shows as link, but when you click, nothing happens. Can anyone think of a reason why this wouldn't work?

I also have an onPress handler on a movieclip that won't work in Safari:

Code:
main_mc.onPress = function() {
getURL("javascript:openVidPlayer('/vidplayer.html?video=" + sel.v_id + "&category=" + sel.cat + "');", "_parent");
};

View Replies !    View Related
GetURL Not Working Properly In Safari
getURL("index2.html", "_self");

is an action I use at the last frame of my movie. It works fine in windows. But I just got a macbook pro and in Safari the movie just keeps looping without ever going to index2.html. Weird as well, is the code that embeds the movie in the html page says not to loop... ?

What do I need to do to make this thing run thru once and jump to the next page in Safari? The actual page is at
www.centerpointpilates.com/index.html
P.S. I know the flash is unspectacular, the client wanted something temporary until we could hire someone to make one that is flashier.

Code:


<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="700" HEIGHT="500" id="splashBlack8" ALIGN="top">
<PARAM NAME=movie VALUE="splashBlack8.swf" /> <PARAM NAME=loop VALUE=false /> <PARAM NAME=quality VALUE=high /> <PARAM NAME=bgcolor VALUE=#000000 /> <EMBED src="splashBlack6.swf" loop=false quality=high bgcolor=#000000 WIDTH="700" HEIGHT="500" NAME="splashBlack8" ALIGN="top"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

View Replies !    View Related
HtmlText Links In Projector Not Working On Safari?
hi

I have a projector both mac and pc produced from a pc with a dyn text box that has a scroller.

I set the text using


Code:
content.htmlText = "This is the text and this is a link <a href='http://www.mylink.co.uk'>http://www.mylink.co.uk</a>"
This works across the board but on a mac if the default browser is set to safari, it opens the program but not the link

I am pretty desperate now, I am going to try produciong the projector from a mac and see if that helps.

Any ideas???

View Replies !    View Related
Feed Burner Reader Not Working In Safari And IE
I built an RSS reader in Actionscript 3 a while ago and have never had any problems until now.

Strangely, the reader works perfectly in FireFox and Opera, but does not in Safari and Internet Explorer 7. After looking into things, it seems to be a problem with what data my URLLoader is getting.

In FireFox, it gets an XML file, and URLLoader.data is of type XML.

In Safari and IE7, using the same feed address, URLLoader.data is not XML. Instead, it is the HTML to some kind of default Feed Burner page.

I've searched this forum and the internet and can't find mention of this problem. Anyone have any ideas? Why would different browsers cause the SWF to receive different data?

Maybe there's a way to get a pure XML file from Feed Burner feed without it forwarding?

Thanks in advance for any help

Cheers,

Kevin

View Replies !    View Related
Flash 8 Popup Window Not Working In Safari And Firefox
Hi, it just seems I can't make this work.
I wanted to create a simple popup window in Flash 8, added the script code to the page and used getURL("function in the script('page')") but it didn't work.
I also tried fscommand even if it's deprecated for Mac browsers.
I downloaded a couple of working .flas and (when I published the swf in Flash 8) didn't work either.

Anyways my code so far is:

Flash:


Code:
btn.onRelease = function () {
getURL("javascript:hey('danilo.htm')");
}
HTML:


Code:
<script language="JavaScript">
function hey(page) {
window.open(page)
}
</script>
Flash parameters:

Code:
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="popup.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="popup.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="popup" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
Some help needed...please!

View Replies !    View Related
Interactive Map Not Working In Safari Browser (Macintosh Machine)
Hi,
I've an interactive map to locate some places. Eveything is working fine in pc. but it's not working in safari (Macintosh Machine). While clicking the buttons at the bottom of map, the map is not scrolling to locate the position.

As far as I know the browser acts as like a tool to display the flash content. Everything is rendered by flash player.

But why it is happening like this. The flash player (Ver 8.0) I've tested is same in PC and Mac machine.

This is the url

http://www.links-realestate.com/dubai_map.html

Any one can suggest a solution for this it will be very helpful. thanks in advance.

View Replies !    View Related
Preloader Not Working In IE, Works Great In Safari And Firefox.
FLASH MX/1.0
I am wondering if anyone knows why this preloader does not work in Internet Explorer but works great in Safari and Firefox? I got the the preloader script from this tutorial:
http://www.kirupa.com/developer/mx/p...epreloader.htm

This is pretty much the only script used:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

Is there something missing that would make it work in IE?
Thanks in advance for any ideas.
BTW, here is the link to the site I am working on, you can test it in different browsers and see for yourself:
http://www.tmdphotography.com/packer...0site7-vid.swf

View Replies !    View Related
Blend> Overlay Is Not Working In Safari Over Site's Background Image
My message is concerning the website (below) called suspendedinsound.com.

The blend mode, Overlay, is not working on several of my movie clips in the Safari browser.

The Flash swf and html is published with a transparent background. I put a bg image (via CSS) in the html code. The objects with overlay (the large animating gold rings and play/stop/mute buttons), are not "overlaying" over the html's background image. They look yellow or cream instead of being very subtle (dark reddish brown). This is only a problem in the Safari browser. Looks great in Firefox and IE.

Anybody have a solution?

Thanks
-loren

http://www.suspendedinsound.com





























Edited: 02/22/2008 at 09:32:29 AM by clevermill.com

View Replies !    View Related
Actionscript 2.0 & Sound Object & Safari Probs
building an mp3 player and have created a class which creates the visual player and another which controls the sound object (play, stop, fade ins/outs).

However the problem is this:

when i click on a track, it starts streaming fine and after a few seconds it starts playing.

when I click the track again or any different track I get a message in safari's activity panel saying "plug-in canceled" in red! and also the status bars says "There was one error opening the page".

I know that what it should do when I select a different track is continue to download the original track - or am I wrong on that?

How can I stop this happening?

Thanks

View Replies !    View Related
This Actionscript Geturl Javascript Works In Safari, But Not IE Or Opera :(
I just have the following on a frame so that when it passes the frame it sets the css display property of a div from display="none" to "inline". It works in safari, seems to be the way to do it yet in Firefox and Internet explorer it tries to load a new window instead of sending the javascript code to the browser document.... any ideas??

Code:
getURL("javascript:document.getElementById('news0').style. display='inline'");

View Replies !    View Related
Intel Safari & Intel FP9 NOT WORKING
I have already read some posts indicating this problem and offering not better solution than going back on releases. Has anybody been able to successfully run FP9 (latest version April 12) in Safari?????

After installing it, I can't see any Flash Page at all!

ADOBE HELP PLEASE! (why don't you call the Macromedia guys for help)

View Replies !    View Related
Actionscript Not Working
Below is a script that has worked perfectly when I've used it before, yet it won't work this time.

The clip that this script is attached to loads in an external .swf file.. once it's fully loaded, I want another movieclip to become invisible.. but it's not working.. it doesn't become invisible.

Can anybody see what I'm doing wrong?




onClipEvent (enterFrame) {
if (this._url != _root._url && !loaded) {
var kilobytes = Math.ceil(this.getBytesTotal()/1024);
var percentLoaded = Math.ceil((this.getBytesLoaded()/this.getBytesTotal())*100);
}
}
onClipEvent (enterFrame) {
if (percentloaded == 100) {
setProperty (_root.shiningdownpreloader, _visible, false);
}
}

View Replies !    View Related
Actionscript Not Working ?
i have a piece of code which netscape doesnt seem to like can anyone suggest a modification to this or have a solution

icounter=icounter++;
myvar = "label"+icounter;
gotoAndStop (myvar);

i have three labels on the stage, pressing the button with this code on it just brings you from label one to label 3. it doesnt seem to like "label"+icounter;

there is more code on the button but it is this piece that isnt working.

i would like to keep it simple like this so the one button can be used instead of three seperate instances of the button with three seperate pieces of code.

works in IE fine.

any ideas

View Replies !    View Related
Actionscript Not Working :o(
In my flash movie i have buttons which all have the same code(basically)

They have an on release command then go to whatever frame. For some reason though the last button doesnt work when clicked for the second time. So you can click on it the first time, but then when it runs and finishes if you want to repeat it, it wont work! I genuinely cant see what ive done wrong as the code is pretty damn simple and its almost like flash has just buggered!

Any ideas?

Thanks

-Rob

View Replies !    View Related
Actionscript Not Working - HELP
All i want is for users to be able to click my 'skip intro' button and it take them to the homepage. Simple. Well that's what i thought. Here it is...

on (release) {
skip.onRelease = function() {
getURL("home.htm", "_self");
};
}

'skip' is the name of my button symbol. Excuse my newbieness but could someone tell me why it doesn't work? The button itself works as in when moused over the state changes, but when clicked it does nowt!

Cheers

View Replies !    View Related
Actionscript Not Working?
I did a menu in flash using action script. Its a mac menu, when you go over the icons it gets bigger.

It works fine on my computer, but in other computers it just does not resize.

Anyone know what it could be?



Below is the script, which is in the main scene of the movie.


MovieClip.prototype.scaleTo = function(xscale, yscale, speed, callbackObj, callbackFunc) {
this.createEmptyMovieClip('scale_mc', 2);
this.scale_mc.xscale = xscale;
this.scale_mc.yscale = yscale;
this.scale_mc.speed = speed;
this.scale_mc.callBackObj = callbackObj;
this.scale_mc.callBackFunc = callbackFunc;
this.scale_mc.onEnterFrame = function() {
this._parent._xscale += (xscale-this._parent._xscale)/speed;
this._parent._yscale += (yscale-this._parent._yscale)/speed;
if ((Math.abs(xscale-this._parent._xscale)<0.4) && (Math.abs(yscale-this._parent._yscale)<0.4)) {
this._parent._xscale = xscale;
this._parent._yscale = yscale;
var cbo = this.callBackObj;
var cbf = this.callBackFunc;
var prt = this._parent;
delete this.onEnterFrame;
this.removeMovieClip();
cbo[cbf](prt, 'scaleTo');
}
};
};
MovieClip.prototype.alphaTo = function(alpha, frames, callbackObj, callbackFunc) {
this.createEmptyMovieClip('alpha_mc', 3);
this.alpha_mc.alpha = alpha;
this.alpha_mc.frames = frames;
this.alpha_mc.framecount = 1;
this.alpha_mc.aperframe = (alpha-this._alpha)/frames;
this.alpha_mc.callBackObj = callbackObj;
this.alpha_mc.callBackFunc = callbackFunc;
this.alpha_mc.onEnterFrame = function() {
this._parent._alpha += this.aperframe;
if (this.framecount == this.frames) {
this._parent._alpha = this.alpha;
var cbo = this.callBackObj;
var cbf = this.callBackFunc;
var prt = this._parent;
delete this.onEnterFrame;
this.removeMovieClip();
cbo[cbf](prt, 'alphaTo');
} else {
this.framecount++;
}
};
};
stop();
_root.onMouseMove = function ()
//number of variables are here
{
for (var i=0; i!=29; i++) {
var xdst = Math.abs(_root._xmouse - _root["item"+i]._x);
var ydst = Math.abs(_root._ymouse - _root["item"+i]._y);
var scale = 165-(xdst/1);
var alpha = 100-(xdst/5);
//this is the distance that icons are effective 30 works!
if ((scale > 100) && (ydst < 10)) {
//below is the speed in which they scale up
_root["item"+i].scaleTo(scale, scale, 10);
//below is when transparency when mouse is over
_root["item"+i].alphaTo(alpha, 50);
} else {
if (_root["item"+i]._xscale != 100) {
// First 2 numbers, are the scale in which they rest in
// third number is the speed in which icons go back into
// place
_root["item"+i].scaleTo(100, 100, 3);
_root["item"+i].alphaTo(90, 90);
}
}
}
}

View Replies !    View Related
Why Isn't This Working In Actionscript 2.0?
Code:
DAMP = 0.9;
TSPEED = 3;
WSPEED = 1;
MovieClip.prototype.drawBlade = function() {
this.clear();
this.moveTo(-5, 0);
this.beginFill(this.clr, 100);
this.curveTo(this.cx-5, this.cy, this.ex, this.ey);
this.curveTo(this.cx+5, this.cy, 5, 0);
this.lineTo(-5, 0);
this.endFill();
};
function bladeMove() {
this.vx1 += Math.random()*TSPEED-TSPEED/2+_root.windx;
this.vy1 += Math.random()*TSPEED-TSPEED/2;
this.vx2 += Math.random()*TSPEED-TSPEED/2+_root.windx;
this.vy2 += Math.random()*TSPEED-TSPEED/2;
this.vx1 *= DAMP;
this.vx2 *= DAMP;
this.vy1 *= DAMP;
this.vy2 *= DAMP;
this.cx = this.cxR+this.vx1;
this.cy = this.cyR+this.vy1;
this.ex = this.exR+this.vx2+_root.windx;
this.ey = this.eyR+this.vy2+_root.windy;
this.drawBlade();
}
function windBlow() {
_root.windx += Math.random()*WSPEED-WSPEED/2;
_root.windx *= DAMP;
}
for (var i = 0; i<=100; ++i) {
var mc = this.createEmptyMovieClip("bottom_grass_MC"+i, i);
mc._x = i*5;
mc._y = Stage.height-50;
mc.clr = (0x20+random(0x45)) << 8;
mc.cx = mc.cxR=Math.random()*10-5;
mc.cy = mc.cyR=-(75+Math.random()*50);
mc.ex = mc.exR=Math.random()*10-5;
mc.ey = mc.eyR=mc.cyR*2;
mc.onEnterFrame = bladeMove;
}
this.onEnterFrame = windBlow;
Any help would be appreciated! Thanks.

View Replies !    View Related
Actionscript Not Working?
Im having trouble with this sig im making, and one I was trying to make before. I gave up on the last one becuae I could just not figure out why it wasnt working. I dont understand what Im doing wrong with my code.


Code:
sparkleOver.onRollOver = function() {
mcNotice._alpha = 0
}
There's one example.
sparkleOver is a mc inside of a button.
mcNotice is on the root layer.
This code is running from the root layer on an actions frame.

View Replies !    View Related
Got Actionscript Working With PHP... Almost...
Ok, so for the last few weeks I have been working on a real estate program inside of flash. It pulls data from an SQL database beautifully. I also made it so it could pick a price range. Now I am trying to create some dropdown menus with additional selections. The dropdown works fine and returns the proper value upon selection. If I copy the URL it creates I get the results properly, however inside of flash i keep getting this error:


TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at omgworking4_fla::MainTimeline/ParseVilla()
at omgworking4_fla::MainTimeline/LoadXML()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader:nComplete()


The issue code in frame 1 (the search frame) is:


function gotest(event:MouseEvent):void
{
test = "http://www.lebanoninternational.com/english/realestate/allinfo.php?pricelow="+pricelow.text
+"&pricehigh="+pricehigh.text
+"&region="+regionlist.selectedItem.data;
gotoAndPlay(2);
}


The test variable passes to frame 2 and then:


trace (test);
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest(test + new Date().getTime()));

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseVilla(xmlData);
}

var addy:int;


So I guess I am throwing it up here to see if you guys have any ideas. Like I said, the php code is working but for some reason flash is seeing the database as empty. Any ideas would be greatly appreciated.

-Kris

View Replies !    View Related
Actionscript And XML Working Together
http://clerccenter.gallaudet.edu/templates/videotest.html

hi - please see the above SWF. i created this using multiple scenes. my web guy here wants to be able to use an xml file so if you create 5 different FLV videos, instead of the same one playing over and over like the above, the XML will play the 6 different ones randomly.

is this possible? anyone out there know how to do this?

thanks!

View Replies !    View Related
Actionscript Not Working
For some reason i cant get

onClipEvent (enterframe) {
if (Key.isDown(Key.TAB)){
gotoAndStop(2)
}
}

to work!
even when i export it to an swf file it still doesnt work
I am using Flash MX 2004 version 7.0.1
and I am using a Mac

View Replies !    View Related
Actionscript And XML Working Together
http://clerccenter.gallaudet.edu/templates/videotest.html

hi - please see the above SWF. i created this using multiple scenes. my web guy here wants to be able to use an xml file so if you create 5 different FLV videos, instead of the same one playing over and over like the above, the XML will play the 6 different ones randomly.

is this possible? anyone out there know how to do this?

thanks!

View Replies !    View Related
Actionscript 1.0 Not Working
Hello!
I've never seen this issue before.... I have a swf main file, which at one point loads another swf (with a movie embeded to it) into an empty mc. Everything works well when I test the swf file. Now, once I embed the main swf file into a index.html file (I did this because I need the site to be centered), everything works, but the external swf file doen't load.....
Please help! I've tried different things but nothing worked!
Thanks for your time!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved