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




ScrolllPane Loading Images Issue



I have two scrollPanes on my stage, one is called "thumbs" the other is called "myScrollpane". When I click on a thumb image that image gets loaded into myScrollPane. This parts working ok.

What, I am having trouble with is getting my thumb images to display in my thumbs scrollpane. I have a movieclip called thumb_mc which containes a Loader component. I can get the thumb_mc to load into the thumbs scrollPane, but I can't get my images to display in the thumbs Loader component. What am I doing wrong?

Code:
var myScrollPane:mx.containers.ScrollPane;
myScrollPane.contentPath = 'Holder_mc';
thumbs.contentPath = 'container_mc';
//////////////////////////////////////////////////////////////////
MyPicVars = new LoadVars();
MyPicVars.load("Dadphotos.txt");
MyPicVars.onLoad = function(success) {
if (success) {
var t_mc:MovieClip;
Rc = this["DLc"];
//trace(Rc);
for (i=0; i<=Rc-1; i++) {
t_mc = _root.thumbs.content.attachMovie("thumb_mc", "mc"+i, i, this.getNextHighestDepth());
t_mc._x = 5;
t_mc._y = 5+(i*80);
t_mc.i = i;
t_mc.location = this["pic"+i];
t_mc.t_loader.contentPath("Dadphotos/"+this.location);
thumbs.invalidate();
t_mc.onRelease = function() {
//load image into pictures scroll pane
trace(this.location);
myScrollPane.content.myLoader.contentPath = "Dadphotos/"+this.location;
myScrollPane.invalidate();
};
}
} else {
trace("not loaded");
}
};



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-17-2005, 03:31 PM


View Complete Forum Thread with Replies

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

Issue With Loading External Images
I have no problem getting the image to load and even preloading the image. I wonder if I'm doing it the best way still, however, when I get it to load I dont know how to exit the loop and do something else.

What I'm trying to do is keep it on frame 1 while the image loads. When the image is fully loaded tell it to gotoAndPlay(2); but it's freakin out on me so I know my code is screwy.

on frame 1 I have all of the following:


Code:
stop();
image1.loadMovie("boxcovers/a67837_140h.jpg");
_root.onEnterFrame = function(){
infoTotal1 = image1.getBytesTotal();
infoLoaded1 = image1.getBytesLoaded();
percentagea = Math.floor(infoLoaded1/infoTotal1*100);
trace (percentagea);
bar._width = percentagea/2;
if (percentagea >= 100){
gotoAndPlay(2);
}
}
Now I have a movieclip instance named image1 - that loads the image no problem.
bar is my progress bar and since I'm loading a small image i wanted it to be 100 in half hence the /2 on the end.

If I keep the if statement at the very bottom commented out the image loads perfectly with the progress bar etc. and it stays on frame 1. The problem is when I leave that if statement in there it instantly goes to frame 2 before it ever finishes loading AND it doesnt play on frame 2. it goes there and stops which I dont even have a stop there.

Help is much appreciated

Thanks,
Cub

Issue With External Images Loading
I have a little gallery that I made (nothing terribly complicated) and would like the images to fully load before they fade in. So the process would be, first image loads in, click next, preloader bar shows over the current image (still showing), then once fully loaded, replaces the last image with the new one fading it in... hopefully that makes sense...

why does this not work? i'm using a movie clip loader...









Attach Code

p = 0;

var img_mcl = new MovieClipLoader();//create an instance of MovieClipLoader

img_mcl.onLoadStart = function (target) {
trace(image[p] + " started loading at = " + img_mcl.getProgress(target));
};

img_mcl.onLoadProgress = function (target, loaded, filesize) {
trace(image[p] + " still loading... " + loaded);
preloader_mc._visible = true; //shows preloader
preloader_mc.load_mc._xscale = 100 * loaded/filesize; //expands the loader in relation to the loaded total
};

img_mcl.onLoadComplete = function (target, loaded) {
preloader_mc._visible = false; //hides the preloader
trace(image[p] + " done loading.");
trace("total loaded: " + loaded);
image_mc._alpha = 0;
fadeIn(image_mc); //fade in image
};

img_mcl.onLoadInit = function (target) {
//trace(image[p] + " is now initialized");
};

img_mcl.onLoadError = function (target, errorCode) {
//trace("ERROR: " + errorCode);
};

function nextImage() {
if (p < (total-1)) {
p++;
if (loaded == filesize) {
img_mcl.loadClip(image[p], "image_mc");
}
}
};

function firstImage() {
if (loaded == filesize) {
img_mcl.loadClip(image[0], "image_mc");
}
};

function fadeIn(_mc) {
_mc._alpha = 0;
_mc.onEnterFrame = function() {
if (_mc._alpha < 100) {
_mc._alpha += 10; //fades in image
}
};
};

Loading Images And Resolution Issue
Hello All.
I seem to be having a silly issue in loading jpegs through an xml file. When images show up the resolution is completley shot! can someone please explain..whats going on.. Much appreciated. Kind of urgent so a response would be appreciated.

Dynamically Loading Images Issue//
I'm doing a site where I have a main movie and sub movies that I load using the loadMovie command. In one of the sub movies I want to dynamically load images into a blank movie clip. I can get the images to load if the sub movie is viewed on it's own but, when the sub movie is loaded into the Main movie the images won't load. I guess I'm not sure what to replace the "_root" with. Here's the code (pic_holder is the blank clip):

on (release) {
_root.pic_holder.loadMovie("test1.jpg");
}

Since "_root" always references the Main move I tried the following variations with no success:

on (release) {
_parent.pic_holder.loadMovie("test1.jpg");
}

and

on (release) {
this.pic_holder.loadMovie("test1.jpg");
}


thanks

Loading Images And Resolution Issue
Hello All.
I seem to be having a silly issue in loading jpegs through an xml file. When images show up the resolution is completley shot! can someone please explain..whats going on.. Much appreciated. Kind of urgent so a response would be appreciated.

Loading Images In Dynamically Created MC Issue
Hello !

i've been confronting myself to this issue for 5 hours now, i'm in need of help from the outside world

i'm trying to load a series of external jpg images.
What to be loaded is stored in an external xml file, which indicates the folder along with the file name pattern and the number of images. This is handy since images are numbered incrementally (image_1.jpg, image_2.jpg...)
Finally, i need to position these images as a strip, that is, one next to each other horizontally.

I get the info out of the xml file without issue, the url are correct (if i paste them in the browser, i see the image file) yet, it seems there is an issue with my loading mc code. Can you check and tell me what i'm doing wrong please?


