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








Testing Flash: Works Locally, Fails On The Web


My current project is displaying some very odd behavior I have never come across before. I am up against the wall with a deadline and no troubleshooting has lead to a solution yet. I am desperate for help.

I have a very simple SWF, plays some basic animation, and calls in external MP3 voiceover. Nothing complex. When the animation is complete, it lands on a static frame with 3 buttons. The buttons are actually instances of the same MC with a nested btn in, the text on the btn passed by a variable. Mouse over the btn and the MC plays a little animation. Click on the btn and a MovieClipLoader class calls in a SWF, which itself calls in another SWF of just formatted text.

For some reason this all tests well on my computer, and (very strangely) on our dev server for staging. When the files get deployed to to live site the animation plays through to the static frame with the btns, but when clicked the btns do not work. The external SWF does not load.

Now we've tested and tried every scenario checking the correct paths to the SWFs and everything is where it should be. I'm staring at the code waiting for something to jump out at me but it is very basic, and nothing looks astray.

We had a similar issue last night when the animation would not even play. It turned out the SWF was getting hung up on a frame that had an animated mask on it. I broke the mask into a shape and the SWF played properly after that. It took us 2 hours to figure that out. I was infuriated. Why would something so basic cause a movie to fail? Has anyone ever experienced this before? Is it a known bug? Could this be related to the issue of the btns now not working? I am at a loss where to try next, especially when something as random and obscure as a mask caused an earlier failure.

If you have any advice, please I would deeply appreciate it.

mm66


Code:
// this is the frame action on the final static frame of the presentation
stop();
voCar04.start(0, 0);
voCar04.setVolume(200);
voCar04.onSoundComplete = function(){
music.volumeTo(50, 2, "linear"); // using mc_tween imported class
}
// set text labels of the 3 buttons
headset_mc.label_mc.label_txt.text = "HEADSET";
cellPhone_mc.label_mc.label_txt.text = "MOBILE PHONE";
visorKit_mc.label_mc.label_txt.text = "CAR KIT";

var prodLoader:MovieClipLoader = new MovieClipLoader();

// sets the btn interactivity, plays a little animation when rolled over
headset_mc.hotSpot_btn.onRollOver = function(){
headset_mc.gotoAndPlay(2);
}
headset_mc.hotSpot_btn.onRollOut = function(){
headset_mc.gotoAndPlay(12);
}
cellPhone_mc.hotSpot_btn.onRollOver = function(){
cellPhone_mc.gotoAndPlay(2);
}
cellPhone_mc.hotSpot_btn.onRollOut = function(){
cellPhone_mc.gotoAndPlay(12);
}
visorKit_mc.hotSpot_btn.onRollOver = function(){
visorKit_mc.gotoAndPlay(2);
}
visorKit_mc.hotSpot_btn.onRollOut = function(){
visorKit_mc.gotoAndPlay(12);
}

// sets the call to the external SWFs, tried 2 methods of doing this, neither worked
headset_mc.hotSpot_btn.onRelease = function(){
_root.products_mc.loadMovie("product2.swf", 1);
//_root.prodLoader.loadClip("product2.swf", _root.products_mc);
}
cellPhone_mc.hotSpot_btn.onRelease = function(){
_root.prodLoader.loadClip("product3.swf", _root.products_mc);
}
visorKit_mc.hotSpot_btn.onRelease = function(){
_root.prodLoader.loadClip("product1.swf", _root.products_mc);
}




ActionScript.org Forums > Flash General Questions > Flash 8 General Questions
Posted on: 03-29-2008, 05:53 PM


View Complete Forum Thread with Replies

Sponsored Links:

Testing Flash: Works Locally, Fails On The Web
My current project is displaying some very odd behavior I have never come across before. I am up against the wall with a deadline and no troubleshooting has lead to a solution yet. I am desperate for help.

I have a very simple SWF, plays some basic animation, and calls in external MP3 voiceover. Nothing complex. When the animation is complete, it lands on a static frame with 3 buttons. The buttons are actually instances of the same MC with a nested btn in, the text on the btn passed by a variable. Mouse over the btn and the MC plays a little animation. Click on the btn and a MovieClipLoader class calls in a SWF, which itself calls in another SWF of just formatted text.

For some reason this all tests well on my computer, and (very strangely) on our dev server for staging. When the files get deployed to to live site the animation plays through to the static frame with the btns, but when clicked the btns do not work. The external SWF does not load.

Now we've tested and tried every scenario checking the correct paths to the SWFs and everything is where it should be. I'm staring at the code waiting for something to jump out at me but it is very basic, and nothing looks astray.

We had a similar issue last night when the animation would not even play. It turned out the SWF was getting hung up on a frame that had an animated mask on it. I broke the mask into a shape and the SWF played properly after that. It took us 2 hours to figure that out. I was infuriated. Why would something so basic cause a movie to fail? Has anyone ever experienced this before? Is it a known bug? Could this be related to the issue of the btns now not working? I am at a loss where to try next, especially when something as random and obscure as a mask caused an earlier failure.

If you have any advice, please I would deeply appreciate it.

mm66



Code:
// this is the frame action on the final static frame of the presentation
stop();
voCar04.start(0, 0);
voCar04.setVolume(200);
voCar04.onSoundComplete = function(){
music.volumeTo(50, 2, "linear"); // using mc_tween imported class
}
// set text labels of the 3 buttons
headset_mc.label_mc.label_txt.text = "HEADSET";
cellPhone_mc.label_mc.label_txt.text = "MOBILE PHONE";
visorKit_mc.label_mc.label_txt.text = "CAR KIT";

var prodLoader:MovieClipLoader = new MovieClipLoader();

