Script Works Locally - But Not On Server
im using some script to dynamically load jpegs. basiclaly it reads a number from a text file and loops through duplicating mcs and loading the jpegs, which are called 1,2,3 etc.
this works on my local machine but when i put it live it:
a) opens the text file but assigns the variable a null value instead of the number
or b) if i hardcode the number in the a.s. it still fails to load the jpegs.
any input welcomed. thanks
loadNum = new LoadVars (); loadNum.onLoad = function (ok) { if (ok) { //_root.numPics = 3; _root.numPics = _root.loadNum.numb; _root.loaded.text=numPics; //## start duplicating movie clip holder for images for (i = 1; i <= _root.numPics; i++) { holder_mc.duplicateMovieClip ("holder_" + i + "_mc", i); _root["holder_" + i + "_mc"]._x = 0; _root["holder_" + i + "_mc"]._y = 0; _root["holder_" + i + "_mc"].inner_mc.loadMovie ("images_flash/" + i + ".jpg"); //### duplicate the thumb mc to make into thumbnails _root.holder_mc.duplicateMovieClip ("thumb_" + i + "_mc", (i + 100)); //load images into thumbs _root["thumb_" + i + "_mc"].inner_mc.loadMovie ("images_flash/" + i + ".jpg"); // positin and size thumbnail _root["thumb_" + i + "_mc"]._x = (i * 43) - 30; _root["thumb_" + i + "_mc"]._y = 160; _root["thumb_" + i + "_mc"]._width = 30; _root["thumb_" + i + "_mc"]._height = 40; _root["thumb_" + i + "_mc"]._alpha = 40; //## change alpha on rollover _root["thumb_" + i + "_mc"].onRollOver = function () {
_root.fadein (this); // function defined earlier in script }; //## change alpha on rollout _root["thumb_" + i + "_mc"].onRollOut = function () {
_root.fadeout (this); // function defined earlier in script }; } } }; loadNum.load ("numpics.txt");
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-12-2004, 12:48 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Locally Works - Server Does Not
- Works Locally, Not On The Server
- [CS3] Swf Works Locally, Not On Server
- AS3 XML Works Locally But NOT On Dev Server
- Swf Works On Server, But Not Locally?
- Works Locally But Not On Server
- XML Works Locally But Not On Server
- Works Locally But Not On Server
- Load URL Works Locally But Not On Server
- Works Locally, Messes Up On Server
- Login Works Locally But Not Always On Server....
- Loading Swf's Locally Works, But Not Over The Server
- XML Load Works Locally But Not On The Server
- Remoting Works Locally Not On Server
- ActionScript (2.0) Works Locally But Not From Server... What's Up?
- RSS Reader Works Locally But Not On Server.
- RSS Reader Works Locally But Not On Server.
- Load MC Level 1 -> Works Locally But Not From Server... ?
- GET And POST - Works Server Side, But Not Locally
- XML Doesn't Load On Server But Works Ok Locally
- Flash Site Works Locally ,but Not On Remote Server?
- LoadMovie Doesn't Work On Server, Works Locally?
- OnKeyDown(key.ENTER) Works Locally But Not Uploaded On A Server
- Cant Load File From Server With URLrequest, But Works Locally
- Scroll Bar Component Issue - Works Locally But Not On Server
- Flash Text-load Works Locally, But Not On Server
- Load MC Level1, Set Prop, Telltarget -> Works Locally, Not From Server .... ?
- SWF Works Locally, Button Handlers Fail On External Server
- SendAndLoad Dosent Works On A Remote Server But Worls Locally
- Help On Dynamic Textfield Loading .txt File Who Works Locally But Dont On The Server
- [MX04Pro] Any Ideas Why This Loader Breaks On Server, Works Fine Locally?
- Stream Works From Local Desktop To Server But Not Server To Server
- FLV Only Works Locally ...
- Works Locally But Not Online?
- Works Locally But Not Online?
- SWF Works Locally, But Not On Webhost
- Works Locally, But Not Over Internet?
- Works Locally But Not Online?
- Pre-loader Works Locally But Not On The Net
- Works Locally But Not Remotely
- LoadSound Only Works Locally
- Locally Works, Internet Does Not
- Works Locally But Not Remotely
- Help My Gallery Works Locally But Not On Web?
- Sound Works Locally, Not On Net
- [F8] Swf Locally And On Server
- StartDrag Works Locally But Not Online...
- Same Movie Works Locally On Mac But Not From Site
- LoadMovie Works Locally, Not Remotely
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!
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
[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
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!
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
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);
}
}
}
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>
Works Locally But Not On Server
CODEon (release) {
nowPlaying = new Sound();
nowPlaying.loadSound("folder/file.mp3",false);
interval = setInterval (function() {
if (nowPlaying.getBytesLoaded() == nowPlaying.getBytesTotal()) {
clearInterval(interval);
nowPlaying.start();
nowPlay.text = "Song Name";
} else {
nowPlay.text = "Loading...";
}
},100)
}
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
Works Locally, Messes Up On Server
Hi, fellow newbies!
I'm starting to learn Flash 5, and just when I thought I'd gotten my movie working right, I uploaded it to my server and now its behavior is different.
Here's the deal:
I have a movie that plays out when someone first hits the site. After the animation plays, it turns into the navigation menu.
The movie sits on EVERY page, so I set it to play through only when someone hits my index.html page. When they go to any other page in the site, the movie starts on the LAST FRAME, making it a static menu.
I set this up by putting this on Frame 1:
if (flag == 1) {
gotoAndPlay (97);
}
(97 is the last frame of the movie, i.e. the navigation menu.)
On the index.html page, I use this code:
<EMBED src="pieceofeight.swf" loop=false menu=false quality=medium salign=T wmode=transparent bgcolor=#FFFFFF WIDTH=755 HEIGHT=231 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
On every OTHER page, this code tells the movie to look for Flag == 1:
<EMBED src="pieceofeight.swf?flag=1" loop=false menu=false quality=autohigh salign=T wmode=transparent bgcolor=#FFFFFF WIDTH=755 HEIGHT=231 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
This works fine when running it locally, but when I tested it on a server, all the subpages are playing the full movie instead of starting on Frame 97. Worse, they're playing the movie over and over, even though "loop=false" in the embed tag.
Does anyone know what's going on here? Could loading time have anything to do with it? (I haven't added a preloader to it yet.)
Thanks for your help!
Devon
Login Works Locally But Not Always On Server....
Ive got a small login script that calls the username, password and url that the user is sent to upon success from a text file. Security isnt an issue as the site its for will only show this page to a few people for them to access some demo video and stuff.
My client gave me this file and i had to sort the code out because it was a mess and everything works fine while i test it on my computer but once i then upload it to a server to test sometimes it works and sometimes it doesnt and i cant for the life of me work out why.
Could someone take a look at the script ive attached and try and help me out as ive been pulling my hair out for the last few hours now and its just about to hit 7am
Thanks to anyone that can offer help....
Loading Swf's Locally Works, But Not Over The Server
I am building this splash page with a website, and at a certain point i call
myMCL.loadClip("circle.swf", 5);
and it works fine when i am on my machine. When I upload it, it doesn't work, yet if I go to it directly by typing in the url for that specific swf (.../circle.swf), it comes up, but just won't come up on the movie.
This has been happening a few times, and i keep just joining the movies manually from two separate files since I am on a time crunch, but I eventually have to figure out what I am doing wrong.
Any suggestions?
THANKS... thanks thanks thanks...can't type it enough.
XML Load Works Locally But Not On The Server
Hi, I'm working on a slideshow which loads images from an XML file. When I'm testing it locally it's working fine, but when I uploaded it to the web-server it seems like the XML won't load.
Remoting Works Locally Not On Server
my flash remoting file work perfectly locally, but not when i upload the files to my server. what could cause this?
the movie is a simple textbox that pulls data from a SQL db, and scrools it across the screen.
if it helps the a.s. looks like this:
#include "NetServices.as"
if (inited == null) {
// do this code only once
inited = true;
// set the default gateway URL (this is used only in authoring)
NetServices.setDefaultGatewayUrl("http://www.irsd.net/flashservices/gateway");
// connect to the gateway
gateway_conn = NetServices.createGatewayConnection();
// get a reference to a service
newsService = gateway_conn.getService("http://www.irsd.net/components/news.cfc?wsdl", this);
newsService.getAnnouncements();
announcement_mc._x = 749;
}
function getAnnouncements_Result (result) {
var len = result.getLength();
if(len < 1)
{
announcement_mc.announce_txt.text = "Watch this scroll for important IRSD news...";
}
var obj = result.getItemAt(0).Title + " . . .";
for(var i = 1; i < len; i++)
{
obj = obj + " " + result.getItemAt(i).Title + " . . .";
}
with (announcement_mc.announce_txt) {
autoSize = "left";
text = obj;
}
}
if ((announcement_mc._x > 0) || (announcement_mc.announce_txt.maxhscroll == 0)){
announcement_mc._x -= 1;
}
if ((announcement_mc.announce_txt.hscroll == announcement_mc.announce_txt.maxhscroll) && (announcement_mc.announce_txt.maxhscroll != 0)) {
announcement_mc._x -= 1;
}
if ((announcement_mc._x == 0) && (announcement_mc.announce_txt.maxhscroll != 0)) {
announcement_mc.announce_txt.hscroll += 1;
}
if (announcement_mc._x < (announcement_mc.announce_txt._width * -1)) {
announcement_mc._x = 749;
announcement_mc.announce_txt.hscroll = 0;
}
ActionScript (2.0) Works Locally But Not From Server... What's Up?
Greetings: I have a main flash movie and am calling an external flash movie that loads a FLV file. This external SWF file simply plays back a video. All is working here fine. In this externally loaded flash movie I also have two buttons that are supposed to close the window underneath it and then unload it.
It is these two buttons that work perfectly when I test the movie locally within the Flash CS3 environment but do not work when I upload the files to the server; Here is the code on button 1:
---------------------------------------
_root.onEnterFrame = function() {
loadMovieNum("
RSS Reader Works Locally But Not On Server.
Hey everyone...
Found this great little .fla online that will allow me to read a RSS Feed.
The .swf works perfectly locally, but once i upload it to the server it doesn't.
Any help will be appreciated.
Links:
The .swf
http://www.snehal.org/USSPROMETHEUS.swf
The .fla size (300Kish)
http://www.snehal.org/USSPROMETHEUS.fla
RSS Reader Works Locally But Not On Server.
Hey everyone...
Found this great little .fla online that will allow me to read a RSS Feed.
The .swf works perfectly locally, but once i upload it to the server it doesn't.
Any help will be appreciated.
Links:
The .swf
http://www.snehal.org/USSPROMETHEUS.swf
The .fla size (300Kish)
http://www.snehal.org/USSPROMETHEUS.fla
Load MC Level 1 -> Works Locally But Not From Server... ?
Ok Gurus, I need your assistance!
In an attempt to get away from telltarget, and using dot-syntax, and ensuring the level1 MC is loaded before positioning and playing, the MCs work locally but not when placed out on a server. What gives?
The MCs are as follows:
Main MC, scene "Television" (level0):
Frame 2:
loadMovieNum ("export-TV.swf", 1);
Frame 4:
if (_level0.lev1Loaded=true) {
trace ("level 1 loaded");
_level1._x = 1;
_level1._y = 93;
_level1.gotoAndPlay("start");
} else {
trace ("loading level 1");
gotoAndPlay ("Television", 3);
}
MC export-TV.swf
Frame 1:
stop();
Last frame:
_level0.lev1Loaded=true
Test movie proves that the level1 loads and plays as desired (trace outputs "level 1 loaded").
Placing out on the server, however, it does not work. The level1 MC *does* load (verified by looking in temp files listing), however, it does not play. If I cut the connection to the server and execute the movie (in "non-connected" mode), then it does play.
Anyone have any suggestions?
GET And POST - Works Server Side, But Not Locally
My Problem:
I have a flash chat that I programed using some tuts (made with php). On the server side all works fine when I use my broser to view it.
What I need though is for the swf (call it chat.swf) to call the files (chat.php) from the server doing both GET and POST while being ran off my desktop. ie. After publishing my swf from my fla (still on my system, not the server) I want the "RAW" chat.swf (locally) to call the chat.php file on the server and still function correctly.
The Major Issue:
When I try it locally it will only let me GET the variables of my remote php files but not POST variables to my php files. I know that some if not all servers, dont let you do some cross-server thing (dont really know what it is) but if so... then why can I read the files but not write to them...
Files:
chat.swf (self explainatory)
chat.txt (contains the conversation)
chat.php (takes the swf variable and updates the chat.txt file then sends the chat.txt file back as the variable to be displayed in the chat.swf)
Please help me... I need this for school next week... (a big project.
Mr. Rich
XML Doesn't Load On Server But Works Ok Locally
Hi,
I'm facing a problem which really has confused me! I have a video player which grabs the playlist from an XML file. if the path is relative to the XML, It's fine and works but when enter an absolute path (Which is on another domain) it doesn't work! here it is:
http://emstris.com/sample/doftelie/newpath.html
The strange thing is that it does work fine when I test the movie locally in my flash!!!
Have you ever faced such a problem?! Can you help me please?
Regards,
Hadi
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?
LoadMovie Doesn't Work On Server, Works Locally?
so i've developed this portfolio thingy for our company site. i'm using flash MX, but publishing in flash 5, if that matters.
here's the URL:
http://www.nycd.com/test/portfolio/p...io_update.html
the way it works: when you click on one of the thumbnails, it loads the appropriate SWF into a blank movie clip. pretty straightforward.
it works fine locally (running off my hard drive), but when uploaded to the server, it behaves strangely. the movieclips load, but skip the preloader that i've put in them, and just display nothing. however, i know they're loading, because if you wait a few seconds and click on them again, they work... i'm at a loss. any help if appreciated it. if you want to look at the FLAs, they're here:
http://www.nycd.com/test/portfolio/portfolio_update.fla
(the main portfolio piece)
http://www.nycd.com/test/portfolio/ml.fla
(one of the SWFs that loads in)
OnKeyDown(key.ENTER) Works Locally But Not Uploaded On A Server
Hi.
I have the following code:
this.passinput.onSetFocus = function() {
};
Key.removeListener(this.passinput);
this.passinput.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
loadVariablesNum("first_login.php", 0, "POST");
_root.test_mc.gotoAndPlay(2);
}
};
Key.addListener(this.passinput);
The test_mc should go to the second frame where it is of another color. If i test it locally on my PC, it works but if I upload it to the web site and try then pressing enter no longer works.
Has anyone any idea of how to fix this?
Thank you.
Cant Load File From Server With URLrequest, But Works Locally
Hi there.
I was wondering if anyone know about this.
I have made a XMLloader with URLrequest, and it works locally by calling the file directly by its name ie. "myFile.swf".
var presLoader:Loader = new Loader();
presLoader.load(new URLRequest("myFile.swf"));
addChild(presLoader);
But when I uploaded the loader to the server, I have no file, only "URL not found"-error. So I found out that I should change to URL to "/Files/Images/subloader/myFile.swf" then it will load.
But thats a real problem, because I have several loaders.
Whats my problem??
Scroll Bar Component Issue - Works Locally But Not On Server
Hi,
I got scrollbar components in my movie that work locally but only appear as black outlines when viewed from our webserver?
I am preloading classes and components using the method of placing an instance of all library linkage items on frame 5 and exporting classes on the same frame.
I'll post a link or an fla if anyone cares to help me with this.
Thanks.
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");
Load MC Level1, Set Prop, Telltarget -> Works Locally, Not From Server .... ?
Hi Gurus,
Having a frustrating problem with loading an MC into level1, setting x and y properties, and then starting the MC. Seems to work fine locally, but does not work when placed out on a live server. If I remove the stop() action from the targeting MC, the MC then plays, but then frames 4 and 5 of the main MC (set props, start) from the main MC seem to be ignored. Any ideas?
Main MC:
Scene3
Frame 2: loadMovieNum ("export-TV.swf", 1);
Frame 4: tellTarget ("_level1") {
setProperty ("_level1", _x, "1");
setProperty ("_level1", _y, "93");
}
Frame 5: tellTarget ("_level1") {
gotoAndPlay ("start");
}
MC export-TV.swf
Frame 1: stop();
Frame 2: label = start
SWF Works Locally, Button Handlers Fail On External Server
Hello all,
I was going to post in the general flash help section, but I read in the rules that if I'm using AS3 I should post here.
So basically I have a working(locally) mp3 player. The only external files it loads are through the URLRequest. By default it loads an mp3 in the swf's execution dir.
Basically, everything works great when I run it locally. Loads external URL's, and everything. When I upload it to my dev server, and try to access it via web, the button handlers for my buttons don't do anything.
I'm using AS3 and Flex3 components. I'm coding everything except the set up of the design in AS3, using a Code-Behind model to keep logic and design apart.
I get the vibe that there is a security setting that I'm not aware of. I searched these forums, Kirupa forums, Google for about 2 hours.... Can't come up with anything. Just when I start to think I'm close, I find posts that are [SOLVED] with no solution posted.
Any help is appreciated! I'm trying to test this through the web to get a feel for client experience as well as to verify accuracy with the HSlider and the mp3 channel.
Thanks in advance,
Chris
SendAndLoad Dosent Works On A Remote Server But Worls Locally
Hi,
I really have a serious problem using the sendAndLoad method which i use to retrieve variable from mysql DB uploaded on a remote server. I have the php files in a folder functions which is under web and the AS classes and swf and html in the root of the web folder uploaded on the FTP server. When I execute this method locally everything is working perfectly but when it is uploaded on the server with the same db i get undefined value (vars.lastorder = this.lastorder;).I actually need to get the last order id from the PHP script. When I try and pass data the method is working and the server executes insert query but when i try retrieve im not able to retrieve the value remotley I really dont have an idea about this problem cause its functioning on the local level and not remotely. Im using Apache 2.0 server locally and the hosting provider has 1.3.37 could this be a problem? Or there are some security issues involved? Or do you see a problem that the action script files and the php are not in the same folder but i dont think so cause the other methods are working.
Can you give me any suggestions im really trying hard with this problem 3 days. The code that I use is posted below.
Attach Code
/** ACTION SCRIPT 2.0 CODE */
dataIn.onLoad = function() {
if (this.result1 == "1") {
var listOfItems :Array = new Array();
listOfItems = shoppingCart.getCart();
var i:Number;
var vars:LoadVars = new LoadVars();
for (i=0; i<listOfItems.length;i++)
{
var dummy:LoadVars = new LoadVars();
var itemx:Item= new Item();
itemx = listOfItems[i];
vars.productname = itemx.getName();
vars.quantity = itemx.getQuantity();
vars.lastorder = this.lastorder;
vars.sendAndLoad(ip+"/functions/order2.php",dummy,"POST");
}
shoppingCart.removeAllItems();
totalPreis =new Number(0);
grid1.removeAll();
custName = _root.od_payment_first_name.text;
custSurname = _root.od_payment_last_name.text;
_level0.gotoAndStop("thankYouFrame");
} else {
Alert.okLabel = "Nein";
var alertbox:Alert = Alert.show("Sorry there has been a technical problem !!", "Cart alert", Alert.OK);
}
};
/** PHP CODE * PART OF IT /
$resultx = mysql_query("SELECT tbl_order.od_id FROM tbl_order ORDER BY tbl_order.od_id DESC LIMIT 1");
for($x = 0 ; $x < mysql_num_rows($resultx) ; $x++)
{
$row = mysql_fetch_assoc($resultx);
$last_order = $row['od_id'];
}
if ($result1 == 1)
{
echo "&result1=1&lastorder=$last_order&";
}
else
{
echo "&result1=0&lastorder=$last_order&";
}
dbClose();
Close Window
Help On Dynamic Textfield Loading .txt File Who Works Locally But Dont On The Server
Hi, i was lookin troughout FlasKit website trying to solve a problem that i´ve got with Dynamic textfields loading text archives on MX
i was using all this lines of code but it didnt work when i upload to the server (the weird thing is locally it works just fine)
_root.loadVariables("01.txt","/");
or this other
loadVariablesNum("01.txt?Ran="+random(999), 0);
the text file is uploaded as an UNICODE file got all its variables fine (my_variable1=hello world&my_other_variable=help me escape from this !!) etc..etc..
the textfield is working with its vars (my_variable1, my_other_variable) correctly attached; and its works FINE on any computer (locally) but when its uploaded fails; i was trying to modify the path of the txtfile ("01.txt" "/01.txt") but it didnt work and i dont think its always necessary to put an URL when a file works with a relative path.
can u help me? plz i need the correct code to put in my flash file, and got another question, when i change the contents on the TXTfile and upload it again , theres a way that an user who got the previous txt file (and got it on the webcache),across my flashMX file uploads and update the content on the dynamic datafield or this is done dynamically by my SWF ?
PLZ HELP ME ASAAAAAAAAP
Thx
Regor Do Spika
[MX04Pro] Any Ideas Why This Loader Breaks On Server, Works Fine Locally?
Hi FKers,
I have this here preloading code withing the external swfs. It seems to just break/lock up after loading a bit. This code works flawlessly on local server, as well as on other sites. But on this site it tends to die at 70 or so %. Sometimes it will load one or two externals before locking. Any ideas?
PHP Code:
onClipEvent (load) {
percent = 0;
}
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*6.33;
if (percent>99) {
_parent.gotoAndStop(2);
}
}
Here's the site:
http://www.cscproducts.com/v3f.html
Stream Works From Local Desktop To Server But Not Server To Server
I have flash media server running on linux. If I launch a test application from my desktop that points to the flash media server (rmtp://myserver.com/live) it works beautifully. However, If I launch an application from my server(http://myserver.com/myapp) and have it point to my flash media server (rmtp://myserver.com/live) i get a rejected from server error. Does anyone know why this would behave like that and how it might be fixed? Thank you.
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...
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
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);
}
}
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
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
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"
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
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
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.
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?
Works Locally But Not Remotely
Hi guys,
I have this flash file which uses flash remoting to call a coldfusion component method and returns the results back to flash. I'm invoking the swf file in the html <object> tag. When I browse this file locally (http://computer_name/serivce_folder/myfile.html), everything works as expected, but when I copy this swf and html file to another computer in my network, I don't see anything being returned. Flash remoting does not seem to call the coldfusion component. Does anyone know how this can be resolved?
#include "NetServices.as"
#include "NetDebug.as"
if (init == null)
{
init = true;
// set the default gateway URL (this is used only in authoring)
NetServices.setDefaultGatewayUrl("http://computer_name:8500/flashservices/gateway");
// connect to the gateway
gateway_conn = NetServices.createGatewayConnection();
// get a reference to a service
myService = gateway_conn.getService("Service Folder.CFC_Name", this);
}
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.
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?
[F8] Swf Locally And On Server
I have a template and i've loaded a contact form with the following action
contact.loadMovie ("mailform1.swf");
contact._yscale=84;
contact._xscale=70;
Contact being the instance name of the container.
It all works well locally but not on the server.
I've checked the capitalisation but i'm at dead end
the contact form is actionscript 2 and the main fla id actionscript 1. could this have anything to do with it?
i'm publishing both in flash8
StartDrag Works Locally But Not Online...
Hi All,
I have actionscript that works locally, works when i test in dreamweaver but refuses to work when i upload it to my client's server.
This is extremely exhausted because i completely changed the page around because the first effect i had did the same thing - worked locally and not online. And now the second effect is doing the exact same thing!!!
Can someone guide me to where the bottleneck might be...i'm stuck!
thx
Same Movie Works Locally On Mac But Not From Site
Hi All,
I created a flash movie on Mac OSX, with Flash MX. It plays fine if I run it from a page or directly from a local drive in a browser. When I upload it to the web server however, it only works on Windows. On Mac it just stops on the first frame and sits there. Ive tried all browsers, all have the Flash 6 plugin. I also tried exporting the movie as Flash 5 and 6, both got the same results. Here is the page with the movie:
http://home.earthlink.net/~mmacie/curstep.html
If you are on a Mac, you will probably only see a grey page with a dark grey bar and nothing else. If you are on Windows, you will see the 3 animated steps and titles which scroll as you roll over them. This is how it should work on the Mac (and does, however not from a remote server).
Very bizarre. I am totally stumped how to fix it. And my boss is breathing down my throat! Any help or ideas appreciated.
Thanks,
Mike
LoadMovie Works Locally, Not Remotely
I have a 'main.swf' that has an empty movieclip 'loader' with an instance name 'loader'. I have 'main.swf' importing 'title.swf' into 'loader' with the code:code: loader.loadMovie("title.swf");on the root of frame 1 of 'main.swf'.
When I test 'main.swf' locally it works perfectly. I uploaded 'main.swf' and 'title.swf' to a server (same folder) and ran 'main.swf' but now it doesn't work.
If anyone knows what's going on, or anything I could try to fix it, I would be very appreciative.
|