ActionScript Code:
function doStrip(obj:XML)
{
    var project = obj.firstChild;
    var sequences = project.childNodes;
    var project_width:Number = 0;
    var pointerXpos:Number = 0;
    var totalImageCounter:Number = 0;
    var stripContainer:MovieClip = this.createEmptyMovieClip("stripContainer", this.getNextHighestDepth());
    stripContainer._x = 0;
    stripContainer._y = 0;
    stripContainer._height = 200;
    for (var i = 0; i<sequences.length; i++)
    {
        var folder:String = sequences[i].attributes['folder'];
        var numOfImages:Number = Number(sequences[i].attributes['numOfImages']);
        var type:String = sequences[i].attributes['type'];
        var namePattern:String = sequences[i].attributes['namePattern'];
        var imgWidth:Number = Number(sequences[i].attributes['imgWidth']);
        var sequenceWidth:Number = Number(numOfImages*imgWidth);
        project_width += sequenceWidth;
        for (var j = 1; j<=numOfImages; j++)
        {
            totalImageCounter++;
            var filename:String = namePattern.replace('#', j);
            var fileToLoad:String = absoluteUrl+'/'+project_folder+'/'+folder+'/'+filename;
            pointerXpos = Number(pointerXpos+imgWidth);
            instance = 'image'+totalImageCounter;
            var myimg:MovieClip = stripContainer.createEmptyMovieClip(instance, stripContainer.getNextHighestDepth());
            myimg.loadMovie(fileToLoad);
            myimg._x = pointerXpos;

        }
    }
}

Thanks a lot in advance, i look forward to reading your advises!

Loading Images In Dynamically Created MC Issue
Hello !

i've been confronting myself to this issue for 5 hours now, i'm in need of help from the outside world

i'm trying to load a series of external jpg images.
What to be loaded is stored in an external xml file, which indicates the folder along with the file name pattern and the number of images. This is handy since images are numbered incrementally (image_1.jpg, image_2.jpg...)
Finally, i need to position these images as a strip, that is, one next to each other horizontally.

I get the info out of the xml file without issue, the url are correct (if i paste them in the browser, i see the image file) yet, it seems there is an issue with my loading mc code. Can you check and tell me what i'm doing wrong please?


ActionScript Code:
function doStrip(obj:XML){    var project = obj.firstChild;    var sequences = project.childNodes;    var project_width:Number = 0;    var pointerXpos:Number = 0;    var totalImageCounter:Number = 0;    var stripContainer:MovieClip = this.createEmptyMovieClip("stripContainer", this.getNextHighestDepth());    stripContainer._x = 0;    stripContainer._y = 0;    stripContainer._height = 200;    for (var i = 0; i<sequences.length; i++)    {        var folder:String = sequences[i].attributes['folder'];        var numOfImages:Number = Number(sequences[i].attributes['numOfImages']);        var type:String = sequences[i].attributes['type'];        var namePattern:String = sequences[i].attributes['namePattern'];        var imgWidth:Number = Number(sequences[i].attributes['imgWidth']);        var sequenceWidth:Number = Number(numOfImages*imgWidth);        project_width += sequenceWidth;        for (var j = 1; j<=numOfImages; j++)        {            totalImageCounter++;            var filename:String = namePattern.replace('#', j);            var fileToLoad:String = absoluteUrl+'/'+project_folder+'/'+folder+'/'+filename;            pointerXpos = Number(pointerXpos+imgWidth);            instance = 'image'+totalImageCounter;            var myimg:MovieClip = stripContainer.createEmptyMovieClip(instance, stripContainer.getNextHighestDepth());            myimg.loadMovie(fileToLoad);            myimg._x = pointerXpos;        }    }}



Thanks a lot in advance, i look forward to reading your advises!

Alex

Loading External Images Randomly, Getting The Amount Of Images Out A *.txt
hello there!


i've made an a script that loads images externaly from a specific map
randomly. there's only one thing:


how can flash learn to know how many images are loaded?


it's for a client so he can only upload the images and that's it.
can he somehow fill in a *.txt-file that flash can use further???


this is my sourcecode for the external-stuff:

code:

_root.importImage = "background_netomzet"+random(*)+".jpg";



(the * has to be a value that needs to be generated by how many pics
there are in the image map")


thanks a million people!


g

Loading Images Into A Container-H And V Images Centered
I am trying to load multiple images into a container clip to make an image gallery. Since there are both horizontal and vertical images I want the images to load into the center of the container clip (the center of container clip is aligned with the center of each image) because I cannot align both h and v images in my design by a corner. how do I do this?
Thank you!

Odd Issue With Images With Fades
Hey,

For some reason on some of my fades (namely the titanic painting and the baseball player) when it fades through them it looks like the paiting "jumps" to the side. What's up with this?

http://www.weathersdesign.com/adair/

It is in the same EXACT position throughout the whole fade.

Anyone know about this?

Thanks!

Seth

Smoothing Issue XML Images
Hello...

I have this code in as3 that creates dynamic movieclips and adds images in dynamically via xml. I used code to smooth the bitmap before it is attached the the holder movie clip, but I run into an issue of it seeming to only work for the last image in the loop. It attaches and finds all the images with no problem but it seems to only apply smoothing to the last image in the loop.

Can any one help me out? Below is the code that I am using.

var imageList:XMLList=imageInput.image.ilink.text();
var counter:Number=0;
totalImages = imageList.length();

for each (var imageElement:XML in imageList) {

this["holder" + counter + "_mc"] = new MovieClip();

polaroid_mc.addChild(this["holder" + counter + "_mc"])
this["holder" + counter + "_mc"].x = 29.9
this["holder" + counter + "_mc"].y = 44.5

var myBitmap:Bitmap = new Bitmap();
var bitMov:MovieClip = new MovieClip();
var URLReq:URLRequest=new URLRequest(imageInput.image.ilink.text()[counter]);
var imageLoader:Loader = new Loader();
imageLoader.load(URLReq);

this["holder" + counter + "_mc"].addChild(imageLoader)

imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, loadBit);
//this["myMovieClip"+counter].addChild(bitMov);

function loadBit(event:Event):void {
myBitmap=Bitmap(imageLoader.content);
myBitmap.smoothing=true;
}



this["holder" + counter + "_mc"].alpha = 0;
counter=counter+1;
}


Thanks

Issue Looping Images From XML
First, I am new to AS and appologize for my coding.
I have a slideshow that plays, while pulling images from XML. The problem I am having is that I can't seem to get it to loop. It loads up and runs through all the images, but after the last one, I get a list of errors. Starting with RangeError #2066. Please help point me in the right direction.


Code:
var fadeTween:Tween;
var images:Array = new Array();
var time:Array = new Array();
var currentimage = 0;
var i:Number = 0;
var maximage = 0;
var loader:URLLoader = new URLLoader(new URLRequest("http://www..photogallery_fish2.aspx"));
function loadXML ()
{
loader.addEventListener (Event.COMPLETE, onLoadSuccess);
loader.addEventListener (IOErrorEvent.IO_ERROR, onLoadFailure);
}
var myTimer:Timer = new Timer(1000);// 1 second
myTimer.addEventListener (TimerEvent.TIMER, loop);
function loop (event:TimerEvent):void
{
currentimage++;
loadimage ();
}
currentimage = 0;
function onLoadSuccess (event:Event):void
{
var loader:URLLoader = URLLoader(event.target);
var myXML:XML = XML(loader.data);
myXML.ignoreWhitespace;
maximage = myXML..image.length();
var number:int = 0;
for each (var property:XML in myXML..image)
{
images[number] = myXML..image[number].@source;
time[number] = myXML..image[number].@time;
number++;
}
loadimage ();
}
function onLoadFailure (event:Event):void
{
trace ("Error loading file: " + event.type);
}
function loadimage ():void
{
picload.source = images[currentimage];
picload.refreshPane ();

var newdelay = time[currentimage]*100;
myTimer.delay = newdelay;
myTimer.reset ();
myTimer.start ();

}
loadXML ();