// sets the btn interactivity, plays a little animation when rolled over
headset_mc.hotSpot_btn.onRollOver = function(){
headset_mc.gotoAndPlay(2);
}
headset_mc.hotSpot_btn.onRollOut = function(){
headset_mc.gotoAndPlay(12);
}
cellPhone_mc.hotSpot_btn.onRollOver = function(){
cellPhone_mc.gotoAndPlay(2);
}
cellPhone_mc.hotSpot_btn.onRollOut = function(){
cellPhone_mc.gotoAndPlay(12);
}
visorKit_mc.hotSpot_btn.onRollOver = function(){
visorKit_mc.gotoAndPlay(2);
}
visorKit_mc.hotSpot_btn.onRollOut = function(){
visorKit_mc.gotoAndPlay(12);
}

// sets the call to the external SWFs, tried 2 methods of doing this, neither worked
headset_mc.hotSpot_btn.onRelease = function(){
_root.products_mc.loadMovie("product2.swf", 1);
//_root.prodLoader.loadClip("product2.swf", _root.products_mc);
}
cellPhone_mc.hotSpot_btn.onRelease = function(){
_root.prodLoader.loadClip("product3.swf", _root.products_mc);
}
visorKit_mc.hotSpot_btn.onRelease = function(){
_root.prodLoader.loadClip("product1.swf", _root.products_mc);
}

View Replies !    View Related
Data Connect Works Locally But When Uploaded Fails
Edited: 07/13/2007 at 04:02:00 AM by Billy Harker

View Replies !    View Related
Testing Locally Works, Otherwise Doesnt...
when i test this locally, it works fine... but when its uploaded to the web, it only loads carousel2_mc..







Attach Code

var current_date:Date = new Date();
if (current_date.getHours()>=12) {
amPm = "PM";
}
if (amPm == "AM") {
carousel_mc._visible = true;
carousel2_mc._visible = false;
} else if (amPm == "PM") {
carousel2_mc._visible = true;
carousel_mc._visible = false;
}

View Replies !    View Related
Flash Works One Time In IE, Fails On Reload.
A flash slide show we made works fine in FireFox, and works the first time you load the page in IE7 (From a fresh application open). Once you view it in IE, and go to another page, then go back to that url, or just refresh the page, IE (I Tested this on 3 computers). Just shows a while blank box where the slide images are located. The flash is still loaded because the controllers are showing, its just now showing/loading the images.

I would post a Url for your viewing, but this is my first post.

Any ideas?

View Replies !    View Related
[F8] Flash Works Locally, But Not Online...
I put a .SWF on a blank web page. It launches and plays fine locally if I launch the page from my hard drive, but online I just get a blank white page. Here's the link:

http://al-i.anixter.com/TEMP/flashTemplate/index.html

Any ideas?! Thanks!...

View Replies !    View Related
Flash Player Only Works Locally
Im using this tutorial to create a flash player that works for Flash Player 6 & 7.

http://www.communitymx.com/content/article.cfm?cid=12EBE

It works great when I test it locally but not after its been uploaded. I've tried local and absolute url's, again both work only locally. Funny thing is I had bought a third party component for this and it did the same thing. I thought there was something wrong with the component.

Any help would be greatly appreciated.

Amelia

View Replies !    View Related
Flash Works Locally, But Not When Uploaded
i uploaded my new portfolio which is nested inside another mc, it runs on my computer.

the site loads but when i click on the portfolio button or just access the .swf directly, the window transfer bar loads a bit and then hangs at "Waiting for server.."


can anyone give me some hints as to what might be going on? i've re-upped files i thought may have been corrupted during the upload, checked the xml to make sure it looked ok, etc
and now im just stuck


thanks for any help

View Replies !    View Related
Http Interface Loaded Into XML Class Fails On Web (but Works In Flash IDE)
Hello All,

I am trying to pull in some random numbers from www.random.org's http interface as shown here:

code:

var my_lv:XML = new XML();
var randomNumbers:Array = null;

