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




How Can I Load An External Image Using This Carousel Code



I found this beautiful carousel ported to actionscript 3.0.http://board.flashkit.com/board/atta...7&d=1188450564How can I change the code so I can click one of the carousel images and have it load the companion large image located in a different folder into a movieclip on stage.I am a newbie to AS3 and struggling to learn how to do things.Hopefully, someday I will be smart enough to contribute to the forum with intelligent submissions.



KirupaForum > Flash > ActionScript 3.0
Posted on: 09-19-2007, 07:27 PM


View Complete Forum Thread with Replies

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

Carousel 3: Load External SWF In XML
First of all, I'm sorry to create yet another thread about carousel and XML. I know there are dozens of them already and one of them has the same question more or less, but I can't seem to find that thread anymore.

I am trying to link to an external .swf file in the carousel. I would like to have a link in the descriptions that loads an swf in the same window. I know how to load movieclips into Flash, but I don't have a clue about how I should do it in the carousel.

I have all the basic files of the carousel and added a fullscreen (mc_movieholder) holder to load the movieclip in. All I need now is to have a link in the XML file that loads the file (games.swf) when I click on a link in the text.

I really need this a lot and it's rather urgent.


Thanks very much in advance.

Load External SWFs With Carousel
Hey Guys,

What code do we use to load an external SWF when releasing an item from the carousel? I have everything going well, up to this point.

I apologize if this is a re-post, please let me know...

Carousel IV - Load External SWF Into Loader Component
Hi There.
I'm a Flash newbie and have only just managed to replicate the flash carousel tutorials (Thanks Lee they're great!)

What I have been attempting to do (with my limited understanding) is to replace the dynamic text field with a loader component (instance name of myLoader) and have it load external swf files that are listed on the XML file in the "content" node...so in effect you load flash web pages instead of just text when an icon is clicked.

I have attempted this with no success as I'm not sure of the correct attribute to add or the correct way to call this from the released function (ie do I set a contentPath or make it a loadClip)

I'm loving Flash but must admit that I am finding it quite a struggle to learn so any help with this would be much appreciated...

Load Image From Url Code
sorry what is the code to load an image from a url?

how do you position it correctly in the movie?

Code For Load Jpg Into MC Is Distorting The Image?
i used the code for loading an image into a MC and it makes the image look really compressed by changing the colors. i checked the image from where the code is pulling it and its fine. does anyone know what i am doing wrong? thanks in advance.