MovieClipLoader Issue With Images
Has anyone else found a problem with loading images using the MovieClipLoader class? I have found that it has a problem reading the BytesTotal and it doesn't seem to be a flash based problem but rather a Browser problem. When I ran into the problem Fireworks was showing the Bytes Loaded and Bytes Total the same. WHere Internet Explorer 6 was showing the bytes Total as 0 all the way through. Camino for OSX was working fine. The images all loaded fine in the end but the data was wrong. I thought maybe this was security settings or something but I turned off my firewall and still had a problem. Then I tested it by bringing my images into flash and creating SWF files for each image. This fixed the problem, but of course it will not work for every situation. I am guessing a fix would be to have a preloader that detects the issue and if there is a problem it would just indicate that that the item is loading and not show detailed status, but if there is a fix that would be great. Also, I am wondering if anyone else has had this problem?

Please let me know and if I find a fix I will let you know

Also, it worked fine in the Flash Publish Preview Environment.

Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a sting that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.htm...mifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("ID='theMovie'>");
document.write("<PARAM NAME='src' VALUE='zoomifyDynamicViewer.swf'>");
document.write("<PARAM NAME='FlashVars' VALUE='" + paramString + "' >");
document.write("<EMBED SRC='zoomifyDynamicViewer.swf'");
document.write("FlashVars='" + paramString + "'");
document.write("PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("NAME='theMovie'>");
document.write("</EMBED>");
document.write("</OBJECT>");
</script>

Dynamicly Moving Images Issue
I am working on a image slider. Pretty simple really its controlled by mouse position on stage. If its on the right the images slide to the right etc. once the image slides of the stage it gets moved to the other side behind the other images. It works with one problem the after a while the images start running into each other as they dont appear to be getting placed correctly or moving at the same speed. Not sure why some movie clips would be moving at different speeds then others when its the same code. The code is pretty simple so I am not sure what is breaking it.

the code is pretty simple I have a container mc called newsB in that are dynamicly created clips that hold the news images as you mouse over either the right side of the stage or left they move in that direction. if the newsMC goes of the stage it is relocated to the other side at the end of all the clips. It works but is bugy in the sense that images eventually start to run into each other.

Code:


function Scroll(Lspeed) {
if (_xmouse>Stage.width/2) {
for (p=0; p<=newsCount; p++) {
_root.newsB['newsMC'+p]._x = _root.newsB['newsMC'+p]._x-Lspeed/10;
if (_root.newsB['newsMC'+p]._x+newsMcWidth<0) {
_root.newsB['newsMC'+p]._x = wraperWidth-1;
}
}
}
if (_xmouse<Stage.width/2) {
for (p=0; p<=newsCount; p++) {
_root.newsB['newsMC'+p]._x = _root.newsB['newsMC'+p]._x+(Lspeed*-1)/10;
if (_root.newsB['newsMC'+p]._x>wraperWidth) {
_root.newsB['newsMC'+p]._x = 1-newsMcWidth;
}
}
}

}
var intervalId:Number;
function executeCallback():Void {
Scroll((_root._xmouse-Stage.width/2)/4);
}
intervalId = setInterval(this, "executeCallback", 20);
hope that makes sense
thanx dave

Rectangle Around Textbox And Images Issue
Hello people,

My question applies only when I work in 16 bit system resolution, so when I apply some text and apply 'Anti-alias for readability' with embedded chars, there is some strange filled rectangle showing around the text box. The same applies when I add any kind of filter to a text or image. You may see the exact problem by clicking on the link below:

http://img262.imageshack.us/img262/5171/ingmarksb2.swf

- Notice the rectangle around the text boxes ('anti-alias for readability' applied, it doesn't matters is it static or dynamic text)
- Notice the rectangle around the middle dark-gray box with glowing effect applied

I will say again, this problem occurs only in 16 bit system resolution, it is not applying in 32 bit. Is it possible that this is a nasty bug, or there is solution?
Please help me because this is getting really frustrating.
I am using Adobe Flash CS4, before that I used Macromedia Flash 8. Nothing changed since then.
Thank you for any possible answer

Ognen

Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a string that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.htm...mifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("ID='theMovie'>");
document.write("<PARAM NAME='src' VALUE='zoomifyDynamicViewer.swf'>");
document.write("<PARAM NAME='FlashVars' VALUE='" + paramString + "' >");
document.write("<EMBED SRC='zoomifyDynamicViewer.swf'");
document.write("FlashVars='" + paramString + "'");
document.write("PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("NAME='theMovie'>");
document.write("</EMBED>");
document.write("</OBJECT>");
</script>

Preleaod XML Gallery Images - Issue
Hello all, (did a search on this and nothing that 100% addressed my problem was found)

I have created a scrolling XML based image gallery using a mix of differant tutrials around the web. The gallery works great and im happy with it, but when i came to add a preloader to the gallery it did not work.

Pre Loader script
frame 1

Code:
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}
frame 2

Code:
gotoAndPlay(1);
Min thumbnail code frame 3

Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images1.xml");
/////////////////////////////////////

function thumbNailScroller()
{
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 30;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumb_mc._y) && (_root._ymouse<=thumb_mc._y+thumb_mc._height))
{
if ((_root._xmouse>=(hit_right._x-40)) && (thumb_mc.hitTest(hit_right)))
{
thumb_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumb_mc.hitTest(hit_left)))
{
thumb_mc._x += scroll_speed;
}
} else
{
delete tscroller.onEnterFrame;
}
};
}