my_lv.onLoad = function(success:Boolean) {
if (success) {
trace(unescape(this.toString())); // this prints out the 10 random numbers
_root.randomNumbers = this.toString().split("
");
} else {
trace("Error loading/parsing LoadVars.");
}
};
// load the 10 random numbers as specified here
my_lv.load("http://www.random.org/integers/?num=10&min=1&max=6&col=1&base=10&format=plain&rnd =new");


The problem is that, while this succeeds when "testing movie" from the flash IDE, it fails when the flash movie is accessed by users on the server. I thought this might be a sandbox security issue, so I whitelisted the www.random.org domain in my crossdomain.xml file, but it still doesn't work.

The relevant live doc is here: http://livedocs.adobe.com/flash/9.0/...=00002333.html

it says things like:
--------
Parameters
url:String - A string that represents the URL where the XML document to be loaded is located. If the SWF file that issues this call is running in a web browser, url must be in the same domain as the SWF file.
------------

I also came across the following paragraph on the net:
----
TIP: IMPORTANT!!! You can only load XML files if they reside on the same network as the Flash Movie. This means you can not link to an external XML feed such as a RSS Newsfeed (you may have heard of them being called blogs). There is a way around this. Either through Flash Remoting or through a Server Side Scripting Technology such as Microsoft's ASP/.NET, Java Server Pages, ColdFusion or PHP. These tools can be used to connect to external XML feeds which can then pass the content onto your Flash movie.
-----

I also tried System.security.allowDomain("www.random.org") which didn't work.

In the flash IDE the load.success evaluates as "true" and load.status evaluates as "0"

On the web load.success evaluates as "false" but the load.status strangely evaluates as "0" also

Anyone have any ideas? Thank you.

View Replies !    View Related
Flash Site Works Locally ,but Not On Remote Server?
What wrong?

can any body give me a clue why can't i view my site when i uploaded it on my server? when i try to view it locally it works fine.

my home page is named, index.htm and on it is an embedded swf movie which calls two .swf files(menu and buttons) that completes the interface(i used loadmovie AS for this).all the required files(swf, txt,jpg..etc) resides on the same folder as the homepage. The menus, once selected will load the corresponding page/s which are swf movies. i made it this way and not put it all in one swf movie coz im afraid the file size would get really heavy coz i need to put pictures on each page. I have known of some sites that uses the same method so i knew this suppose to work, which it does locally.

i uploaded it on my server to checkout how wil it load, and to my suprise nothing came out on my browser! (but the status barof the browser seems loading huh?) then i tried uploading it on geocities.com just to se, if its the files that has the problem or the server. the home page did load together with the two swfs files (the button & menu), but they are not working.i can figure out what's wrong?
could some body help me on this please? did i overlooked something? are swf files are allowed on all kinds of server?

View Replies !    View Related
Sound Actionscript - Works Locally Not Online - Flash Mx
The following code works on my local machine but not when I upload.

I have a video which I use as a background to one section of the site. I load it into an empty mc which has the code below attached.

The scaling part works fine.

The part that causes problems is the audio. I want the Audio for the background video to play if the user is NOT listening to a mp3 (its a music artist site).
If they are listening to a mp3 I want it to be a silent video.
I use the _root.MP3Active to track if a mp3 is playing
0 = not playing
1 = playing.

I guess my problem is associated with the fact that the video loads instantly on my local macjhine but not online?

any ideas how to fix this or do it differently?
thanks mark


Code:
onClipEvent(load){
_root.BGVideoSound = new Sound(this);
}
onClipEvent(data){
this._xscale = 300;
this._yscale = 300;
_root.BGVideoSound.setVolume(0);
if(_root.MP3Active == 1){
_root.BGVideoSound.setVolume(0);
}
else{
_root.BGVideoSound.setVolume(100);
}
}

View Replies !    View Related
Flash Movie Works Locally But Won't Work Online
I have a flash movie that works fine in any folder on my local computer ( both the .swf file and .html file are in the same directory) but when I upload the files (.swf as binary) unchanged both to the same directory on the remote server, and access the .html file from the internet, the movie doesn't play.

the .html file is as follows:


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" />
<title>game</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<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="400" height="291" id="game" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="game.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="game.swf" quality="high" bgcolor="#ffffff" width="400" height="291" name="game" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
What is my problem?
Thx,
Total Newbie

View Replies !    View Related
Flash Video Player Works Locally But Not Live
I have a simple flash player which works locally but not when I make it live... I have an external flv file and its in the same directory as the swf file. Here's the page and code.

http://cf3.heritage.org/nationalsecurity/VideoTool/HIF_PlayerNEW.html


<!--- code ---------------------------------------------------------------------------------------------------------------- --->
<cfoutput><!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>HIF_PlayerNEW</title>
<script language="javascript"> AC_FL_RunContent = 0; </script>
<script src="

View Replies !    View Related
Flash Text-load Works Locally, But Not On Server
hi all

why ?
code

createClassObject(mx.controls.UIScrollBar, "my_sb", 320);
my_sb.setScrollTarget(my_txt);
// Size it to match the text field.
my_sb.setSize(16, my_txt._height);

// Move it next to the text field.
my_sb.move(my_txt._x + my_txt._width, my_txt._y);

// Load text to display and define onData handler.
var my_lv:LoadVars = new LoadVars();

my_lv.onData = function(src:String) {
if (src != undefined) {
//my_txt.htmlText = src;
my_txt.text = src;
my_txt.setTextFormat(my_fmt);
} else {
my_txt.text = "Error loading text. deinost";
}
};
my_lv.load("test.txt");

View Replies !    View Related
Flash Movie Works Locally But Won't Work Online
I am a total newbie to Flash so please forgive my ignorance. I have a flash movie (game.swf, game.html) that works fine when the .swf file and the .html file in which it is imbedded are are in any folder on my local machine. However when I upload both files to the root directory of the remote server, the movie doesn't work when I access the html file on the internet. Why does it work locally, but not on the internet?

View Replies !    View Related
Progressive Video Works When Tested From Flash But Fails Once Deployed On Server
Heres the code that I'm using
Code:
var videoURL:URLRequest = new URLRequest("");
var connection:NetConnection;
var stream:NetStream;

function sec(e:IOErrorEvent){
trace(e);
}
var videoX:int = 0;
var videoY:int = 0;
var request:URLRequest = new URLRequest("main.xml");
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, done);
var xml:XML = new XML();
loader.load(request);
var duration:Number =0;
var streamArray:Array = [];
var video:Video = new Video(150, 200);
function done(e:Event){
xml = new XML(loader.data);
for(var i:int = 0; i< xml.video.length(); i++){
videoURL = new URLRequest(xml.video[i].@url.toString());
videoX = xml.video[i].@x;
videoY = xml.video[i].@y;
connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, async);
connection.addEventListener(IOErrorEvent.IO_ERROR, sec);
video= new Video(150, 200);
connection.connect(null);
}
addEventListener(Event.ENTER_FRAME, loop);
}
var netClient:Object = new Object();
netClient.onCuePoint = onCuePoint;
netClient.onMetaData = onMetaData;
function loop(e:Event){
for(var k:int = 0; k < xml.video.length(); k++){
if(streamArray[k].time >= duration){
streamArray[k].seek(10);
}
}
}
function onCuePoint(info:Object):void
{
trace("cuePoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
}
function onMetaData(info:Object):void
{duration = (info.duration - 3);
trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
}

function async(event:AsyncErrorEvent){
trace ("there was an AsyncErrorEvent " +event);
}
function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case "NetConnection.Connect.Success":
connectStream();
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found: " + videoURL);
break;
}
}

function securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
}

function connectStream():void {
stream = new NetStream(connection);
streamArray.push(stream);
stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream.client = netClient;
video.attachNetStream(stream);
video.x = videoX;
video.y = videoY;
stream.play(videoURL.url);
addChild(video);
}
Just to reiterate, the file works fine when I test it in Flash and as a projector. The video doesn't load when I download the files from my server. I have checked to ensure that all the file paths are correct. Does anybody have any advice or suggestions? I appreciate any help that can be offered.

View Replies !    View Related
Testing Preloaders Locally
how can i test my preloaders locally? since i alreayd have the file downlaoded in my harddrive, i cant tell whether or not the preloaders are located in the right area, and whether or not they work. im using flash 8 if that helps.