[quote]on (release) {
_root.createEmptyMovieClip("container", 1);
container.loadMovie("photo.jpg"
container._x = container._y=50;
_root.onMouseDown = function() {
startDrag("container"
};
_root.onMouseUp = function() {
stopDrag();
};
}

Sample Code Question - Load Image
I'm not really a programmer but I had a question about the code below:


Code:
loadMovie("/images/headers/" + _root.photo + ".jpg", photo);
It's obvious that it loads an image but one of my questions was does "_root.photo" load a random image from some starting point? Also, is "photo" the name of a movie clip or image name?

Thanks for any feedback.

How Do I Load External .as Code?
Can someone tell me how I load external .as code?
I've tried using the Flash help file...
But I always find it impossible to use and it never has what I need to know!

I'm sure it's really easy!!

Thanks.


OM

Code To Load External Swf?
Hey guys
Can someone please post the code to load a .swf file when i click the button?

Thank you

How To Load An External SWF With Code?
This is probably fairly easy, it was at least in AS2, but I have 2 FLA's, one is design.fla, the other is code.fla...

in the design FLA... I load in the code...

Code:


var maintimeline:MovieClip;
maintimeline = stage.getChildAt(0);
var url:String;
var loader:Loader;
url='codemodule.swf';
var request:URLRequest=new URLRequest(url);
loader=new Loader();
initListeners(loader.contentLoaderInfo);
loader.load(request);
function initListeners(dispatcher:IEventDispatcher):void
{
dispatcher.addEventListener(Event.COMPLETE,completed);
trace("load complete");
}

function completed(event:Event):void
{
maintimeline.addChild(loader);
}

stop();
then in my code.swf, after it gets loaded, I want to initialize the design.fla


Code:

var URL:String = "http://192.168.2.2/version5";
trace("initializing from code");
var maintimeline:MovieClip;
maintimeline = stage.getChildAt(0);
var initilalize:initialize = new initialize(maintimeline, URL);
problem is I don't think my code.swf, where I set the maintimeline, is accessing the proper stage? or at least my initialize function starts to throw a bunch of errors because maintimeline is not correct here?

say I have something in my initialize class that wants to change a textbox_txt on the stage of my design.fla?

I get this error when I run my design.fla and the code.swf is loading

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at codemodule_fla::MainTimeline/frame1()

Whats Wrong With This Code? [loading External Image]
I'm trying to get a picture be loaded into an empty movie clip ("imageLoader") that is placed on the frame. The picture ("en_image1.jpg") is in the same folder as the flash movie...but when I view it, it only displays a small white box (doesn't load the picture).


Code:
function startLoading() {
loadMovie("en_image1.jpg", "imageLoader");

}

startLoading();

How Do I Load My Movie From It's External Source...My Code Isn't Working Help?
If anyone can clarify this for me I could really use the help..I have been trying to get better at this but it seems so overwhelming...I can't seem to Connect via NetStream to a Video in my Custom Video Player on Stage?
I am trying to Write an XML parser in Actionscript 2.0 for playlist.xml that will:
Play the FLV using a video object and Netstream class.

Here is my code......

myConn_nc.connect(null);
//
var netCon_nc:NetConnection = new NetConnection();
netCon_nc.connect(null);
var myStream_ns:NetStream = new NetStream(netCon_nc);
//
var myConn_nc:NetConnection = new NetConnection();
myConn_nc.connect(null);
//
var myStream_ns:NetStream = new NetStream(myConn_nc);
myStream_ns.onStatus = function(infoObject){
status.txt.text=infoObject.code;
myVideo_video.attachVideo(myStream_ns);
}
myStream_ns.SetBufferTime(5);
var played:Boolean = false;
var clickListen:Object = new Object();
clickListen.click = function(){
if(!played){
myStream_ns.play("http://a1426.g.akamai.net/7/1426/14721/7/cartvstream.download.akamai.com/14721/video/c/co_0036_e_h.flv");
played = true;
play_butn.label = "Pause";
}else{
if(play_butn.label == "Play"){
play_butn.label = "Pause";
}else{
play_butn.label = "Play";
}
myStream_ns.pause();
}
}
play_butn.addEventListener("click, clickListen");

Any Help would be greatly appreciated???

Thanks,

Code To Load External Movie And Jump To Frame 2?
i know this has been asked be fore but sadly not in the conditions that i need it to be, i want to load all my jpg pictures in an external movie there fore wenn someone clicks on button_2 in the home_movie i need the external movie to alsow jump to frame 2 and show picture 2, button_3 to frame 3 and so on. So far i have accompished that the external movie is loaded ontop of the origenal movie with picture 1 but i can't get my code right so that wenn you clicks on button 2 it jumps to frame 2

please excuse my english, it's not my motherlanquage

code: on (release) {
loadMovieNum("home_movie.swf",this, _level2);
onClipEvent (load) {gotoAndPlay(2); =probably wong?? but what do i use instead??

}

Advanced External Swf Load Problem (if MC Is Empty Code)..
let's say I have on the last frame of my external swf code like this:

unloadMovie(this);
// I think this should unload my external swf from my main movie

And now in my main movie I want to check if my container is empty.. if it is.. let's go to some other frame..

if (container == 0) {
main.gotoAndPlay(2);
}
//I was just hoping that this code checks if the container is empy.. and sends the main movie to frame 2 ..

maybe here are another ways to go.. so pls help me..

hope I was clear enough..

Advanced External Swf Load Problem (if MC Is Empty Code)..
let's say I have on the last frame of my external swf code like this:

unloadMovie(this);
// I think this should unload my external swf from my main movie

And now in my main movie I want to check if my container is empty.. if it is.. let's go to some other frame..

if (container == 0) {
main.gotoAndPlay(2);
}
//I was just hoping that this code checks if the container is empy.. and sends the main movie to frame 2 ..

maybe here are another ways to go.. so pls help me..

hope I was clear enough..

Load Image Like External Txt Possible?
I read some threads on the "actionscripting" board but they are over my head. So I am humbled to return to the newbi section.

All I want to do is designate a section on my stage to have an image load into, similar to loading text from an external txt file. I think I need to be using a "loadmovie" script.

I am using MX and this will be for desktop deployment not web, if that makes a difference.

AC To Load External Image In MC
I can't seem to find any tutorials on the exact AC I'd like to achieve. I have an MC in my main movie that I animated an effect on and I want to know if there is an actionscript that would load an external image into that MC. Please see the attached sample file of the animation.

TIA

How To Load An External Image?
Okay, I've been searching for two days straight to get help on this and it's driving me crazy. Every tutorial I find is either for MX or it's for a really complicated image gallery or it's a template. I don't have MX (and won't for a long time), I don't want a template, and I'm a complete beginner, so I want to start from the very bottom.

All I want to know is how to load ONE external image into my swf using Flash 5. I don't want to loop anything to see if it's loaded or use trace or xml or pass variables or anything else. Not yet. Right now, I just want to load the image using the image's actual filename and location.

I basically want the Flash 5 equivalent of an html <img src=photo.jpg> tag. Then I can start working my way up from there. Can anyone help me out with that?

Load External Image
Hi all,

I have a swf that you click the thumbnail and bigger size picture will pop up. But the thing is I would like to resize the bigger picture depending on the size of the user's screen. I know the javascipty code but I cant use it because it works only on html. I cant create a html for all my pictures, I have tons. I've read about the quesry string but how can I get the string out of the html and use it in the sfw file. Thanks!

Load External Image
Hey,

I'm trying to load an image into a specific frame of a movieclip.

I know how to load an external image, but is it possible to load it onto a specific frame?


Thanks

How To Load An External Image?
I have the following code in DisplayTest.as which I also have an fla file called displayTest.fla
in displayTest.fla I have
ActionScript Code:
var displayShuffle:DisplayTest = new DisplayTest();
to initialise an object of the DisplayTest class
what I want to do is to load an external image onto the stage. However, it would not show.

ActionScript Code:
package {
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import flash.display.Sprite;
    import flash.utils.*;
    import flash.events.*;
   
    public class DisplayTest extends Sprite {

        public function DisplayTest() {

            var loader:Loader = new Loader();
            addChildAt(loader,0);
            loader.load(new URLRequest("AA014242.jpg"));
        }

    }//end of DisplayTest Class
}
when compiling I get this error for Line 1 => 1180: Call to a possibly undefined method addFrameScript

How should I correct it to make it work?

Load External Image?
Hi all,

I'm trying to load an jpg file that is outside my flash SWF file and I've tried this code:

loadMovieNum("1.jpg", 1);

But it doesn't work.

Is there any simple code to load an external jpeg image into Flash?

Thanks!

Load A External Image
Im wanting to make a photo gallery that I can update easy, I thought if I could have a movieclip load external images for my thumbnails it would be nice but Im not sure how to set it up. I would make a file for my images and then another for my thumbnails, then if or when I want to switch out pictures I'd just have to drop new images into my folders and not even touch the FLA. Could anyone point me in the right direction with the right action script to use or a tutorial that explains how this is done..

And when I say load external I want it so I dont have to click on the image for it to load, I want it to just load automatically , I would put an invisible button or something to that efect over the images for a animated effect.

Thanks for your help.

Load External Image In Mc
Is that possible in as3 to load an external image (Bitmap) in a movieclip?

Load External Image?
Hi all,

I'm trying to load an jpg file that is outside my flash SWF file and I've tried this code:

loadMovieNum("1.jpg", 1);

But it doesn't work.

Is there any simple code to load an external jpeg image into Flash?

Thanks!

Load External Image
How to locally load image file from specified location such as drive C: or memory stick or flash drive...
Thank you in advance!

Changing Code To Load External Swfs Instead Of Html Links
Hi

So I've purchased a flash nav menu with some actionscript that's a lot more advanced than my skills. All I want to do is change the code so that i can make the buttons load external swfs instead of launching an html window. Any help would be really apreciated, I suspect it's some thing minor, but I can't figure it out. I've posted the script below, alot of it controls the look of the menu, I trimmed a bit off the end because the post was too long, I'm just concerned with the links part. Thanks in advance.



function subnum(i)
{
var inNum = 1;
var maxNum = 0;
while (inNum > maxNum)
{
if (this["sub" + i]["sub" + i + inNum] == undefined)
{
maxnum = inNum + 1;
continue;
} // end if
++inNum;
} // end while
max = 0;
return (inNum - 1);
} // End of the function
function onNout(n)
{
if (!n && _root.page)
{
n = _root.page;
benm = _root.page;
if (_root.page)
{
this["sub" + _root.page]["sub" + _root.page + _root.spage].frm(1);
} // end if
}
else
{
this["sub" + _root.page]["sub" + _root.page + _root.spage].frm();
} // end else if
for (i = 1; i <= num; i++)
{
if (n)
{
if (n == i)
{
this.ma.coloring(this.ma, i, 1);
this["mtxt" + i].alphaNfrmNmovXY(0, 1, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(100, undefined, undefined, undefined);
this.bar.subControler(_root["omtxt" + i]._x, _root["omtxt" + i]._width + 7, 100);
this["mline" + i].alphaNfrmNmovXY(0, 1, undefined, undefined);
this["mline" + (i - 1)].alphaNfrmNmovXY(0, 1, undefined, undefined);
this.bg._x = this["mtxt" + i]._x - 20;
this.bg._width = subw[i] + 20;
this["sub" + i]._y = 62;
this["sub" + i]._x = Math.round(subx[i]);
this["sub" + i]._alpha = 100;
this.bw.alphaNfrmNmovXY(100, 1, undefined, undefined);
}
else
{
this["mtxt" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["mline" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(0, undefined, undefined, undefined);
this.bw.alphaNfrmNmovXY(0, 0, undefined, undefined);
this["sub" + i]._y = 400;
} // end else if
this.nbtn.frm(1);
continue;
} // end if
this.ma.coloring(this.ma, 0, 0);
this.bw.alphaNfrmNmovXY(100, 0, undefined, undefined);
this["mtxt" + i].alphaNfrmNmovXY(100, 0, undefined, undefined);
this["omtxt" + i].alphaNfrmNmovXY(0, undefined, undefined, undefined);
this["mline" + i].alphaNfrmNmovXY(100, 1, undefined, undefined);
this["sub" + i]._y = 400;
this.nbtn.frm(0);
} // end of for
} // End of the function
function init()
{
_global.num = 6;
_global.onum = 4;
_global.sub = new Array();
_global.subw = new Array();
_global.subx = new Array();
counter = 1;
for (i = 1; i <= num; i++)
{
this.nbtn.gotoAndStop(1);
this["mtxt" + i].gotoAndStop(1);
sub[i] = subnum(i);
subw[i] = this["sub" + i]._width;
subx[i] = this["sub" + i]._x;
this["sub" + i]._alpha = 0;
this.ma.gotoAndStop(1);
this["btn" + i].onRollOver = function ()
{
pagerControl(1);
nm = benm = this._name.substring(3, 4);
onNout(nm);
};
this["btn" + i].onRollOut = this["btn" + i].onReleaseOutside = function ()
{
pagerControl(2);
onNout();
nm = benm = this._name.substring(3, 4);
};
this["btn" + i].onRelease = function ()
{
name = this._name.substring(3, 4);
getURL(_root["connURL" + name + "0"], _root["connGET" + name + "0"]);
};
for (n = 1; n <= sub[i]; n++)
{
this["sub" + i]["sub" + i + n].gotoAndStop(1);
this["sub" + i]["sub" + i + n].onRollOver = function ()
{
pagerControl(1);
nm = benm = this._name.substring(3, 4);
onNout(nm);
this.frm(1);
};
this["sub" + i]["sub" + i + n].onRollOut = this["sub" + i]["sub" + i + n].onReleaseOutside = function ()
{
pagerControl(2);
onNout();
this.frm(0);
};
this["sub" + i]["sub" + i + n].onRelease = function ()
{
name = this._name.substring(3, 5);
getURL(_root["connURL" + name], _root["connGET" + name]);
};
} // end of for
} // end of for
this.bg.onRollOver = function ()
{
pagerControl(1);
nm = benm;
onNout(nm);
};
this.bg.onRollOut = this.bg.onReleaseOutside = function ()
{
pagerControl(2);
nm = benm = undefined;
onNout();
};
this.nbtn.onRelease = function ()
{
if (counter == 1)
{
this.frm(1);
nBtnControler(1);
this._parent.masd.Check = true;
++counter;
} // end if
};
this.nbtn.onRollOver = function ()
{
this.frm(1);
};
this.nbtn.onRollOut = function ()
{
this.frm(0);
};
this.bg.useHandCursor = false;
this.masd.inbt.onRollOver = function ()
{
};
this.masd.inbt.useHandCursor = false;
for (i = 1; i <= onum; i++)
{
this["obtn" + i].onRollOver = function ()
{
};
this["obtn" + i].onRollOut = this["obtn" + i].onReleaseOutside = function ()
{
};
this["obtn" + i].onRelease = function ()
{
name = this._name.substring(4, 5);
getURL(_root["oURL" + name], _root["oGET" + name]);
};
} // end of for
} // End of the function
function nBtnControler(st)
{
var i = 1;
while (i <= num)
{
if (st == 1)
{
onNout();
this["btn" + i]._visible = true;
this.bg._visible = true;
this.m_mask.xwidth(Stage.width);
this["obtn" + i]._alpha = 100;
this["oline" + i]._alpha = 100;
}
else if (_root.page != undefined || _root.spage != undefined)
{
onNout();
}
else
{
this.m_mask._width = 0;
this["mtxt" + i]._alpha = 0;
this["btn" + i]._visible = false;
this.bg._visible = false;
this.bar._alpha = 0;
this["mline" + i]._alpha = 0;
this["obtn" + i]._alpha = 0;
this["oline" + i]._alpha = 0;
} // end else if
++i;
} // end while
} // End of the function
function pagerControl(st)
{
if (st == 1)
{
_root.pager.gotoAndStop(1);
_root.page = "";
}
else if (st == 2)
{
_root.pager.play();
} // end else if
} // End of the function
Stage.align = "";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_root.connURL10 = "125.html";//COMPANY
_root.connURL11 = "125.html";
_root.connURL12 = "125.html";
_root.connURL13 = "125.html";
_root.connURL14 = "125.html";
_root.connURL15 = "125.html";
_root.connURL16 = "125.html";
_root.connURL20 = "125.html";//BUSINESS
_root.connURL21 = "125.html";
_root.connURL22 = "125.html";
_root.connURL23 = "125.html";
_root.connURL24 = "125.html";
_root.connURL30 = "125.html";//PRODUCTS
_root.connURL31 = "125.html";
_root.connURL32 = "125.html";
_root.connURL33 = "125.html";
_root.connURL34 = "125.html";
_root.connURL35 = "125.html";
_root.connURL40 = "125.html";SERVICE
_root.connURL41 = "125.html";
_root.connURL42 = "125.html";
_root.connURL43 = "125.html";
_root.connURL44 = "125.html";
_root.connURL45 = "125.html";
_root.connURL50 = "125.html";SOLUTION
_root.connURL51 = "125.html";
_root.connURL52 = "125.html";
_root.connURL53 = "125.html";
_root.connURL54 = "125.html";
_root.connURL60 = "125.html";SUPPORT
_root.connURL61 = "125.html";
_root.connURL62 = "125.html";
_root.connURL63 = "125.html";
_root.connURL64 = "125.html";
_root.connURL65 = "125.html";
_root.connURL66 = "125.html";

_root.connGET10 = "";
_root.connGET11 = "";
_root.connGET12 = "";
_root.connGET13 = "";
_root.connGET14 = "";
_root.connGET15 = "";
_root.connGET16 = "";
_root.connGET20 = "";
_root.connGET21 = "";
_root.connGET22 = "";
_root.connGET23 = "";
_root.connGET24 = "";
_root.connGET30 = "";
_root.connGET31 = "";
_root.connGET32 = "";
_root.connGET33 = "";
_root.connGET34 = "";
_root.connGET35 = "";
_root.connGET40 = "";
_root.connGET41 = "";
_root.connGET42 = "";
_root.connGET43 = "";
_root.connGET44 = "";
_root.connGET45 = "";
_root.connGET50 = "";
_root.connGET51 = "";
_root.connGET52 = "";
_root.connGET53 = "";
_root.connGET54 = "";
_root.connGET60 = "";
_root.connGET61 = "";
_root.connGET62 = "";
_root.connGET63 = "";
_root.connGET64 = "";
_root.connGET65 = "";
_root.connGET66 = "";
_root.oURL1 = "125.html";//HOME
_root.oURL2 = "125.html";//LOGIN
_root.oURL3 = "125.html";//JOIN
_root.oURL4 = "125.html";//SITEMAP
_root.oGET1 = "";
_root.oGET2 = "";
_root.oGET3 = "";
_root.oGET4 = "";
MovieClip.prototype.xwidth = function (tw)
{
var speed = 2.000000E-001;
tw = tw == undefined ? (this._width) : (tw);
this.onEnterFrame = function ()
{
this._width = this._width + (tw - this._width) * speed;
if (Math.abs(tw - this._width) < 1)
{
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.coloring = function (name, n, pb)
{
chg = new Color(name);
var confirm = 0;
this.color0 = "255, 255, 255";
this.color1 = "167, 190, 0";
this.color2 = "0,169,190";
this.color3 = "146, 23, 237";
this.color4 = "255, 5, 81 ";
this.color5 = "255, 102, 0";
this.color6 = "227,0,16";
col = this["color" + n].split(",", 3);
cRed = col[0];
cGreen = col[1];
cBlue = col[2];
var spd = 4;
this.onEnterFrame = function ()
{
confirm = 0;
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
++confirm;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
++confirm;
} // end if
} // end else if
with (name)
{
thisColor = chg.getTransform();
thisColor.rb = thisColor.rb + (cRed - thisColor.rb) / spd;
thisColor.gb = thisColor.gb + (cGreen - thisColor.gb) / spd;
thisColor.bb = thisColor.bb + (cBlue - thisColor.bb) / spd;
chg.setTransform(thisColor);
if (Math.abs(thisColor.rb - cRed) <= 8)
{
thisColor.rb = cRed;
thisColor.gb = cGreen;
thisColor.bb = cBlue;
chg.setTransform(thisColor);
++confirm;
} // end if
} // End of with
if (confirm == 3)
{
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.mcAlphaMove = function (txa, txb, tyc, tyd, al)
{
var speed = 2.000000E-001;
al = al == undefined ? (0) : (al);
txa = txa == undefined ? (this._x) : (txa);
txb = txb == undefined ? (this._y) : (txb);
tyc = tyc == undefined ? (this._x) : (tyc);
tyd = tyd == undefined ? (this._y) : (tyd);
al = al == undefined ? (this._alpha) : (al);
this.onEnterFrame = function ()
{
this._x = this._x + (txa - this._x) * speed;
this._y = this._y + (txb - this._y) * speed;
this._alpha = this._alpha + (al - this._alpha) * speed;
if (Math.abs(this._x - txa) < 1 && Math.abs(txb - this._y) < 1 && Math.abs(al - this._alpha) < 1)
{
this._x = tyc;
this._y = tyd;
delete this.onEnterFrame;
} // end if
};
};
MovieClip.prototype.frm = function (pb)
{
this.onEnterFrame = function ()
{
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
delete this.onEnterFrame;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
delete this.onEnterFrame;
} // end if
} // end else if
};
};
MovieClip.prototype.alphaNfrmNmovXY = function (al, pb, x, y)
{
var spd = 4;
var confirm = 0;
al = al == undefined ? (0) : (al);
x = x == undefined ? (this._x) : (x);
y = y == undefined ? (this._y) : (y);
this.onEnterFrame = function ()
{
confirm = 0;
if (pb == 1)
{
this.nextFrame();
if (this._currentframe == this._totalframes)
{
++confirm;
} // end if
}
else
{
this.prevFrame();
if (this._currentframe == 1)
{
++confirm;
} // end if
} // end else if
this._alpha = this._alpha + (al - this._alpha) / spd;
if (Math.abs(this._alpha - al) < 4)
{
this._alpha = al;
++confirm;
} // end if
this._x = this._x + (x - this._x) / spd;
this._y = this._y + (y - this._y) / spd;
if (Math.abs(this._y - y) < 1 && Math.abs(this._x - x) < 1)
{
this._x = x;
this._y = y;
++confirm;
} // end if
if (confirm == 3)
{
delete this.onEnterFrame;
} // end if
};
};

Load External Image In New Window
Hi, how do i load an external image from a button so it opens in it's own pop up window?
Thanks guy,
Mark.

Flash & PHP To Load External Image?
Does anyone know how I can use PHP to load an image into flash? I know how to load text into a dynamic textbox via flashvars, but I can not get an image to display this way. I do not know much about actionscripts, but I do know a little bit about PHP. I am not using any Adobe/Macomedia products, I am using a cheaper piece of flash software.

Any help or info would be great.

[F8] External Image Load And Fade
Hello guys

i am trying to modify on a open source fla. scripted by Eric Murray.

i been working with Flash a while but i am absolutely not good in actionscript. And i wanted to ask if anyone can help me just a bit in how i can modify the fla. I have tried by myself but with no success till yet.

the fla loads external jpg,s and it fades them by clicking...


1. I wanted to remove the mc "collButtHolder" in the Layer "MENU1" so that the slide1 is running right from the start without any click

2. Possible to have 1-2 more of the mc "collectionMenu" in the Layer "MENU" ? which loads from different Folders ?


download the fla :

http://www.3agens.com/load_fade.zip




very thanks if you could help me a bit

noni

Load External Image And Edit
Hello,

for the last couple of days i'm trying to get my code to work, but somehow I don't see the big picture.

My goal is to load an external jpg/png, from the same server. When this jpg/png is loaded i want to select a few pixels and turn them to aplha value 00.

The picture is loader allright, but the setpicture attr doesn't so anything.

import flash.display.BitmapData;
this.createEmptyMovieClip("holder_mc",-16385);
loader = new MovieClipLoader();
loader.addListener(this);
loader.loadClip("winter.png",holder_mc);
function onLoadInit()
{

myBitmap = new BitmapData(holder_mc._width, holder_mc._height,true,0xffffffff);
myBitmap.setPixel32(100,111,0x00FFFFFF);
myBitmap.setPixel32(101,111,0x00FFFFFF);
myBitmap.setPixel32(100,112,0x00FFFFFF);
myBitmap.setPixel32(101,112,0x00FFFFFF);
myBitmap.draw(holder_mc._x = 191);

holder_mc.removeMovieClip();
}
function onLoadError()
{
holder_mc.removeMovieClip();
}

stop();


If someone could point me in the right direction, I'd be very pleased

Load External Image With Url Link
Hi

Not played with flash for a long while can anybody tell me why the following does not work.

The image loads but the url does not function.


Code:
createEmptyMovieClip("my_mc", this.getNextHighestDepth());
my_mc.loadMovie("http://www.mysite/pic1.gif");
my_mc.onRelease = function(){
getURL("http://bbc.co.uk");
};
This is all I have in my code at present.

Re Dave

How To Load An External Image Into A Sprite?
I want to load an external image into a sprite named imageHolder,
and I want this imageHolder only holds one image at a time, which means, when I load a new image into imageHolder, the old image in it should be replaced/removed/deleted.
so far I found that the images would lay onto one another, which is not what I want.
here's a fraction of my code, how should I achieve what I intend to do?
should I use removeChild() somewhere?



ActionScript Code:
var loader:Loader;
var imageHolder:Sprite= new Sprite();
addChildAt(imageHolder, 0);
function LoadExternalTest(targetName:String):void {
var index:uint = retrieveIndex(targetName);     
loader = new Loader();     
loader.load(new URLRequest(fArray[index][0]));     imageHolder.addChild(loader); }

Load External Swf With Dynamic Image
The files: Fla.rar

Hi
I have problems displaying the background image of an external.swf loaded into a main.swf. The main.swf is the Sliding Menu downloaded from Kirupa.

The s2.swf calling for the background image
I have an empty mc in the main stage with the instance of imgHolder2.

The script calls for the image:
_root.imgHolder2.loadMovie("images/content2.jpg");

Why does the background image of external.swf not display???


The button in main.swf calling for external swf
After finish sliding, button loads external.swf into _root.contentHold.content2.

The script:
b2.onRelease = function() {
menuSlide(contentHold.content2);
_root.contentHold.content2.loadMovie("s2.swf");

Im not sure the script is correct. Should I define the path to the external swf differently!?
Thanks for your time
Leo

Load External Image And Animate?
This may be a naive question, but -

What is the best method to draw external content (an image file) into a Flash movie, AND then ANIMATE that content?

I assumed I would need to use the LOADER COMPONENT to draw an image file from an external URL, but is there a way to then perform a simple animation (e.g., slide the image across the stage) with the loaded image? I cannot seem to figure out how to manipulate an image once loaded (using the LOADER COMPONENT).

Yes, I am new to Flash, so there may be six other ways to do this of which I am not aware.

Suggestions/solutions?

Load External Image Problem
I am building a simple photo gallery. Each gallery category (ex: nature, fine art, etc.) is a seperate swf loaded into main interface. Within each of the seperate swf files, i have an empty loader clip to load large image. All of my thumbnail images are in movie clips. Within the thumbnail movie clip, i have in the first frame of the actions layer:

th1_mc.onRelease = function() {
_root.loader_mc.loadmovie("/assets/family/1b.jpg");
};

However, when I test movie, I get no errors but my image will not load into the empty movie clip. Can someone help me.
Thanks in advance.

Progress Bar External Image Load
Hello all,
I have a proplem I can't figure out.
I am making a portfolio website of images. These images are external files loaded using the loader component. I want to have a progress bar that gives feedback and disappears when the image is loaded and displaying. I've tried the progress-bar tutorials in "help" file and searched online but cannot find the answer as to how to get it too work.
My images load but slow so I need a progress bar. Thanks
(Flash CS3 A.S. 2.0)

The below code is I took from the tutorial on using component progress bar and modified it to my file. It's f-d up I'm sure. the progress bar and loader are on the same layer and the actionscript is added to that layer (as that's how they do it in the tutorial)
I'm trying to get the bar to function 0-100%, (that's what I though the listener was for) then I want it to become invisible when done loading.

"mainimage" is my instance of the picture loading component
"my_pb" is the instance name of the progress bar component


var mainimage:mx.controls.Loader;
var my_pb:mx.controls.ProgressBar;

my_pb.mode = "polled";
my_pb.source = my_ldr;

var pbListener:Object = new Object();
pbListener.complete = function(evt_obj:Object) {
trace("image loaded");
}
my_pb.addEventListener("complete", pbListener);


mainimage.autoLoad = false;
mainimage.contentPath = "images/handbridge.jpg";

// when autoLoad is false loading does not start until load() is invoked
mainimage.load();





























Edited: 03/04/2008 at 01:14:34 PM by studiotyphoon

LoadMovie - Load External Image
I have a website I made with a single flash file in which the .swf is 2.7 MB. The web site functions as a gallery of images that you can zoom into and move around, so large images are necessary. I had an idea to make the action script load the images externally into the .swf to make it smaller, but the script that I'm trying doesn't seem to work. I found it in the Flash help:

_root.figure_1.da_1a.i_1.loadMovie("images/gallery/Mr.Cooper(web)a.jpg");

i_1 is a button that contains the first image you see in the gallery. Evidentially, it has to be a button for the drag and drop or zoom functions to work - I can't remember which, I made this site last month. I just remember changing into an MC didn't work.

Anyway, today I placed this above script in the first frame of the MC that contains this button (da_1a), and nada. It didn't load anything. I also read that when it does load it will put the left corner on the registration point which is in the center of the button. The registration has to stay there for the zoom function to work properly. So, I need to somehow accompany the script with parameters to where to place the loaded image - x=(-400), y=(-262.5).

It seems this should be simple. Any help would be great.

Thanks,

JP

How To Use A Button To Load External Image.
Hello,

I wish to use a button to load an external image. However it does not work. The codes are:


Quote:




import flash.display.Sprite;
import flash.events.Event;

var logo:Sprite = new Sprite();
var myLoader = new Loader();

myLoader.load(new URLRequest("myimage.png"));

function checkComplete(evt:MouseEvent):void {
myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE, loadImage);
}
loadPicture_btn.addEventListener(MouseEvent.CLICK, checkComplete);

function loadImage(evt:Event):void {
logo.addChild(myLoader);
addChild(logo);
}




It seems that the loadImage function cannot be called from within the checkComplete function. How can I fix the problem?

Thanks and best regards

Alex

Load And Measure External Image
Hi,

I want to make a slideshow where images get loaded in a movieclip with a white frame (so the pics have a nice frame around them). But since my pics aren't all of the same format - I need each time to load and get the size of a pic, set the container_mc (with the frame) to the right size and then place the pic in it. I can't seem to find the right AS instruction for getting the size of the loaded pic. Can anyone help?

thanx!

Load External GIF Or PNG Image To Flash ?
Hi,
I heard that Flash can not load external image except image in JPG format. Is that correct ?
a work-around solution is putting the image ( in GIF ) into another flash, then the main Flash will load the GIF files from that swf.
But I still wonder if theres another solution for that !
if you got any idea or a solution, please help me through !

thanks,

Thang.

Use LoadMovie To Load External Image In Movieclip
HI all,

I try to load an extenal image via LoadMovie into an emptyMovieClip.
It works. But I want to make this image clickable.

This is my code:

_root.createEmptyMovieClip("MC1",1);
_root.MC1.loadMovie("image1.jpg");
_root.MC1.onRelease = function() {
trace("name "+this._name);
}

The event handler on the MC1 does not work.
In the debug mode the Object _level0.MC1 exists.
Why can't I use an event handler on the image??

tnx for any idea

bernd

Is That Possible To Load External Image By Getting The Parameters From EMBED TAG?
Hello everybody.

I know for sure that external text is very easy to load by getting parameters from EMBED and PARAM NAME tags from html page where flash movie is placed. I’d like to find out if it is possible to load images by getting parameters from EMBED PARAM NAME tags. Here is example of the code:


Quote:




<PARAM NAME=movie VALUE="movie.swf?text=Hello Friend&img1=images/image1.jpg&img2=images/image1.jpg&img3=images/image1.jpg">
<PARAM NAME=quality VALUE=medium> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="movie.swf?text=Hello Friend&img1=images/image1.jpg&img2=images/image1.jpg&img3=images/image1.jpg" quality=medium bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="movie" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>






In the red are the parameters for getting text. It is working. In the blue are parameters as a link to the images. I’d like to know how flash can get these parameters and load the images.
The attached files is the example where text is working but images are not loaded.
I almost lost a hope that it is possible. In advice is highly appreciated.

Load External Image, Onmouse Over Scroll
Hi,
did any of you point me to place, where I could find a script, case, which will help me make a photo gallery...load external images...onmouse over scroll...
THX for any help you can give.

Load External Image In A Tooltip Class
Hello World.

I'm not a expert in AS, but a i have some Knowledge.

I have a AS 2 class tootip that i would like to load external images, with a circle preloader.

I have search all posts and didn't find what i need.

Can anyone assist me on finding the answer.

Quote:

"Give a man a fish, and you've given him a meal. Teach him to fish, and he'll have food for a lifetime."

Thanks

External Image Load/unload With Button In MC
I'm trying to create a movie clip which contains the background image and has thumbnails which change the image once you click on it.

Whats the best way to code this?

I'm having trouble with the depth.

addChildAt(imageName, o)

that works for the first image but how do i unload the image before going to next frame to load the new image when the corresponding thumbnail is selected?

thanks!

How To Load Image From External Source [renamed]
Yeah i should know this by now but how do u load an image from an external source?

How To Load External Image With Transition Effect?
Hi,

How can I do some transition effect while loading the external image.

The following code is not working. The "picture.png" only waits 3 seconds and appear without any transition effect.


Quote:




import fl.transitions.*;
import fl.transitions.easing.*;

var loader:Loader = new Loader()
image_mc.addChild(loader)
loader.load(new URLRequest("picture.png"))

// apply wipe transition
TransitionManager.start(image_mc, {type:Wipe, direction:Transition.IN, duration:3, easing:None.easeNone, startPoint:1});




Best regards

Alex

How To Load Image From External Source [renamed]
Yeah i should know this by now but how do u load an image from an external source?

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