function thumbnails_fn(k)
{
thumb_mc.createEmptyMovieClip("t"+k, thumb_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc)
{
target_mc._x = hit_left._x+(eval("thumb_mc.t"+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function()
{
_global.p = this.pictureValue-1;
getURL("javascript:Image('images1.html?p="+_global.p+"')");
//getURL("image.swf","_blank");
};
target_mc.onRollOver = function()
{
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function()
{
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumb_mc.t"+k);
}

Basically I put the preloader on the first two frames of the movie and the content on the thired, once loaded the preloader takes you to frame three (content frame).
Now I think that preloader is loading the page fine but since the xml gallery is populated dynamically once the xml function is loaded the preloader only preloads a small movieclip before its actiually filled with images.


Here is the file (site) I have been working on, I would appreaciate it if a more experianced user of flash could skim over and tell me where im going wrong. I have tried to add a preloader within the loop that populates the gallery but have had no lucl. any help is appreaciated.

Rectangle Around Textbox And Images Issue
Hello people,

My question applies only when I work in 16 bit system resolution, so when I apply some text and apply 'Anti-alias for readability' with embedded chars, there is some strange filled rectangle showing around the text box. The same applies when I add any kind of filter to a text or image. You may see the exact problem by clicking on the link below:

http://img262.imageshack.us/img262/5171/ingmarksb2.swf

- Notice the rectangle around the text boxes ('anti-alias for readability' applied, it doesn't matters is it static or dynamic text)
- Notice the rectangle around the middle dark-gray box with glowing effect applied

I will say again, this problem occurs only in 16 bit system resolution, it is not applying in 32 bit. Is it possible that this is a nasty bug, or there is solution?
Please help me because this is getting really frustrating.
I am using Adobe Flash CS4, before that I used Macromedia Flash 8. Nothing changed since then.
Thank you for any possible answer

Ognen

Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a sting that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.html?zoomifyImagePath=back/&zoomifyZoom=25&zoomifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='

Issue With Linked Images (HTML)
Hi guys!

Long time lurker - first post .

I'm having some problems with loading linked images into Flash. The code is in HTML and stored in an external file on my server. This is an issue I just haven't found any solutions to, and I'm hoping someone here has some good pointers.

Let me start by providing you with the simple HTML code that's causing me the headaches:


Code:
<a href="http://www.link.com/link.html" target="_blank"><img src="getAdobeReader.gif"></a>
Now, at first everything looks just fine; the image is loaded and placing the mouse over the image correctly indicates that this is a link by changing the "pointy hand" icon. However, when trying to press the button nothing happens. When moving the mouse outside of the button it still looks like a hand. Now, when pressing the linked button a second time a new IE window opens and the correct URL loads correctly. The strange thing is, that the mouse needs to change position over the button before pressing the second time, otherwise it doesn't work (!). When replacing the image with a simple textlink instead it works perfectly.

Anyone ever seen this before? You can see this issue on the website I'm working on at this moment (work in progress mind you! ).

http://www.sjostaden2.se

Press the second button on the top menu (Föreningar), and then "Stadgar" on the left menu. You'll see the "get Adobe Reader" button on the right.

Thank you in advance!

Regards,
Patrick J.

Images Within TextField (inline Issue)
Hi all,

Using a stylesheet and textfield, I know I can take some XML and create some styles text with rollovers and different fonts styles / sizes.
I've been trying to get this to work and have 2 issues, the first being quite minor.

The first issue is that if I wrap the XML data in CDATA, it's blank, although if I trace everything, it's there.
Taht's a minor issue at the moment though:

My major issue comes with this:
If I want to have some icons like smileys in a string of text, how do I get the images to follow inline?
I have everything set up correctly (as correctly as I think it should be and have read), but the text always breaks if there's an image.
If I change the CSS to inline, rather than block there's still no difference.

A solution I've thought of could be to scrap the stylesheet method and just leave the space where the icon would go blank.
Then use textwidth / character index and attach the icon graphic at the point found, but that would be quite a mission to calculate.

Anyway, here's the stuff I've got at the moment (attached all in zip file, but class codes below as well for a quick check )

Anybody have some suggestions?
Is this impossible?

Main class (document class)
Code:

package Smiley {
   
   import flash.text.TextField;
   import flash.display.MovieClip;
   
   public class Main extends MovieClip {
      
      private var __txt : TextField;
      
      public function Main() {
         
         __txt = this["txt"];
         __txt.background = true;
         __txt.multiline = true;
         
         new Style( __txt );
         new XMLData();
      }
   }
}


Style class
Code:

package Smiley {
   
   import flash.text.TextField;   
   import flash.events.Event;
   import flash.events.HTTPStatusEvent;
   import flash.events.IOErrorEvent;
   import flash.events.SecurityErrorEvent;
   import flash.net.URLLoader;
   import flash.net.URLRequest;
   import flash.text.StyleSheet;
   
   public class Style {
      
      private var __ss : StyleSheet;
      private var __txt : TextField;
      private static var __loader : URLLoader;
      
      public function Style( t : TextField ) {
         
         __txt = t;
         __ss = new StyleSheet();
         
         // set listeners to handle CSS loading
         __loader = new URLLoader();
         __loader.addEventListener( Event.COMPLETE, onLoaded);
         __loader.addEventListener( IOErrorEvent.IO_ERROR, handleIOError );
         __loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
         __loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
      }
      
      
      public static function loadStyles() : void {
         __loader.load( new URLRequest("example.css") );
      }
      
      
      private function onLoaded( e : Event ) : void {
         trace("CSS: onLoaded");
         __ss.parseCSS(__loader.data);
         parseStyle();
      }
      private function handleHttpStatus( e : HTTPStatusEvent ) : void {
         trace("CSS: HTTPStatusEvent");
      }
      private function handleIOError( e : IOErrorEvent ) : void {
         trace("CSS: IOErrorEvent");
      }
      private function handleSecurityError( e : SecurityErrorEvent ) : void {
         trace("CSS: SecurityErrorEvent");
      }
      
      private function parseStyle() : void {
         __txt.styleSheet = __ss;
         __txt.htmlText = XMLData.xml;
      }
   }
}


XMLData class
Code:

package Smiley {
   
   import flash.events.*;
   import flash.net.URLLoader;
   import flash.net.URLRequest;
   
   public class XMLData {
      
      public static var xml : XML;
      
      private var __loader : URLLoader;
      
      public function XMLData() {
         
         // set listeners to handle xml loading
         __loader = new URLLoader();
         __loader.addEventListener( Event.COMPLETE, onLoaded);
         __loader.addEventListener( IOErrorEvent.IO_ERROR, handleIOError );
         __loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
         __loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
         
         // initialise by loading the xml
         __loader.load( new URLRequest("example.xml") );
      }
      
      private function onLoaded( e : Event ) : void {
         trace("XML: onLoaded");
         xml = new XML(e.target.data);
         Style.loadStyles();
      }
      private function handleHttpStatus( e : HTTPStatusEvent ) : void {
         trace("XML: HTTPStatusEvent");
      }
      private function handleIOError( e : IOErrorEvent ) : void {
         trace("XML: IOErrorEvent");
      }
      private function handleSecurityError( e : SecurityErrorEvent ) : void {
         trace("XML: SecurityErrorEvent");
      }
   }
}


Example.css
Code:

myText {
   font-weight:normal;
   color:#000000;
   display:block;
}


Example.xml
Code:

<?xml version="1.0"?>
   <myStyleText>
      <myText>This is some text, <img src="smiley.gif" width="19" height="19" vspace="-5" hspace="0" border="0" /> which should not break.</myText>
      <myText><![CDATA[This is some text, <img src="smiley.gif" width="19" height="19" vspace="-5" hspace="0" border="0" /> which should not break.]]></myText>
   </myStyleText>

[F8] Preloading Issue- Images In Html Page
Im redesigning a site atm, and Im looking for a way to load images with flash instead of the old "one at a time"-oldfashioned way. I have 24 100x100 images to load so it wont look that nice if they don't load all together.

This is the site:
http://www.olssongerthel.se/nytt/index.html

Im also going to add a dhtml script that adds an OnMouse function which I don't know how to do in flash.. so Im looking for a way to make a flash preloader for the site, but the site itself shouldn't be flash.

I want a flash loader on top of the images (floating if possible) that loads all the images on the page, but the page itself shouldn't contain any flash after the loading is complete, because I'd like to use the dhtml script...


Is it possible? Anyone got any viable solutions?

No One Would Answer This On The Other Forum [F8] Scrolling Images Issue
I have six images that continuously scroll on mouseover, with only three visible at a time. On mouseout, not only do they need to ease while they stop scrolling, but they need to land back on the first three images.

Can anyone help with this code? I've been all over the web and flash forums and seen very similar issues, but so far haven't seen any code regarding the repositioning exactly where it started. This is my first post, I'm not very experienced with advanced actionscript... thanks!

Image Gallery -- Issue Transitioning Between Images
I have an image gallery that is supposed to load an image pause on that image while loading the next and then fade out/fade in simultaneously. The script seems right to me except when it comes to which function is supposed to run mc_01up or mc_02up.

Code:
if (current == 1) {
mc_02_up();
} else {
mc_01_up();
}
Any help would be greatly appreciated.

-developmental

--Script--

Code:
//setup
delay = 3000;
filename = ["01.jpg", "02.jpg", "03.jpg"];
path1 = "http://130public.net/test_area/image_gallery/images/welcome/01/";
path2 = "http://130public.net/test_area/image_gallery/images/welcome/02/";
i = filename.length;
k = Math.floor(Math.random()*i);
//
mc_01.onEnterFrame = function() {
filesize = mc_01.getBytesTotal();
loaded = mc_01.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
}
};
//
function first_image() {
mc_01._alpha = 0;
mc_01.loadMovie(path1+filename[k], 0);
var current = 1;
if (loaded == filesize) {
fadein = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 100, 10, false);
slideshow();
}
}
//
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (current == 1) {
mc_02_up();
} else {
mc_01_up();
}
}
}
//
function mc_01_up() {
var current = 1;
var fadeListener:Object = new Object();
fadeListener.onMotionFinished = function() {
mc_02.loadMovie(path2+filename[k], 0);
mc_02.onLoad = slideshow();
};
fadein = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 100, 10, false);
fadeout = new mx.transitions.Tween(mc_02, "_alpha", null, this._alpha, 0, 10, false);
fadeout.addListener(fadeListener);
}
//
function mc_02_up() {
var current = 2;
var fadeListener:Object = new Object();
fadeListener.onMotionFinished = function() {
mc_01.loadMovie(path1+filename[k], 0);
mc_01.onLoad = slideshow();
};
fadein = new mx.transitions.Tween(mc_02, "_alpha", null, this._alpha, 100, 10, false);
fadeout = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 0, 10, false);
fadeout.addListener(fadeListener);
}
//
first_image();
stop();
--Files--
.FLA
.SWF
.HTML