View Replies !    View Related
Flash Video - Works When Testing But Not At Runtime
I am using an FLVPlayback component to load a video. In my code, a use a URLLoader to grab a variable from php. The variable is used to determine whether the video should automatically play from the start or jump to the end (where the user must then click a button to cause it to play).

This all works fine when I test within Flash. But when I load to my test server, the video always runs from the start - even when the variable coming from php directs it to jump to the end.

Does anyone have an idea as to what I've got wrong? I can post my code if that helps.

View Replies !    View Related
Flash Movie Works When Testing, But Not In Application
My flash movie works when I "Test Movie" within Flash 8 or when I press F12 and open it in the browser, but it only show the dynamic text, not the pictures when I place it within my page. The dynamic text changes properly but no images are displayed.

View Replies !    View Related
Using Server Files While Testing Locally
Hi Everyone,

I have a PHP file on my testing server that outputs XML, which I use in my Flash site. Does anyone know if there is a way to use that file when I'm testing locally?

Everytime I want to test a change to the Flash file, I have to publish it, upload it to my server, clear my browser cache and refresh the browser page. I've set my Local playback security to "Access Network Only" and created a crossdomain.xml file and placed it at my server root, but I still get an "Error opening URL" message when I publish the Flash file. This happens with both .php and .xml files.

Any thoughts?

Thanks in advance!

Luke

View Replies !    View Related
Testing File Uploads Locally
i'm doing a lot of testing on my project which involves a lot of uploading to my web server. this is ultimately increasing my bandwidth consumption so i'd like to test the uploads locally. i tried using an absolute path to my local folders in the relevant places in my AS but it gave the error
Code:
Error #2039: Invalid remote URL protocol. The remote URL protocol must be HTTP or HTTPS.
do i need to set up a local web server using apache or similar? i am running mac osx leopard.

thanks.

View Replies !    View Related
Trouble Testing NavigateToURL Locally
Is there anyway to test navigateToURL locally?

I want to load the URL into the current browser window. But _self and _parent do not seem to work. Supposedly these work from a web server. I'd like to test them locally.

null and _blank open a new window. Which works but is not how I'd like my site to work.

View Replies !    View Related
[F8] Testing.. It Works Export... Why Did It Break? (flash Counter)
So, I got a flash counter to work only when I test it out in flash but when I export it, it's broken.

http://neebit.com/s?ab8501c180.swf
(vote for anyone)

Got the code the counter here:
http://www.kirupa.com/developer/mx/hitcounter.htm

View Replies !    View Related
SendAndLoad With PHP Bug? Flash 6 Works, Flash 7 Fails
I’m using sendAndLoad to send information from a Flash “form” to PHP where an email is sent out. This should be simple, but I’ve reached some odd conclusions.

1) I can’t get it to fail on my machine. By fail I mean, the email does not go through and returns a failed response from PHP back to Flash.
2) It fails randomly for different people, but works most of the time.
3) Testing with HTML, the php script works, so I think it is in the Flash.
4) I have a friend who has tested on Win 2k sp4 w/ IE 6.0.2800 and Win XP sp2 w/IE 6.0.2900 and the script works when I export to Flash 6, fails consistently when I export to Flash 7.
5) One note - I’m using Progressive Video in the same site as this form, so it needs to work when exported to Flash 7.


So- My question is, Does anyone have any idea why this would work on some machines, and then not on others? Also- why would it work on ALL machines when exported to Flash 6, but fail when exported to Flash 7? I'm hoping that someone with fresh eyes has an idea of what I'm missing here or that someone has encountered this problem before and found a solution.


Here’s AS code basics (I’m taking out some of the details to shorten the code)


ActionScript Code:
//mailURL is set above as a string
_global.mailURL = "http://www.server.com/folder/mail.php;"

sendBtn.onRelease = function(){ 


    // there are some tests before this checking for valid input

   
var myVars = new LoadVars();
    myVars.email = email;
    myVars.list = list;
    myVars.message = message;
               
myVars.onLoad = function(success) {
        if (success) {
       
//ty is just a dynamic text field
        ty.text = "thank you, your message has been sent";
        ty.alphaTo(99,1);      
       
//Clear everything in a separate function
        tyReset = setNewTimeout(thankyouReset, 4000);      
                       
        //PHP returns with &response=
        //output is another dynamic text field for testing
output.text += myVars.response;
                                                           
        } else{
       
//tell user there was an error
        ty.text = "your message failed to send";
                       
        output.text += myVars.response;
       
}
    };
               
    //mailURL set above
myVars.sendAndLoad(mailURL, myVars, "POST");
    ty.text = "sending message...";
    ty.alphaTo(99,1);
                               
   
};

The PHP is fairly simple, and I’ve tested it alone successfully, but just in case here is the basics of the PHP that matter:


ActionScript Code:
if(mail($sendTo, "subjectLine", $message, $header)){


    $response = "SUCCESS";

    echo '&response='.urlencode($response);

}else{

    $response= "FAILURE";

    echo '&response='.urlencode($response);
}

View Replies !    View Related
LoadVars Says It Fails When It Works (?)
I don't get this... I'm sending stuff to my PHP script. I hit the button, it calls this function, sends the data, the vote stuff is done correctly server-side, everything works perfectly. Except I get the trace saying "Failed".

code:
function addVote(num) {
voting = new LoadVars();
voting.vote = num;
voting.mode = "vote";
voting.uid = _root.levelNum;
voting.onLoad = function(success) {
if (success) {
voteStatus.text = "Vote added.";
} else {
trace("Failed");
}
};
voting.sendAndLoad("http://www.mywebsite.com/myscript.php", voting, "POST");
removeMovieClip(dotHold);
}


Any ideas?

View Replies !    View Related
FLV Only Works Locally ...
I have encoded a .mov into a .flv in Flash Video Encoder... Then i used dreamweaver to put that into my website...

Dreamweaver has done all the stuff correctly (like adding scripts etc. ) because the video works on the website locally...

But when i upload everything to the server including the video and all the scripts it uses etc... --- i go to the website and the space for the video appears but no video appears!!!