Button And Images Problem/ Help Needed., Script Issue.
Allright here's the deal,

Basicaly i created a white square and made it a movieclip and called it view.

Then made a bunch of very small icons "buttons" that each one would open a different picture in that movieclip. (like a gallery, multiple very small thumbnails that open up my images on my server into that movieclip)

so i didn't put any script on my movieclip, just on that one button. And that's what i wrote :

on (release) {
view.loadMovie("http://www.alxcote.com/2006/self.jpg");
}


Then i test it and it doesnt open anything in the movieclip. (i think i should add something to the clip, not sure)

any help would be greatly apreciated,

alx

Embeded Fonts + Html Images Alignment Issue
I'm experiencing a problem with using embeded fonts + html text + images.

The images aren't aligned properly after using an embedded font within a dynamic textfield -- the images are aligned to the top and overlap the pervious paragraph's content.

Is there a solution to this issue?

Thanks

Loading External Images Loading Bar (Movie Clip)
I have managed to have external images loaded with the progress bar. However, when I place these items into a movie clip the preloader no longer works. can someone please take a look at the flash file for me.

http://www.bloggot.co.uk/file.zip

Dynamic Image Loading / Images Not Loading?
This is my first try at loading images with action script. I read through the forums, borrowed code, and adapted it.

///////////////////////////works fine
myvars = new LoadVars();
myvars.load("alldoorsdesc.txt");

myvars.onLoad = function (success) {
if (success) {
_root.doorsinsttxt.htmlText = myvars.d1txt+"<BR><BR>To order call us at 505 934 8888";
//I would like to create a for loop here so addidtional
//items can be added, is this possible?
_global.dr1txt = myvars.d1txt;
_global.dr2txt = myvars.d2txt;
_global.dr3txt = myvars.d3txt;
_global.dr4txt = myvars.d4txt;
_global.dr5txt = myvars.d5txt;
}
};
///////////////////////////doesn't trace to loaded door

var doormovie = _root.createEmptyMovieClip("imgmovie",_root);
doormovie._y = 100;
doormovie._x = 300;
doormovie._width = 300;
doormovie._height = 300;
function loadpic(num){
trace("inside loadpic" +num);
doormovie.createEmptyMovieClip("img"+num, num);
doormovie["img"+num].loadMovie("images/door"+num+".png");

//// I'm not sure about this line
doormovie["img"+num].onload = function(){trace("loaded door"+num);};

stop();
}

function unloadpic(num){cont["img"+num].removeMovieClip();}
function unloadAll(){cont.removeMovieClip();}
loadpic(1);// load the inital picture

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

Are all these functions loaded into the root visible from another movie that is imported with getURL ? Or do I have to copy the functions to that imported movie?

Loading Order - Dynamically Loading Images
Flash 5
I am trying to control the loading order of dynamically loading images. If I have 12 placeholders (4 columns by 3 rows) for the images (e.g. 12 instances of a movie clip) each of which loads a different JPG or SWF. I want the 1st instance/placeholder to completely load the image dynamically before the next instance starts to load the next image and so on. How can I ensure image1 is dynamically loaded before image2 and then image3 etc...

If I put each instance on a separate frame on the timeline will it stop on each frame until the instance is loaded before moving onto the next frame? I have seen the effect im trying to recreate on both:- www.rui-camilo.de and www.andyfoulds.co.uk

Many Thanks in advance.

PLEASE Help Me With This Loading Issue
HI All,
I have 2 scenes in my flash file, "main.swf".
The scene 1 loads an external swf called "sc1.swf", while the scene 2 loads another swf called "sc2.swf".
Is it possible to load the "sc2.swf" in background while the scene 1 is playing the "sc1.swf"?? so that it can play "sc2.swf" immediately after scene 1 is finished playing..

Please Help!
Thanks in advance!

CSS Loading Issue...
I have an .swf with some HTML rendered text fields that use CSS formatting. Everything worked perectly fine when testing from our production server.