Does anyone know why the website is not showing the video?? (again.. it works locally but not remotely!??)

Its only 3mb in size so i dont think thats the problem...

View Replies !    View Related
Textfield Selection Works Once, Then Fails....?
I'm having an odd problem selecting parts of a text field when the user clicks on the field. What I want to do is highlight a run of text that the user has selected with the mouse.

This works fine the first time. But after that, the beginIndex gets locked on 0, so the highlighting always starts from the first character.

Anyone have any suggestions?

I've included a minimal complete example, that can be pasted into a .fla and tested.


Code:

// Emphasize mouse-selected text
function emphasize(obj : Object) : Void {
if( !(obj instanceof TextField) ) return; // only TextFields in this example
var bi : Number = Selection.getBeginIndex();
var ei : Number = Selection.getEndIndex();

trace("bi = " + bi + ", ei = " + ei);

// apply our highlighting format to the selected text
obj.setTextFormat(bi, ei, fmt);
Selection.setFocus(null);
}

// On mouse up, see if cursor is on a text field. If so, emphasize text.
_level0.onMouseUp = function() {
for(p in this) {
// do a "hitTest" for a textfield
if(_xmouse > this[p]._x && _xmouse < this[p]._x + this[p]._width &&
_ymouse > this[p]._y && _ymouse < this[p]._y + this[p]._height) {
emphasize(this[p]);
return;
}
}
}

// a TextFormat to be applied to highlighted text
var fmt : TextFormat = new TextFormat();
fmt.bold = true;
fmt.color = 0xFF0000;

// a text field for testing
_level0.createTextField("testing_txt", 1, 100, 100, 300, 200);
var tf:TextField = _level0.testing_txt;
tf.multiline = true;
tf.wordWrap = true;
var plainFmt:TextFormat = new TextFormat();
plainFmt.size = 18;
tf.setNewTextFormat(plainFmt);
tf.text = "Select a run of text to apply highlighting to it.

";
tf.text += "For some reason, this works correctly only once!";

View Replies !    View Related
Absolute URL Works But Relative FAILS :S
Peepz,

i have a small email-form that sends 5 variables to php:


Code:
var contactForm = new LoadVars();

contactForm.naam = this._parent.mcTopFields.mcNaam.txtNaam.text;
contactForm.adres = this._parent.mcTopFields.mcAdres.txtAdres.text;
contactForm.woonplaats = this._parent.mcTopFields.mcWoonplaats.txtWoonplaats.text;
contactForm.email = this._parent.mcTopFields.mcEmail.txtEmail.text;
contactForm.vraag = this._parent.mcVraagHolder.mcVraagHolder.txtVraag.text;

// Send vars to PHP script to send mail
contactForm.sendAndLoad("http://www.testurl.biz/includes/contact.php",contactForm,"POST");
// == // == // == // == // == // == // == // == // == // == // == // == //
it works fine,

but if i set it online and i use this:

Code:
// Send vars to PHP script to send mail
contactForm.sendAndLoad("includes/contact.php",contactForm,"POST");
// == // == // == // == // == // == // == // == // == // == // == // ==
it won't work :S

can somebody explain why?

thnx peepz!

View Replies !    View Related
Absolute URL Works But Relative FAILS :S
Peepz,

i have a small email-form that sends 5 variables to php:


Code:
var contactForm = new LoadVars();

contactForm.naam = this._parent.mcTopFields.mcNaam.txtNaam.text;
contactForm.adres = this._parent.mcTopFields.mcAdres.txtAdres.text;
contactForm.woonplaats = this._parent.mcTopFields.mcWoonplaats.txtWoonplaats.text;
contactForm.email = this._parent.mcTopFields.mcEmail.txtEmail.text;
contactForm.vraag = this._parent.mcVraagHolder.mcVraagHolder.txtVraag.text;

// Send vars to PHP script to send mail
contactForm.sendAndLoad("http://www.testurl.biz/includes/contact.php",contactForm,"POST");
// == // == // == // == // == // == // == // == // == // == // == // == //
it works fine,

but if i set it online and i use this:

Code:
// Send vars to PHP script to send mail
contactForm.sendAndLoad("includes/contact.php",contactForm,"POST");
// == // == // == // == // == // == // == // == // == // == // == // ==
it won't work :S

can somebody explain why?

thnx peepz!

View Replies !    View Related
Progress Bars Works Then Fails
Hi i've got a progress bar (i know im another one of them who cant get them work..sorry)

the progress bar listens to a tree comp (its basically the sample file you get with flash mx 2004 pro (dont know if its the same for just mx 2004)) the difference is my tree has folders on it, when i use the preloader/progress bar it works the first time but after that when i load another swf it never completes???? i've attached the AS so hopefully someone can tell me if it dosn't work because of the folders or any suggestions.. would be greatfully recieved....

hope someone can help

var my_pb:mx.controls.ProgressBar;
var loader_mc:mx.controls.Loader;
var menuTree:mx.controls.Tree;

my_pb._visible = false;
my_pb.indeterminate = true;
my_pb.setSize(160, 30);
my_pb.source = loader_mc;
my_pb.mode = "polled";
var pbListener:Object = new Object();
pbListener.complete = function(evt:Object) {
txtXML.text="Preloader COMPLETE evt"
evt.target._visible = false;
};
my_pb.addEventListener("complete", pbListener);

var treeDP_xml:XML = new XML();
treeDP_xml.ignoreWhite = true;
treeDP_xml.onLoad = function(success:Boolean) {
if (success) {
menuTree.dataProvider = this.firstChild;
txtXML.text="XML Loaded"
}
};
//_root.whichXML
treeDP_xml.load("gem.xml");
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
txtXML.text="Preloader CHANGE evt"
var treeNode:XMLNode = evt.target.selectedItem;
if (treeNode.attributes.src != undefined) {
my_pb._visible = true;
txtXML.text="Preloader Initated"
loader_mc.load(treeNode.attributes.src);
}
};
menuTree.addEventListener("change", treeListener);