Now, after moving the site live the CSS is no longer working. A number of different domains (it's a network of different sites that dynamically brand) reference the same .swf and the .as for the .swf references the CSS file as:

myCSS.load("/vchat/chat.css");

I'm guessing it's an issue with it not referencing a full URL, and the multiple domain thing, but unfortunately it needs to work this way because depending on which site is referencing the .swf, it pulls the appropriate style info for the given site.

Anyone have any ideas, solutions, experoence with this?

Thanks for any help in advance.
---
c

Loading Issue
Im having a loading issue. No matter if I have an audio track and the file is 10 MB or if I remove the track and its 3.5 MB the preloader is taking the same amount of time. Im also getting a white box on launch, then the preloader loads to about 40% and freezes for a bit and then finishes. Does anyone know why this happens? Could this be code in my DreamWeaver file?
Heres the website.
www.mileagesd.com


Thanks

Loading SWF Issue
Hi,

I am working on this site that was originally one swf file with multiple scenes. I have now created a master.swf, preloader.swf, home.swf and swf’s for each of the pages. In my master swf, I have created an empty movie clip that I load the home.swf into. I load the swf files into levels.

Now in my home.swf file, I am loading the pages, like this:-

on (release) {
_level0.myMCL.loadClip("aboutus.swf", 5);
}

The above AS2 is on the button. The problem I have is that when the buttons are clicked, the whole page jumps for a second before the content displays. The current site is setup like this when a button is clicked and doesn't have this issue:-

on (release) {
gotoAndPlay("about", 1);
}

The first frame in my aboutus.swf is the content slowly revealing itself from right to left with a motion tween. How do I stop the screen from jumping before displaying?

Can anyone give me some help?

Flv Loading Issue
I'm using this code:

ActionScript Code:
var my_Video:Loader = new Loader();

import gs.TweenMax;
import gs.easing.*;

function startVideoLoad(loadURL) {
    TweenMax.to(images.container, 0.5,{alpha:0, onComplete:continueVideoLoad, ease:Cubic.easeOut});
    images.preLoader.visible = true;
}
function continueVideoLoad():void {
    trace(loadURL);
    my_Video.load(new URLRequest(loadURL));
}

my_Video.contentLoaderInfo.addEventListener(Event.COMPLETE, startVideoListener);
function startVideoListener(e:Event):void {
    images.container.addChild(my_Video);
    TweenMax.to(images.container, 0.5,{alpha:1, ease:Cubic.easeOut});
    images.preLoader.visible = false;
}

my_Video.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressVideoListener);
function progressVideoListener(event:ProgressEvent):void {
    var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
    images.preLoader.lbar.scaleX=pcent/100;
    images.preLoader.lpc.text=int(pcent);
}

And its throwing me this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.

I have no idea what the issue is. The trace(loadURL) returns this:
images/testimonials/volvo/test.flv

What is causing the issue? Also, using this code, is it possible to add a skin to the video? This method works using *.jpg files but gives me issues with *.flv format.

SWF Loading Issue
Dear All,

Stuck with a peculiar problem..
We have developed a course and content file size in that course is 1 MB.
New files get loaded on click of navigation buttons.
Network constraints are such that after we click any navigation button, maxium size of the packet can be 100 K.
So we need to load the 1MB file in packaets of 100 K.

Can we control this using action scripting?

Please let me know if someone can help us..please let me know if any additional information is reqd.

Thanks

Loading Jpg Before Flv Issue
I want to display a jpg for 3 seconds before the flv starts playing.
How can I change the jpg via html?

Thanks

XML Loading Issue
Hi fellows
I have a problem loading XML when the file size exceeds 128 K then the xml after that is truncated which is causing a problem is there a way to coupe this problem can anyone tell me the work around for this problem, guys its very very urgent thanx in advance.

Wadood

Xml Loading Issue
hi. im having a strange issue that i cant seem to figure out...

ive got my xml slideshow loaded into a webpage but its not showing up.
however, the slideshow shows up when i go to the absolute url on the server.
its just not showing up within this webpage on the same domain. Any ideas?

FLV Loading Issue
Hi,

I have a slight issue with my movie at the moment. I have to use AS3 for a Flash assignment at Uni to create an IPTV site. I'm pretty new to all this Flash stuff, I've dabbled but never really used AS3 only AS2 very simply .

I have set up a pre-loader in the first scene of my movie for loading everything, the intro movie then comes in scene 2, and the main site is in scene 3 onwards.

The issue I have is that everything pre-loads fine except the FLA files. This causes issues as there is an FLA file that plays at a certain point in the intro with no controls. I want to make this FLA pre-load along with all the graphics so that there is no stuttering of the video but it can't load as it's about to play, as this will split up the flow. The file so far is here http://devarios.com/UniFlash/stargate_video_skip.html

I can't for the life of me figure out how to do this. Can someone help me please?

Here is the AS I'm using so far.

Frame 1 Scene 1 Preloader

Actionscript Code:
stop();    import flash.display.MovieClip;    import flash.events.Event;import fl.controls.ProgressBar;import fl.controls.ProgressBarMode;import fl.controls.Label;//Add progress bar vaiable then display the barvar myProgressBar:ProgressBar = new ProgressBar();myProgressBar.indeterminate = false;myProgressBar.mode = ProgressBarMode.MANUAL;myProgressBar.maximum = 256;myProgressBar.setSize(180, 16);myProgressBar.move(205, 240)addChild(myProgressBar);//Add the percent label variable then display the labelvar myLabel:Label = new Label();myLabel.text = "";myLabel.autoSize = TextFieldAutoSize.LEFT;myLabel.move(260, 205 + myProgressBar.height);addChild(myLabel);this.addEventListener("enterFrame",onEnterFrame);        function onEnterFrame(e:Event):void {         var nProg:int = (Math.ceil((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100));         UpdatePreloader(nProg);       if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){         this.removeEventListener(Event.ENTER_FRAME,onEnterFrame);         removeChild(myLabel);         removeChild(myProgressBar);         gotoAndPlay("startmovie");          }    }  function UpdatePreloader(nProg:int):void {       //trace(nProg + '% Loaded');         myLabel.text = ( nProg.toString() + '% Loaded');      myProgressBar.setProgress(nProg, 100);}

Frame 1 Scene 2 Intro

Actionscript Code:
//Skip button listeners and events to allow skiping anytime in the introskip_btn.addEventListener(MouseEvent.CLICK, onClick);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOver);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOut);function onClick(event:MouseEvent):void {    gotoAndPlay(1, "Home");}function onOver(event:MouseEvent):void {    event.target.alpha = .5;}function onOut(event:MouseEvent):void {    event.target.alpha = 1;}//Load the encoded soundfilevar encodeSound:URLRequest = new URLRequest("encodedSound.mp3");var encodedSound:Sound = new Sound();encodedSound.load(encodeSound);

Frame 230 Scene 2 Intro

Actionscript Code:
//Stop the timeline to allow the video to playstop();//Connect to the video stream and set the video sizes and location on the stage, buffer the video until it is neededvar nc:NetConnection = new NetConnection();nc.connect(null);var ns:NetStream = new NetStream(nc);//ns NetStream.setBufferTime:5;ns.client = this;ns.play("stargate1.flv");var vid:Video = new Video();vid.attachNetStream(ns);vid.x = 0.1;vid.y = 57.5;vid.height = 484.1;vid.width = 798.7;addChild(vid);//Set the onCuePoint function to go to Frame 1 of the Home scene when a cuePoint is found in the video, with the onMetaData to avoid compilation errorsfunction onMetaData(infoObject:Object):void{    trace("metadata");}function onCuePoint(infoObject:Object):void{    trace("cue data");    gotoAndPlay(1, "Home");}//Remove the old skip button listeners as they do not apply to streaming contentskip_btn.removeEventListener(MouseEvent.CLICK, onClick);skip_btn.removeEventListener(MouseEvent.CLICK, onOver);skip_btn.removeEventListener(MouseEvent.CLICK, onOut);//Skip button listeners and events to allow skiping anytime in the streaming videoskip_btn.addEventListener(MouseEvent.CLICK, onClickV);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOverV);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOutV);function onClickV(event:MouseEvent):void {    gotoAndPlay(1, "Home");    ns.close();    removeChild(vid);}function onOverV(event:MouseEvent):void {    event.target.alpha = .5;}function onOutV(event:MouseEvent):void {    event.target.alpha = 1;}

Frame 1 Scene 3 Home

Actionscript Code:
//Define the upgrade flash link locationvar upgradeFlash:URLRequest = new URLRequest("http://www.macromedia.com/go/getflashplayer");//Add the listeners to the navigation buttonshome_btn.addEventListener(MouseEvent.CLICK, homeClick);profiles_btn.addEventListener(MouseEvent.CLICK, profileClick);media_btn.addEventListener(MouseEvent.CLICK, mediaClick);upgrade_btn.addEventListener(MouseEvent.CLICK, upgradeClick);function homeClick(event:MouseEvent):void {    trace("Home");}function profileClick(event:MouseEvent):void {    trace("Character Profiles");}function mediaClick(event:MouseEvent):void {    trace("Media");}function upgradeClick(event:MouseEvent):void {    navigateToURL(upgradeFlash);    trace("Upgrade");}//Halt the timeline herestop();

Thanks for the help in advance
Adam

FLV Loading Issue AS3
Hi,

I have a slight issue with my movie at the moment. I have to use AS3 for a Flash assignment at Uni to create an IPTV site. I'm pretty new to all this Flash stuff, I've dabbled but never really used AS3 only AS2 very simply .

I have set up a pre-loader in the first scene of my movie for loading everything, the intro movie then comes in scene 2, and the main site is in scene 3 onwards.

The issue I have is that everything pre-loads fine except the FLA files. This causes issues as there is an FLA file that plays at a certain point in the intro with no controls. I want to make this FLA pre-load along with all the graphics so that there is no stuttering of the video but it can't load as it's about to play, as this will split up the flow. The file so far is here http://devarios.com/UniFlash/stargate_video_skip.html

I can't for the life of me figure out how to do this. Can someone help me please?

Here is the AS I'm using so far.

Frame 1 Scene 1 Preloader

Actionscript Code:
stop();    import flash.display.MovieClip;    import flash.events.Event;import fl.controls.ProgressBar;import fl.controls.ProgressBarMode;import fl.controls.Label; 
//Add progress bar vaiable then display the bar 
var myProgressBar:ProgressBar = new ProgressBar();myProgressBar.indeterminate = false;myProgressBar.mode = ProgressBarMode.MANUAL;myProgressBar.maximum = 256;myProgressBar.setSize(180, 16);myProgressBar.move(205, 240)addChild(myProgressBar); 
//Add the percent label variable then display the label 
var myLabel:Label = new Label();myLabel.text = "";myLabel.autoSize = TextFieldAutoSize.LEFT;myLabel.move(260, 205 + myProgressBar.height);addChild(myLabel); 
this.addEventListener("enterFrame",onEnterFrame);        function onEnterFrame(e:Event):void {         var nProg:int = (Math.ceil((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100));         UpdatePreloader(nProg);       if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){         this.removeEventListener(Event.ENTER_FRAME,onEnterFrame);         removeChild(myLabel);         removeChild(myProgressBar);         gotoAndPlay("startmovie");          }    }  function UpdatePreloader(nProg:int):void {       //trace(nProg + '% Loaded');         myLabel.text = ( nProg.toString() + '% Loaded');      myProgressBar.setProgress(nProg, 100);}

Frame 1 Scene 2 Intro

Actionscript Code:
//Skip button listeners and events to allow skiping anytime in the intro 
skip_btn.addEventListener(MouseEvent.CLICK, onClick);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOver);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOut); 
function onClick(event:MouseEvent):void {    gotoAndPlay(1, "Home");} 
function onOver(event:MouseEvent):void {    event.target.alpha = .5;} 
function onOut(event:MouseEvent):void {    event.target.alpha = 1;} 
//Load the encoded soundfile 
var encodeSound:URLRequest = new URLRequest("encodedSound.mp3");var encodedSound:Sound = new Sound();encodedSound.load(encodeSound);

Frame 230 Scene 2 Intro

Actionscript Code:
//Stop the timeline to allow the video to play 
stop(); 
//Connect to the video stream and set the video sizes and location on the stage, buffer the video until it is needed 
var nc:NetConnection = new NetConnection();nc.connect(null); 
var ns:NetStream = new NetStream(nc);//ns NetStream.setBufferTime:5;ns.client = this;ns.play("stargate1.flv"); 
var vid:Video = new Video();vid.attachNetStream(ns);vid.x = 0.1;vid.y = 57.5;vid.height = 484.1;vid.width = 798.7; 
addChild(vid); 
//Set the onCuePoint function to go to Frame 1 of the Home scene when a cuePoint is found in the video, with the onMetaData to avoid compilation errors 
function onMetaData(infoObject:Object):void{    trace("metadata");}function onCuePoint(infoObject:Object):void{    trace("cue data");    gotoAndPlay(1, "Home");} 
//Remove the old skip button listeners as they do not apply to streaming content 
skip_btn.removeEventListener(MouseEvent.CLICK, onClick);skip_btn.removeEventListener(MouseEvent.CLICK, onOver);skip_btn.removeEventListener(MouseEvent.CLICK, onOut); 
//Skip button listeners and events to allow skiping anytime in the streaming video 
skip_btn.addEventListener(MouseEvent.CLICK, onClickV);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOverV);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOutV); 
function onClickV(event:MouseEvent):void {    gotoAndPlay(1, "Home");    ns.close();    removeChild(vid);} 
function onOverV(event:MouseEvent):void {    event.target.alpha = .5;} 
function onOutV(event:MouseEvent):void {    event.target.alpha = 1;}

Frame 1 Scene 3 Home