View Replies !    View Related
Works Locally But Not Online?
Hi

I'm loading jpgs like this:

in a for loop...

thumName = "thClip"+d;

_root.contHolder.cHolder.thHolder[thumName].imgHolder.loadMovie("thumbs/"+theReference+".jpg");



it works fine when I test the movie but not when I load it to my server, anyone got any idea why?

Cheers
L

View Replies !    View Related
Works Locally But Not Online?
I have a flash app that sends variables to asp. It works fine when tested locally but when I upload it and test it, it never sends the variables... Weird!

This is the script:


PHP Code:




on (release) {
    if (!epost.length || epost.indexOf("@") == -1 || epost.indexOf(".") == -1) {
        gotoAndStop(8);
    } else if (!name.length) {
        gotoAndStop(8);
    } else if (!adress.length) {
        gotoAndStop(8);
    } else if (!postnr.length) {
        gotoAndStop(8);
    } else if (!ort.length) {
        gotoAndStop(8);
    } else {
        ContestID = "147";
        loadVariablesNum("http://195.178.168.92/contest_skriv.asp", "0", "POST");
        gotoAndStop(9);
    }
}

View Replies !    View Related
SWF Works Locally, But Not On Webhost
Hi all,
First, let me say "thanks" for all the tutorials you have here - they've got me to the point I'm at now!!!
My problem is this - I created a flash movie that uses .txt files to populate a ComboBox with selections and when a selection is made from the combobox, 4 text fields are populated with that selections info from other txt files.
I was so jazzed when I got it to work (with Ctrl-Enter). I Published, ftp'd the html, swf, and text files to my web host, and guess what - it doesn't work there!!!
It is 3 frames -
Frame 1 - load the text file to populate the combobox.
Frame 2 - checks to see that the combobox text has been loaded - if not, go back to frame 1, if it has, it goes to frame 3.
Frame 3 - Shows the combobox and text fields.
There is a stop(); in frame 3, but it appears that the swf just loops, like it is not able to load the combobox.
See it NOT working here...
Does this seem like a problem with my file or a problem with my webhost???
Non-working FlashFile

Thanks so much,
BassFace

View Replies !    View Related
Locally Works - Server Does Not
Hello -

I have a flash file that imports photos from a folder and displays them. It works fine locally on my machine but when I put it on a server the pictures that rotate gets stuck on photo 1. Is this a publishing problem with actionscript 2.0 or what. have a look at my fla

Thanks!

View Replies !    View Related
Works Locally, But Not Over Internet?
Anybody have any idea why an .swf (or series of) would work fine from my local machine, but then when I upload to the webhost and try and view from there, it no longer works? I've verified the directory structure a couple times, including wiping the slate clean and uploading everything again.
Coordinates seem to be a little messed up, and I was thinking that it could have something to do with the loadMovie screwing up my coordinates, but it works from my local machine. Could it have to do with the fact that the mcs are loading more quickly in my local machine than they are over the internet? They aren't huge (34k) but I'm sure they aren't going to load as quckly.

I posted about this last night, but was really long-winded, which may have contributed to no response... if it helps to set the scene any...
http://www.flashkit.com/board/showth...hreadid=597692

any help would be HUGE
tia
msquito

View Replies !    View Related
Works Locally, Not On The Server
is there any reason why this code:


Code:
var _lv = new LoadVars ( );

_lv.youremail = youremail;
_lv.yourname = yourname;
_lv.yoururl = yoururl;
_lv.yourcomments = yourcomments;
_lv.receiver = "someone@someplace.com";

_lv.sendAndLoad ("http://www.someserver.com/hrform.aspx", _lv, "POST");


works locally but not when it is on the server? I have the following in my cross domain policy file:


Code:
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>


so I am allowing everything...

any ideas? thanks

View Replies !    View Related
[CS3] Swf Works Locally, Not On Server
I ran into an odd problem... I am loading a swf (residing on my server) into a mc using loadClip. It is working fine when I test it locally, but doesn't work when the calling swf is placed on my test server.

here is the code in question:


Code:
mcLoader.loadClip("http://***.com/***.swf", container);
};
function onLoadInit(mc:MovieClip) {
switch(_global.gameName){
case "game": container._height = 38;
container._width = 150;
container._x = 40;
container._lockroot = true;
gameWin();
break;
};
Any ideas?
Thanks

View Replies !    View Related
AS3 XML Works Locally But NOT On Dev Server
I have tried searching for answer in previous post but only came across a "cross domain" possible answer...however my files are all on the same domain same directory..

so problem is,
I have a flash CS3 slideshow using XML for the text, and to call images from folder in same directory...
it all works perfectly when tested in a browser from my desktop and also when uploaded to my iDisk, all is fine..
However it does not display when I upload the same files to the dev server;
data.xml
slideshow.swf
slideshow.html
AC_RunActiveContent.js
/images

the browser is calling the xml file but shows no images or text, just a the swf background art.

the flash file calls the xml

var xml_url:String = "xml/flash_news.xml";
var news_data:XML = new XML();

then xml file starts with

<?xml version="1.0" encoding="UTF-8"?>
and calls images like this:
<news>
<title><![CDATA[Title]]></title>
<description><![CDATA[description text]]></description>
<url>http://</url>
<image>img1.jpg</image>
</news>


anybody any ideas?
thanks mucho!

View Replies !    View Related
Works Locally But Not Online?
I'm kinda new to flash and fter weeks of getting this rather simple flash project to work on my hard drive I can't get it to work online.
http://www.cashton.co.uk/photos.swf
Its an XML driven photo gallery that currently has two major problems
1) Only some of the thumbs show up. All of Abel Tasman does but none of Auckland. I made all the thumbs in photoshop using an automated process of resizing and saving for web.
They're all under 2kb, non progressive, have lowercase names and extensions with no spaces in the filename. The file structure online is identical to the one on my hard drive

2) Only a few of the main photos display themselves the second one in Abel Tasman does but none of the others in the same folder do. Like the thumbs I made them all inexactly the same way and they're all under 25Kb so loading time shouldn't be more than a few secs on broadband.