Actionscript Code:
//Define the upgrade flash link location 
var upgradeFlash:URLRequest = new URLRequest("http://www.macromedia.com/go/getflashplayer"); 
//Add the listeners to the navigation buttons 
home_btn.addEventListener(MouseEvent.CLICK, homeClick);profiles_btn.addEventListener(MouseEvent.CLICK, profileClick);media_btn.addEventListener(MouseEvent.CLICK, mediaClick);upgrade_btn.addEventListener(MouseEvent.CLICK, upgradeClick); 
function homeClick(event:MouseEvent):void {    trace("Home");} 
function profileClick(event:MouseEvent):void {    trace("Character Profiles");} 
function mediaClick(event:MouseEvent):void {    trace("Media");} 
function upgradeClick(event:MouseEvent):void {    navigateToURL(upgradeFlash);    trace("Upgrade");} 
//Halt the timeline here 
stop();

Thanks for the help in advance
Adam

Ok, Loading Issue..
Alright here is what I have.

I have a main movie.  I have buttons in the main movie.  I have a target clip set up directly in the middle.

The way I have been doing things is, when a button is pushed, it loads an external movie into the target clip.

But the way I have been doing it, is defeating the purpose of the loader on my external movie.
Here's an example of the simple code I have been using on the button...

On (realease) {
LoadMovie("external.swf", "_root.targetclip");

then of course, on my target clip I have
OnClipEvent(load) {
play;

This is actually loading the movie before it even shows up i think, correct?? Then when I have the preloader at the start of the external movie, it just skips the preload and goes right into the main scene.

What I am asking is I guess, how do you just call the movie to go into a _root clip without loading it??? Or is there a better way to do this??? Thanks

Loading Issue With MP3
MP3 player trouble...
Hi. I built an MP3 player in Flash that works great with the exception of a few problems.

Details: Version 6; I am loading the MP3 from the server as an event.

Here are the problems:

1) When behind a firewall or an anti-virus program that performs a similar function the MP3 fails to load.

2) Sometimes, without the interference of a firewall - the MP3 loads but the loading info in not being updated - so the user has no idea that it is working.

Below is my main function - any advice is welcomed.
I omitted all of my other functions and variables because they should be inconsequential due to the nature of the problem. Thanks in advance to anyone who feels like helping.

If you'd like to help out a frustrated person - feel free to email me privately @ viennadreams2000@yahoo.com



code:--------------------------------------------------------------------------------
this.onEnterFrame = function() {
    if (!_global.isLoaded) {
        disableButtons();
        loaded1 = myMusic.getBytesLoaded()/1024;
        total1 = myMusic.getBytesTotal()/1024;
        if (loaded1 != undefined) {
            perc = int((loaded1*100)/total1);
            progressBar.bufferPosition._xscale = perc;
            status.text = "Loading: ";
            status.text += perc;
            status.text += "%";
            if (loaded1>4 && loaded1 == total1) {
                if (!_global.isStarted) {
                    enableButtons();
                    playSound();
                    ppbutton.gotoAndStop("play");
                }
                _global.isLoaded = true;
            }
        } else {
            myMusic.loadSound(_global.sourceFile, false);
        }
    } else {
        _global.dur = myMusic.duration;
        _global.pos = myMusic.position;
        this.totalTime = _global.dur/1000;
        this.elapsedTime = _global.pos/1000;
    }
    showTime(this.totalTime, this.elapsedTime);
};  


Can Anyone Help Me In A Loading Issue
Friends, Am doing a mapping application. I've produced functions to display the state wise and zip wise maps. I also included highways. As the database is very huge, it's getting too slow in drawing the routes. I get the values from the databse in XML and processes each point and then plots each point. I know that'll be the reason why it's too slow. Can anyone tell an alternate solution for this. What do u think about creating a static route and then displaying it when the appropriate location is produced.????
Any idea Guys!!!!!

Loading Issue...Please Help
I'm an amateur at Flash and I worked really hard on this project. I don't want it to go to waste just because it is too big. Can you guys help me make it smaller or help me find a way to make it load faster? Thanks! They won't let me attach it here. Is there anywhere I can upload it so you guys can take a look?

I tried putting it on my website but it's so big it won't load. The .fla file is 5,168 kb and the .swf is 370kb. I didn't put the .fla file on my site b/c that would just be stupid. I used this code to upload the .swf file on my website:


Code:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400">
<param name="movie" value="tour.swf" />
<param name="quality" value="high" />
<embed src="tour.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed>
</object>



It worked fine before when I barely had anything on the flash movie, but after updating it, it doesn't work. Are there any details that you guys want to know before you can help me? Sorry for bothering you guys. Thanks.

Loading Variable Issue
I have a movie loading a set of variables from a text file. When I preview the swf locally, everything works fine, yet when I put it online and test it, none of the variables load. Anyone out there have an idea why?

Issue Loading Array..Please Help
I have been at this problem every way I can think of for hours now. Im loading an array from an asp page with the following line
loadVariablesNum("search.asp",0,"GET");

I can see that the array values are arriving into flash because I have a textarea set to display the value of
_root.drinkname_a[0]

However I need to reference the array with a variable and I have tried to replace that 0 with variables that I am also showing the value of, but it NEVER displays if I set my text area to
_root.drinkname_a[anyvariable]

I thought its possible that you cant call a variable into the value of a text area so I attempted to use another variable as the display and set the variable like thus

onClipEvent (enterFrame) {
_root.drinkname1 = _root.drinkname_a[l];
}

where l is manually set to 0.

I am really stumped on this one so I would appreciate any help I can get.

Thanks

Site Loading Issue
Hello, need help on loading my website. I have and understanding of Flash MX but hardly any experience with actionscript, only simple button functions, etc.

My problem is this, I have a movie that is about 750k in size, I would like the movie to completely load before it displays the first frame, is this possible? (example of my site can be viewed here: www.wordnow.com/liz/gbeboweb_hum.html).

I would like my site to load in sections as some of my pages contain multiple .jpgs that are still not loaded when the first page of my site is displayed. Other unpredictable results also occur if the site is not fully loaded, i.e. when a user presses other buttons they are forwarded to the wrong page/frame. Should I be using functions like 'loadMovie', loadMovieNum, or even load my .jpgs externally? If yes, is there any good examples of the actionscript so I don't have to dive to in-depth with actionscript, as that side of brain (logic/math) just doesn't seem to function well

I feel that I have compressed my site enough, but I could be wrong. Isn't it reasonable for a person to have a 56K modem to wait for a 700K movie to load or is that asking too much?

Help or Advice would be greatly appreciated by this frustrated neebie

Thanks,
Liz

External Swf Loading Issue
alright...here's the skinny.
in my main movie
there is a button menu.
the button for pictures loads and external movie that has 4 more buttons.
i have a placeholder in my main movie called LOADWINDOW
now, when those 4 other buttons load...they call movies that are to load back into the LOADWINDOW in the main stage.
i'm not sure what my code needs to be to do this.
help please please please.

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