I just can't think whats wrong as it works perfectly locally

Can anyone take a guess what might be wrong?

P.S. Yes I know the font on the buttons is hard to read its on my "to fix later list"

View Replies !    View Related
Pre-loader Works Locally But Not On The Net
Hi,

I'm making a photoalbum and I've created a preloader for it which works fine when I export it from flash and test it locally. However when I put it on the net the browser shows the percentage bar going up and when it gets to the top I'm presented with just the outlines of the of the photos. The photos do eventually load but after a fair while but the user has to look at the boring black and white outlines!
Anyway I've attached the .fla and other files the album needs and the link on the internet to see what I mean is:

www.grahamarcher.co.uk

Skip the intro then click on the photo tab (you have to view the site at 1280x1024 at the moment).

I'm not sure quite what the problem is but I hope you guys can give me some pointers.

Thanks in advance.

Graham

View Replies !    View Related
Works Locally But Not Remotely
Hi,
I'm loading jpegs randomly into my .fla. It works fine locally, and it worked fine when I tested it on my personal website. But on my company's site, the jpegs don't load. I'm thinking maybe it's a path issue, but not sure what the fix is...any help would be welcome.
This is the code I'm using:
randomNum = Math.round(Math.random()*15);
loadMovie(randomNum+".jpg", this.blank");
I've tried adding a path like /graphics/flash/2007jazzfest/this.blank but it doesn't like the /. I've tried quotes around everything, but it doesn't work...

You can see it work at:
http://www.willyurman.com/Test/jazzfest2007.html
1. click skip intro to get past the opening
2. click either small red 'jazz fest' button in the upper right or left. It should take you to the credit page where a different jazz quote appears at random at the bottom.
On my work site, everything works except that the quotes just don't load.

I go live with this Friday night(the 8th) so any help would be appreciated :)

thanks
will

View Replies !    View Related
Swf Works On Server, But Not Locally?
Hello Forum

It seems like security protocols have change in the past few months? I am able to test the swf from flash and also the swf on the server without a problem. What doesn't work is a swf launched locally on my desktop within the flash player as well as in the browser embedded in html. Is this normal? I'd like to be able to test the swf locally embedded in html to avoid having to constantly upload the new swf.

There is no warning coming up when I view the html page...?

I am using: :
- flash 8, actionscript 2
- Firefox
- allowscript access: always
- loading local xml files for the navigation and the content.
- Communicating between javascript and flash with simple getURL commands
Any idea what could be causing this and what I could do to change it so that I can view the swf/HTML locally?

Thank you

StephanK

View Replies !    View Related
Works Locally But Not On Server
Hey peeps!

I have a media player that gets passed in some values as flashVars.
The application works fine when I run it from flash (CS3) but when I upload it to a server it runs but doesn't connect to the media.

If you look here: http://sneeple.com/media_test/index.html you will see the player and it alerts that it cannot connect to the media at this location: http://www.sneeple.com/vg_rpc/rpc_media.php?mid=1

If you look at that url it checks whether access is allowed to the media item, establishes that it is not and returns this url: http://www.sneeple.com/no_access.swf

Now individually all of those work, but when I put them together they don't.

Now because if correctly alerts the url that it fails to load, there is nothing wrong with the data being passed in (domain and mid).

Thanks for any and all help.

//erlin!

The function that runs on load is this:








Attach Code

function loadMediaItem()
{
var mediaUrl:String = "http://www." + _root.site + "/vg_rpc/rpc_media.php?mid=" + _root.mIdx;
var lv:LoadVars = new LoadVars();
lv.load(mediaUrl);
lv.onLoad = function(success)
{
if(success)
{
var media = this["media"];
if(substring(media, media.length - 2, 3) == 'swf')
{
_root.createEmptyMovieClip("myMC", 1000);
myMC._y = 16;
myMC._x = 20;
myMC.loadMovie(media + "?site_url=" + _root.site);
return;
}

myDisplay.playStream(media);
return;
}
else
{
alert("Failed to obtain media from: " + mediaUrl);
}
}
}

View Replies !    View Related
LoadSound Only Works Locally
I've searched the fora and also looked at the excellent tutorial that one of the members has posted a link to, however;

I have a very simple use of loadSound, on it's own layer, on the only timeline I have,

Quote:




myMusic = new Sound();
myMusic.loadSound("music1.mp3",true);




music1.mp3 is 1.5meg and is in the same folder as the SWF.

Locally, this works fine, when I test the movie within Flash, the mp3 starts to play almost straight away.

The problem is that when I moved everything up to my server, the mp3 doesnt play. The .swf and the music1.mp3 are in the same folder on the server.

I don't think I need to give the full path to the mp3 do I ?

I tried moving the mp3 to it's own folder and changing the code to
Quote:




myMusic.loadSound("BBRmusic/music.mp3",true)




but still no joy.

Am I missing something here ?

Thank you, this is driving me nuts.

View Replies !    View Related
Locally Works, Internet Does Not
I am a newbie and I have been working on my portfolio.

Everything works fine locally but when I publish it to the internet, one of the buttons instead of loading will refresh the site if that makes sense.

if you go to my website you can see. www.destreedesign.com/index2.html

When you click on "Profile" it loads it, but when you click on "Showcase" it doesn't load it.. it reloads the site.

I have no idea where even to start. Any ideas?

View Replies !    View Related
XML Works Locally But Not On Server
I get this error when I try to create an swf for this scroller. Using Flash 8

**Error** Scene=Scene 1, layer=Controls_01, frame=1:Line 34: Syntax error.
TextField01 += chr(13) add chr(13);

Total ActionScript Errors: 1 Reported Errors: 1

--------------------------------------------------

CODE FRAME 1


Code:
var strLg = "EN";
var noPage = 1;

if (getTimer() < 6000)
{
xml1 = new XML();
xml1.onLoad = myOnLoad;
xml1.load("news.xml");
}

function myOnLoad (success) {
if (success)
{
TextField01 = "";
loadTxtBox(strLg, noPage);
}
}

function loadTxtBox(lg, no)
{
var i = 0;
var j = 0;
while (i < xml1.firstChild.childNodes.length)
{

if (((xml1.firstChild.childNodes[i].attributes.lg) == lg) && ((xml1.firstChild.childNodes[i].attributes.no) == no))
{
j = 0;
while (j < xml1.firstChild.childNodes[i].childNodes.length)
{
if (xml1.firstChild.childNodes[i].childNodes[j].nodeName != null)
{
TextField01 += xml1.firstChild.childNodes[i].childNodes[j].toString();
TextField01 += chr(13) add chr(13);
}
j ++;
}
break;
}

i ++;
}
}

XML CODE BELOW


Code:
<mainTxtBox><page lg="EN" no="1">
<title><font size="15" color="#ffffff">09/01/06 <b>Acclaim Film & TV Writing</b></font></title><br>Spring Pilot Competition<br>Finalist for "Being Frank"<br><br>
<title><font size="15" color="#ffffff">06/30/06 <b>PAGE Writing Awards</b></font></title><br>Screenwriting Competition<br>"Being Frank" Pilot to the Quarterfinals<br><br>
<title><font size="15" color="#ffffff">06/21/06 <b>CBS Diversity Institute</b></font></title><br>Network Staff Writing Position<br>"Entourage" Spec Script to 3rd Round<br><br>
<title><font size="15" color="#ffffff">05/04/06 <b>Snapped</b></font></title><br>Film Screening<br>Lead in School of Visual Arts Film<br><br>
<title><font size="15" color="#ffffff">12/01/05 <b>Best Drama Feature Film</b></font></title><br>Stray Cat in Brooklyn<br>NY Film & Video Festival Award<br><br>
<title><font size="15" color="#ffffff">11/17/05 <b>Stray Cat</b></font></title><br>Film Screening: NY Film & Video Festival<br>Lead Role<br><br>
<title><font size="15" color="#ffffff">11/10/05 <b>Stray Cat</b></font></title><br>Film Screening: Lower East Side Film Festival<br>Lead Role<br><br>
<title><font size="15" color="#ffffff">09/13/05 <b>AFTRA</b></font></title><br>TV & Radio Artists' Union<br>Membership Accepted<br><br>
</page></mainTxtBox>

View Replies !    View Related
Help My Gallery Works Locally But Not On Web?
I created a simple slide show that uses MovieClipLoader to load thumbnails into a clip at the bottom of the stage and then cycle through the full-size images on the main stage. It works fine at home (even when loading the files from the web since I hard-coded the URLs for the images).

When I post the swf file, nothing none of the images show up.no errors, nothing. Please tell me there is a simple solution. I am about to lose this client over this and I really need some help.

Thanks in advance,
jase.

View Replies !    View Related
Sound Works Locally, Not On Net
I've got a swf that loads in another swf that has some sound i'm looping. Everything works wonderfully locally but as soon as I put it up on the net, i don't hear anything!? Why is that?

View Replies !    View Related
Calling AttachMovie() With A Loaded SWF Sometimes Works, Sometimes Fails...
Hello all,
I could really use some fresh perspectives on a problem I'm facing. In a fairly complex app, I'm loading graphics and displaying them at various points. The graphics start life as individual SWF files, and are packaged into into the library of a 'media-pak' (A 10x10 SWF). Then when it's time to display the graphic, we jump through a whole bunch of hoops to display the graphic. This is all neccesary because the customer's location can tolerate a few large HTTP requests better than many small ones.

I use attachMovie() to pluck the graphic from the loaded media-pak. I know you can't cross SWF boundaries with attachMovie, so the graphic is displayed in a new empty movie clip within the loaded media-pak.

The problem is that for some graphics, attachMovie() silently fails. And for the life of me, I can't find anything different about the failing graphic. I've created a minimal failing test case and attached it along with the media-pak sources. Examine and publish test-media-pak.fla, and you'll see that it should display a graphic of glue, coins, and a drill. But the coins always fails!

Any ideas?

Thanks,
Clinton

View Replies !    View Related
Pop Up Window-works In A Test Fails In To Site
hello
i tried to make this effect you can see here -
http://www.kirupa.com/developer/mx/centered_popup.htm
and even download that file and changed things in it so it would fit me.

still it works when i try it on my computer but after i've unploaded it to my site it's not working. can any one treats me as a complete idiot and tells me exactly what do i need to do

View Replies !    View Related
Crossdomain: Xml SendAndLoad Fails, LoadMovie Works
I'm sort of at the end of my wits here; any help is appreciated. I've read up and tried several things to close in on this problem but to no avail.

I have a swf on an http server that needs to interact with servlets that are mapped to load from https.
* One servlet works fine (loadMovie hits a servlet and loads a captcha image).
* The other performs an xml.sendAndLoad, however the logs show no record of the request even making its way out of flash.

I have tested this same swf, having it hosted out of the https server, and everything works as expected...sendAndLoad works properly. I thought perhaps there was a problem with the mapping of the servlets and crossdomain file (I had to use loadPolicyFile since I don't have access to root on the https server) ... but since loadMovie and xml.send work, that seems to be ruled out.

I have a few different dev environments I've tested on, but they both use the same IP (different ports) for ssl/nonssl.

I'm publishing as flash 8 out of cs4.

thanks!

View Replies !    View Related
Load URL Works Locally But Not On Server
My mind is about to short. I may be missing something obvious but I can't tell

when i run the swf containing the following function call from my machine everything is fine and the URL is passed successfully.

When I upload it to the server...it fails. I don't get it.

oXMLLoader.getFrom("http://headlines.isyndicate.com/pages/dennisaugustine/medicalnews.xml");

Any hints?

I tried these variations already

oXMLLoader.getFrom('http://headlines.isyndicate.com/pages/dennisaugustine/medicalnews.xml');

and

oXMLLoader.getFrom(String("http://headlines.isyndicate.com/pages/dennisaugustine/medicalnews.xml"));



Appreciated

Dennis

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