Loading Dynamically Graphics Into Flash
ciao
first time i'm myself more or less in trouble...
i want to load graphics, such as jpgs or gifs, dynamically in flash movie. but i don't want to have them always make an .swf befor importing.
actually i don't think there's a solution for this, but if there's one let me please know.
thanks for everything
choschen
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-09-2001, 03:02 AM
View Complete Forum Thread with Replies
Sponsored Links:
Loading External Text/graphics Files Into A Flash Animation
Hi, I wonder if anyone can help.
I need to load different text and graphics files into a movie.
I have a popup window formatted as needed which is part of the main movie.
The basic idea is that there are different buttons on the screen which when clicked call up the popup formatted box.
The text and graphics files are all different but are related to the text files.
Can anyone suggest some Actionscript, javascript, or php which I could use to solve the problem??
View Replies !
View Related
Urgent How To Create Graphics Dynamically?
Hi dudes,
This is kinda urgent so i'll be appreciated if you gave me a quick reply. I have created a new symbol which is a graphic....and now i want to create instances with ActionScript....How?
The pseudo-code is something like this:
for(i=0;i<5;i++)
{
create Instance of symbol X
Instance_y=Pos+Delta*I
....
}
You get the point right?
Thanks in advance,
Sérgio
View Replies !
View Related
Help With Flash MX Dynamically Loading?
Im working on a project that , takes images from a digital camera that are stored into a database , these images can be looked up by a time stamp . we create a movie out of all the imges we want and i want to display the movie in flash MX , these movies cant be embedded as it will change on the criteria that the user wants to view. Is there a way to even call the movie from a folder ?.
any way to do this ?
View Replies !
View Related
Loading .jpg Dynamically With Flash MX
I've read the following about loading .jpg files dynamically:
"First of all, be careful : Flash MX allows you to load dynamically images that are non-progressive JPEG. Save the images you want to load under this format, in RVB mode and everything will be just fine. "
I have tried various file saving techniques to save my .jpg file as a progressive RGB photo, and my photo does not show up upon publishing my flash movie.
Any hard and fast tips in saving .jpg files in a way that guarantee's me that they will be in the proper type, and loadable by flash?
Thanks!
View Replies !
View Related
Loading .jpg Dynamically With Flash MX
I've read the following about loading .jpg files dynamically:
"First of all, be careful : Flash MX allows you to load dynamically images that are non-progressive JPEG. Save the images you want to load under this format, in RVB mode and everything will be just fine. "
I have tried various file saving techniques to save my .jpg file as a progressive RGB photo, and my photo does not show up upon publishing my flash movie.
Any hard and fast tips in saving .jpg files in a way that guarantee's me that they will be in the proper type, and loadable by flash?
Thanks!
View Replies !
View Related
Dynamically Loading JPGs From A URL Into Flash
Is it possible for the FLASH movie to dynamically pull gif / jpg images from a specified URL?
For some website I created the client is forced to come to me to get changes made. I was wondering if I could set it up so they could changed images on their server space and the flash site I designed will dynamically load them from the URL and place them in the movie.
I assume this is possible, I just have no clue how to go about doing it.
Any help / guidance is greatly appreciated!
Thanks
Glenn
View Replies !
View Related
Dynamically Loading Images With Flash
Hey all,
I have an interesting question and am wondering who has explored this idea. We have created an application that dynamically creates an image with "company logo" and saves it in the desired format. I would like to extend this functionality with Flash. All I need Flash to do is be able to make a call to this dynamically generated image file and put it inside Flash. I have some ideas about how I "might" be able to get this to work. Do any of you guys have any bright ideas?
Basically I beleive that PHP can write Flash files. That being the case, can PHP take an image and "wrap" it in a Flash movie(or extensions). I think I would then be able to call the image a MAIN Flash movie that way.....
Any ideas are greatly appreciated! Thanks all!
- Sigma
View Replies !
View Related
Dynamically Loading Image In Flash
Hi Flash experts,
Have two questions, hope you can come to the rescue as I am pretty new to Flash.
1) Is it possible to display an image in Flash? Say I have a text file containing the URL to the images, is it possible for flash to read those URL and display it?
2) Is it possible to change the Flash canvas size (after it has been published) using Actionscript?
Thanks!
- boon
View Replies !
View Related
Dynamically Loading Images Into Flash?
I have been trying to conceptualize in my head how I could dynamically load images into flash, in any way. For example, just making a image show without having to ever import the files into Flash.
I had an idea to try putting an <IMG> tag into HTML enabled dynamic text in Flash, but alas, that did not seem to work.
Anyone have any ideas on how this could be done?
View Replies !
View Related
Loading Images Dynamically Flash MX
I am looking for a way to load images into a site dynamically from a folder on the server. Images will be updated monthly by the client - who has no flash knowledge.
Basically I'd like to specify an area in flash and tell it to pull image.jpg from http://www.myserver.com/images/image.jpg.
When image.jpg is updated - the updated file would show up in specified area.
any ideas or url's to specific tutorials?
Thanks.
m
View Replies !
View Related
Dynamically Loading Images In Flash 5
Hopefully someone can help me out with this, I am currently working on a small advertisment for a client and to prevent us from having to do much work to it in the future I made the text dynamic, but I also want the photos to be dynamically loaded. I've read that this isn't possible with Flash 5, but is a new feature in MX.
At home I have Flash MX so I was thinking of creating a .swf at home that would display the photos off the server and then taking that file back to work and using loadmovie in flash 5 to import the .swf.
Anyone know if this might work or have better ideas?
You can have a look at the thing at miles.williams.archose.com/duev.swf
Source file is miles.williams.archose.com/duev.zip
View Replies !
View Related
Dynamically Loading Array Into Flash
Hey everyone,
I downloaded a great 'quiz' .fla from this site that includes an actionscript file containing the quiz questions and answers. It uses the #include statement to load the file...and I've discovered that the #include statement imports the actionscript at the time you generate the .swf file for the quiz. I thought I could just change the .as file to change my quiz questions without exporting my .fla again...but noooooooo!
What I would like to do is create an external file that will load in the variables (using loadvariables). The problem is what it's loading in is an array.
e.g.
quizquestion1 = ["What is your name",3,["Annie","Bob","Mark","John"]]
You'll notice that the third element in the array is actually an array also!
I thought I could do this in an external file:
quizquestion1 = ["What is your name",3,["Annie","Bob","Mark","John"]]
But it doesn't load this in as an array. The problem is the nested array also... If I put this statement in the frame actions, it works fine....by importing these variables in doesn't work. How can I import as an array (and the imbedded array) so this works okay for me?
Can anyone help me?????
Thanks,
View Replies !
View Related
Dynamically Loading Images - Xml & Flash Mx
Hi!!
I am trying to dynamically create a portfolio in which i have to dynamically load images using xml. Now , I am able to load one image but others are not being loaded.
I am reading the xml file and getting the data to be displayed....a part of the code is
var authorNode=findNode(rootNode, "img1");
img1=getValue(authorNode);
display(img1);
display() is a function which is called to create a createEmptyMovieClip to display an image. The prob comes when i am trying to load 2nd image and call a similar fn......the first imag by default pick up the value of the last display() and places the first image in the end......no image is hence displayed on the initial place.
If someone has understoood the prb please help me to find a solution at the earliest.
Thanx!
View Replies !
View Related
Dynamically Loading Avi's Into A Flash Vid Player
Right now i'm trying to make a video player in flash that dynamically loads avi's, and possibly even wmv's into the player during runtime. I have it working currently by converting the movies to swf's, but the downfall to this is that it loses major quality and its utterly tedious and time consuming to convert so many videos into swf.
I was wondering if there is a better way to do this, such as maybe how to stream a video into flash directly from its original format.Thanks a bunch if someone can help me with this!
View Replies !
View Related
.FLV Loading Video Into Flash Dynamically
I'm trying to load .FLVs into a movieclip. is that possible? it should be. I don't want to use any components.
Anybody have any experience with that? I guess I need to have them be progressive download since I've never set up a streaming server and don't think we have access to one for this project.
Anybody got any advice, good tutes, AS code I can look at? this is a new one and I'm not finding much in the AS Dictionary other than streaming.
thanks for any help!
View Replies !
View Related
Dynamically Loading HTML Into Flash
I am trying to have a some dynamically generated HTML content load into Flash. I am not sure exactly how to do this. I basically have a link that sends infromation to a webservice, and the webservice sends back the content formatted in HTML. I would like to load this content into a Flash text box, or something. Does anyone have any ideas on how to go about doing this?
Help!
View Replies !
View Related
Dynamically Loading Avi's Into A Flash Vid Player
Right now i'm trying to make a video player in flash that dynamically loads avi's, and possibly even wmv's into the player during runtime. I have it working currently by converting the movies to swf's, but the downfall to this is that it loses major quality and its utterly tedious and time consuming to convert so many videos into swf.
I was wondering if there is a better way to do this, such as maybe how to stream a video into flash directly from its original format.Thanks a bunch if someone can help me with this!
View Replies !
View Related
Dynamically Loading Images In Flash 5
Hopefully someone can help me out with this, I am currently working on a small advertisment for a client and to prevent us from having to do much work to it in the future I made the text dynamic, but I also want the photos to be dynamically loaded. I've read that this isn't possible with Flash 5, but is a new feature in MX.
At home I have Flash MX so I was thinking of creating a .swf at home that would display the photos off the server and then taking that file back to work and using loadmovie in flash 5 to import the .swf.
Anyone know if this might work or have better ideas?
I'm attaching my fla file so you can take a look at what I'm doing.
View Replies !
View Related
Loading Pictures Dynamically To A Dynamically Loaded Clip
Here's the issue. I'm creating a video player and EVERYTHING is working swimmingly except for one thing. On my list of available videos (which is XML driven) everything reads in correctly and the movie clips are added correctly, but I can't get the thumbnails to add to the stage. Someone help!! Here's the code I'm using:
EDIT: Oh yeah, the thumbs are located in a separate directory and the location is indicated in the xml file. the "vidList" variable is my XML list.
PHP Code:
function loadPics():void //this is the first function called...{ for(var i:uint = 0; i < vidList.length(); i++) { var picLoader:Loader = new Loader(); picLoader.addEventListener(Event.COMPLETE, onPicLoaded); picLoader.load(new URLRequest(vidList[i].thumb)); trace(vidList[i].thumb); picLoader.width = 72; picLoader.height = 54; picLoader.x = 0; picLoader.y = 0; picLoader.name = vidList[i].title; } populateList();}function onPicLoaded(e:Event):void //this should be called after each pic is loaded, but the trace statements have yet to appear.{ trace("________________________"); trace(e.currentTarget.name); trace("________________________");}function populateList():void //everything in here works fine{ for(var i:uint = 0; i < vidList.length();i++) { var lItem:ListItem = new ListItem(); lItem.title.text = vidList[i].title; lItem.caption.text = vidList[i].caption; lItem.x = 5; lItem.y = 7+(79*i) lItem.filters = [dsf, bf]; lItem.name = vidList[i].title; list.addChild(lItem); lItem.addEventListener(MouseEvent.CLICK, clickVideo); }}
Can anyone give me any kind of suggestion on how to do this?
Basically, after all the foundation stuff for the video player is done, it calls the loadPics function. That is supposed to load each pic and then upon the pic being loaded, it was going to call the onPicLoaded function and I was going to (somehow) pass them to some type of array. Then, in my populateList function I would just use "i" to put the correct pic with the correct video.
Please help! I can give you more if you need it. I just don't know what else to post.
View Replies !
View Related
Dynamically Loading Images Into Dynamically Loaded MovieClips
I'm read through many of the posts and found several on this topic, none, however, that addressed all that I need addressed. I've tried several of the suggestions but so far nothing seems to work.
What I want to do is alter the width of images loaded dynamically into a dynamically loaded set of movieclips. all of the widths of the images are different, but i want them set to the same width. The width seems to stay at zero, however, and I cannot seem to change it.
Here is my code:
for (var i:Number = 0; i < 8; i++){
var mc = attachMovie("rect_mc", "r" + i, this.getNextHighestDepth());
mc._x = 90 + (i * (mc._width+5));
mc._y = 375;
mc.img_txt.text = "image" + (i+1);
mc.img_mc.loadMovie("myPic" + (i+1) + ".jpg");
mc.img_mc._xscale = mc.img_mc._yscale = (50/mc.img_mc._width) * 100;
};
The last line is the one that does not function properly.
I'd appreciate any help anyone can provide. thanks.
View Replies !
View Related
Problem With Loading Jpegs Dynamically Into Dynamically Created MC's
hey all. I got a problem with loading jpegs dynamically into dynamically created MC's. I've been using NEIL WEBB's tutorial on dynamic creation with event handling through the LISTENER component, which you can see here http://www.actionscript.org/tutorial...MX_2004_Part2/
I have slightly altered the script to accomodate the fact that I want to attach a movieclip with text fields and image holders within it, but the code aint too different I don't think.
Code:
stop();
myMCL = new MovieClipLoader(); //define MovieClipLoader
myListener = new Object(); //define listener
myListener.onLoadComplete = function(targetMC){ //set the onComplete function on listener
trace("targetMC = " + targetMC._name);
targetMC.onPress = function() { //define onPress within function
}
}
//****************************
function initClips(){
//trace(_global.gallery_cnt);
for (i=1; i<=_global.gallery_cnt; i++){
//trace("Attaching Clip - " + i);
this.gallery_TN_holder.attachMovie("TN_Holder", "TN_Holder" + i, i); //attach the movie
this.gallery_TN_holder["TN_Holder"+i]._x = (i-1)*90; //spacing
this.gallery_TN_holder["TN_Holder"+i].TN_Text.text = _global.gallery_array.description;
[i] [i]myMCL.loadClip(_global.gallery_array.main_thumbnail ,this.gallery_TN_holder["TN_Holder"+i].TN_Image);
//load images into clip
}
play();
}
//****************************
myMCL.addListener(myListener); //associate listerer with MCL object
initClips();
The first line ("trace") in bold outputs
Quote:
targetMC = TN_Image
targetMC = TN_Image
which you can see is resulting from the second bold line.
Basically I need some direction with this as to how to reference the clip target for the loaded JPEG, as my output in the movie shows the attachMovie works, as does the text change within the individual "TN_Holder" clips. What the hell am i doin wrong, cos my eyes are kinda starting to go kinda funny looking at this stuff!!!!!
Thanks for any help!
View Replies !
View Related
Loading Complex Graphics?
I'm a newbie to actionscript so excuse me if my question is stupid. I am messing with a flash MX 2004 file that animates a logo symbol with gradients. I just figured out to get the logo to animate smoothly I need to hide it on a layer in the first frame so that when it appears on screen the transition is smooth. I thought a PreLoader would do the trick, but the first pass was always choppy... the second pass was always smooth. So here's my question, anyway to code complicated symbols/bitmaps so that they invisibly load in the first frame of the preloader so that the frontend of the movie isn't slowed down? Or is there a better solution?
View Replies !
View Related
Some Graphics Not Loading, Even With Preloader
Hello,
I've got a swf that i'm using from several location throughout a course Web site. Lesson 1 embeds the same swf as Lesson 2. In each lesson I pass a variable to the SWF to tell it which lesson data it needs to access. See below. The exercise_var=0 tells the swf to load the data from the childnode that is 0. Lesson 2 would have an exercise_var=1, etc..
...
var fo = new FlashObject("../6568-00.swf?exercise_var=0", "animationName", "450", "500", "8", "#FFFFFF");
...
The following code is in the SWF and loads the XML info:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
_global.conflict_var = xmlNode.childNodes[exercise_var].childNodes[0].firstChild.nodeValue;
_global.verdict_var = xmlNode.childNodes[exercise_var].childNodes[1].firstChild.nodeValue;
_global.answer_var = xmlNode.childNodes[exercise_var].childNodes[2].firstChild.nodeValue;
gotoAndStop("main");
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("../hs-6568.xml");
This all seems to work and I also added a preloader but sporadically I'm finding that not all the graphics in my SWF are loading and I have to hit refresh to reload the movie. Any ideas why some of my stage items are not loading on random pages? I grouped the graphics on the stage and made them a grahpic movie clip hoping this would force them to load. But it hasn't worked.
View Replies !
View Related
MX Random Loading Graphics
Is it possible to create a simple script/file where you would have 10 graphics, each graphic containing a number from 1-10, and each time you click on a button/or the graphic it would select and load one of the graphics randomly?
The finished product would need to be in a single file...
Any ideas anyone?
View Replies !
View Related
Loading Images Dynamically In Flash MX - Question?
I watched a very good Quicktime tutorial for Loading images dynamically in Macromedia Flash MX at the official site. I tried it out and works perfectly. I just have one extra question that wasn't covered in the tutorial, and I was hoping someone here could solve this simple problem for a dummie.
In the tutorial, you have to make a movieclip (which they've called) jpgMovie. And this is where the images load from. Is there a way of, instead of the image loading from the top left corner, can it load from the centre??
Long, confusing question for a (hopefully) simple request. Can anybody help?
View Replies !
View Related
Dynamically Loading A Movie Outside Of The Flash File
Hey, been researching a solution to this problem for the past couple of days now.
What it is, we are trying to discover a way to dynamically load individual movies into a flash window display. I realise this is going to require the use of the "loadClip" function. But I guess I should explain the scenario.
Our company is looking to generate quite a few instructional videos that are approximately 1 minute in length if not longer. We've established that Flash would be the prefered method of presenting these videos as a majority of users out there have flash player plugin's and that they are easier to download as well... However.
I've run into the issue of getting some questions answered:
1) I know flash can have actionscript place in the file to bring in a .FLA Movieclip outside of the current flash file being loaded. I also know we can bring in outside non-progressive .jpg files. Now I've been tring to discover is if it is possible to bring in outside: WMV, MPEG, or MOV files without converting them to a Flash Movieclip?
a. continuation) If we can, does flash play these outside files by itself or do the users still require the media player being used to be loaded on their system in order to view it, or can it play the (wmv, mov, or mpeg) by flash itself?
2) tring to figure how we could do the code to dynamically pull these individual movies into Flash. Possibly by checking a parameter such as the current URL loaded. or a property that is update based on an outside link being clicked. (should note that our main site is majority coded in ASP.NET).
3) Would it be better if we just made individual Flash Splashes that showed the list of Videos needed for the particular product, rather then dynamically tring to itemize it thru a Flash ASP.NET cross over?
4) once setup, is this going to be easy to update? Adding new videos or updated instructional videos. Or removing outdated videos for that matter?
5) can we have our videos download to users progressively or would we need to invest in a streaming server to perform this.
6) Is this going to cost affective? Or should we turn back now and seek another method of doing this.
I realise this may seem alot to ask, but as I have said I have researched this for several days now. And for the last two I've tried repeatedly to get in contact with someone from Macromedia's advanced support people but keep getting nobody. My search for instructional sites, videos, or macromedia tutorial help brings up nothing involving something this complex in nature. I hope someone can provide an answer.
View Replies !
View Related
[Flash 8] Help With Loader_Mc An Dynamically Loading Jpgs
Hello, I am trying to dynamically load .jpgs into an Mc, and have this code on the loader clip
Code:
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
function onLoadInit(_mc:MovieClip) {
gotoAndPlay(2);
};
loader.loadClip("img/fan.jpg", _root.jpg_holder);
it works fine but i want to make it so it works for all the .jpgs i am trying to load not just "img/fan.jpg". is there someway to do this easily? i´m sure there´s a simple solution but just has´nt hit me yet.
cheers if you can help.
mike
View Replies !
View Related
FLASH 8 - Preloader For Dynamically Loading Images
So I have a current flash file that has external swf's loading into a "container" clip. Inside those swf's are dynamically loading jpegs. All of this is working really smoothly except for the problem that the jpegs are a little bit too big(kb) and take a while to load. So you press a button and wait for a while then the image pops up. So what I want to do is use the preloader I created for my swfs --the link the preloader I am using is here--->>http://www.actionscript.org/resource...der/Page1.html
Is there any way to add the same preloader to my dynamically loading images?? Here is the code I have for my dynamically loading images, *Thanks to Stringy
myarray = [];
btnarray = [];
var count = 0;
var p = mc1.mc.createEmptyMovieClip("p", 1);
var q = mc2.mc.createEmptyMovieClip("p", 1);
mc = mc1;
oldmc = mc2;
//you would get this from xml -easy peasy
for (var i = 1; i<7; i++) {
myarray.push("http://www.myserverhere.com/p"+i+".png");
this["btn"+i].ivar = i-1;
this["btn"+i].onPress = presto;
btn1.onPress()
btnarray.push(this["btn"+i]);
}
function checkload() {
dis(false)
onEnterFrame = function () {
if (mc.mc.p._width) {
mc.swapDepths(oldmc);
mc.gotoAndPlay(2);
delete this.onEnterFrame;
oldmc.onEnterFrame = fade
}
};
}
function fade(){
if(this._alpha>0){
this._alpha -=25
}else{
this._alpha = 0
delete this.onEnterFrame
var myvar = mc;
mc = oldmc;
oldmc = myvar;
dis(true)
}
}
function f() {
mc._alpha = 100
mc.mc.p.loadMovie(myarray[count]);
checkload();
count++;
count %= myarray.length;
}
function presto() {
count = this.ivar;
f();
}
function dis(v){
for (var i = 0; i<btnarray.length; i++) {
btnarray[i].enabled =v
}
}
Thanks,
--M
View Replies !
View Related
Loading Dynamically Generated Xml File Into Flash HELP
Hi Im trying to load a dynamically generated xml file into Flash. The problem I have is that the number in the URL for the xml is dynamically created ie) 1, 2 etc. So is there a way to load a variable into URL so that number can be accessed externally?
HTML Code:
var wPath:String = new String();
wPath = "admin/content/bubble/1/bubbles.xml";
var xmlBubbles:XML = new XML(); // Create a new XML object.
xmlBubbles.ignoreWhite = true; // Set the ignoreWhite property to true (default value is false).
var checkProgress = function(xmlObj:XML) {
var bytesLoaded:Number = xmlObj.getBytesLoaded();
var bytesTotal:Number = xmlObj.getBytesTotal();
var percentLoaded:Number = Math.floor((bytesLoaded/bytesTotal)*100);
clpLoading.txtPercent.text = percentLoaded + '%';
}
// After loading is complete, trace the XML object.
xmlBubbles.onLoad = function(success) {
clearInterval(intervalID);
//trace(xmlBubbles);
play();
};
xmlBubbles.load(wPath); // Load the XML into the xmlNews object.
var intervalID:Number = setInterval(checkProgress, 100, xmlBubbles);
stop();
Thanks
View Replies !
View Related
Need Strategy For Dynamically Loading Html From FLASH
hi all,
i have a small web project consisting of a home page w/ an embedded FLASH nav menu and a paragraph or two of content below. when a button is clicked i would like to have the content change (instead of loading another page to avoid the page reloading & starting the FLASH movie from the beginning as it has a looped bg).
the person i'm doing this for prefers that the whole site not be FLASH - can anyone give me a few clues on how to accomplish this? (i'm a php newbie but am willing to dig thru some tutorials if this is the best method, or can this be accomplished w/ javascript?)
of course any code snippets or URL's for tutorials will get you a big cyber hug.
thanks . . .
View Replies !
View Related
Slow Loading Graphics (dynamic)
Hey everyone, I am building a gallery. The gallery is loading jpgs
dynamically. It's pretty straight forward- you click on a thumbnail
and it loads the jpg into a movie clip (load graphic behavior). Everything
seems to work fine but it is loading the graphics slooowww. It usually
takes about 15 seconds for each images to "pop up". The jpgs are not
very big (72 dpi, 4x5 inches).
How can I fix this? Would building a simple preloader help things?
I have never built a preloader before so I don't know much about
it- but I am guessing that "pre loading" would be a good thing in
my case. How about knocking down the resolution of each of these
images a bit? Would that speed things up?
You can view the site (in progress) at www.heldstudio.com
I am using the newest version of Flash MX
Thank you for your help!
View Replies !
View Related
Tracking Graphics Loading Proccess
Hello,
My application is loading graphics with the Loader class.
Each Loader graphic is added to one Sprite, which I want to add to the stage's display list only after the loading proccess is complete.
I'd be glad to hear some ideas about tracking the loading proccess, until now I couldn't find anything ellegant.
Thanks in advance,
Me.
View Replies !
View Related
Delayed Loading Of Large Graphics
I building a Flash site that has a main page and a portfolio page. I want the main page (which is simple) to load first and be visible and interactive to the user right aways. After the main page is available to the user, then I want flash to load in the large graphics (which takes some time) into the portfolio page.
What is the best way to do this?
View Replies !
View Related
Flicker When Dynamically Loading Chart Component In Flash MX
Hi
I am using a database to load values into the charting components in Flash MX. The code loads the variables from an asp file and modifies an existing instance of a chart. This is working fine. But the chart instance appears briefly with no values loaded, disappears and appears again with the values loaded. It looks like a flicker and it's a bit distracting.
I've tried to set the _visible property of the instance to false and then make it reappear after the values are loaded. I've also tried to change the _x value of the instance so the chart doesn't appear until after it's loaded. Neither of these things work.
I thought I might be able to create the component in actionscript but have had no luck. I read somewhere that they can be created something like:
ThisBarChart = new BarChart();
but I can't get that to work either.
If anyone can suggest anything to fix this problem, I'd be very grateful.
Thanks in advance!
Sas
View Replies !
View Related
Loading External Variables Dynamically, With Flash Detecting Variable Changes?
I'm trying to make a flash file which starts loading and playing a movie when an external variable is changed. So far I have come to this solution, but it doesn't work in IE, only Firefox.
Sorry about some of the norwegian variable names...
Code:
extVariabler = new LoadVars();
extVariabler.onLoad = function() {
tekstBoks.text = this.myVariable;
};
//Ready to start loading first time:
startVarSjekk = true;
//Every 1 second see if the variable file is ready loaded,
//and load it again if it is:
intervallSek = setInterval(sjekkVar, 1000);
function sjekkVar() {
if (startVarSjekk == true) {
startVarSjekk = false;
extVariabler.load("variabler.txt");
antallSjekk++;
trace("Variables are loading...");
} else if (extVariabler.loaded) {
startVarSjekk = true;
trace("Variables loaded!");
}
}
The problem here is that IE puts my variable file in its temporary internet files. So even if the AC is set to load the variables several times, IE just uses its temp file.
What I want is to make changes on the server and se the result happen client side in a flash file without reloading the browser.
View Replies !
View Related
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
View Replies !
View Related
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
View Replies !
View Related
Loading Dynamic Textbox While Dynamically Loading Movie
Hi All,
So, I've got a movie on the stage (but offstage) called: Card. Inside this MC is a dynamic textbox called: CardName. I'm using a for loop to create a column of cards w/ their corresponding textboxes.
Here's the code:
for (var j = 1; j<=6; ++j)
{
var name = "Card_"+j;
var y = (j-1)*game.spacingY + game.originY;
game.path.attachMovie("Card", name, ++game.depth);
game.path[name]._x = x;
game.path[name]._y = y;
game.path[name]._width = game.cardSizeX;
game.path[name]._height = game.cardSizeY;
game.path[name].CardName.text = "card #" + j;
}
The cards and the textboxes inside the card MCs load fine but the actual textboxes don't change from the default text I've hard-coded in. How can I reach the dynamic textbox inside the card Movie Clip to manipulate the text.
Thanks.
View Replies !
View Related
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.
View Replies !
View Related
Dynamically Loading MP3 ... Loading Details In Text Box ...
Hi, I am loading an MP3 dynamically in Flash ... but am having problems get'n the bytesLoaded to show in my text box. I've tried changing it round heaps ... pullin apart others ... what's the trick?
I'm an intermediate user and have double checked all the basic's ...
What am I missing?
wanna see me coding? Here:
Code:
mySounda = new Sound();
mySounda.loadSound("Track2.mp3",false);
loadBytes = Math.round(mySounda.getBytesLoaded()/ 1024);
loadTotal = Math.round(mySounda.getBytesTotal()/ 1024);
percent = Math.round((loadBytes / loadTotal)* 100);
textd = percent + "% Loaded";
mySounda.onLoad = function(success){
mySounda.start(0,1);
textd = mySounda.id3.TIT2;
playing=true;
}
And all I get in the text box is: "100% Loaded"
Even when I do a streaming view.
Anyone?
View Replies !
View Related
Loading Dynamic Textbox While Dynamically Loading
Hi All,
So, I've got a movie on the stage (but offstage) called: Card. Inside this MC is a dynamic textbox called: CardName. I'm using a for loop to create a column of cards w/ their corresponding textboxes.
Here's the code:
for (var j = 1; j<=6; ++j)
{
var name = "Card_"+j;
var y = (j-1)*game.spacingY + game.originY;
game.path.attachMovie("Card", name, ++game.depth);
game.path[name]._x = x;
game.path[name]._y = y;
game.path[name]._width = game.cardSizeX;
game.path[name]._height = game.cardSizeY;
game.path[name].CardName.text = "card #" + j;
}
The cards and the textboxes inside the card MCs load fine but the actual textboxes don't change from the default text I've hard-coded in. How can I reach the dynamic textbox inside the card Movie Clip to manipulate the text.
Thanks.
View Replies !
View Related
External Content Loader With Multiple Content Types (trouble Loading Graphics)
Hey all!
I am yet another new project. Our flash designer here isn't a big AS guy, and asked me to write a reusable class so that he can load a variety of content types using minimal amount of code on his part. It's also going to be the main component piece in a larger external content player once I'm done with the class itself, so I am making the loading functions into public methods of the loader object than can be called from a button, etc.
I have the code for the text and html parts working (although I can't get stage.width and stage.height to work in the class or from the frame).
The problem I have is that I can't get the graphics content to load (the swf/pic content). Could you please check my code and tell me what I'm missing? I'm sure it's something simple, like it always is.
thanks a million!
-Fish
-----------------------------
ActionScript Code:
package
{
/**
* External Multimedia Loader Class
* @author $(DefaultUser)
* Add new MultiLoader object and insert media type (all lowercase) and object path to control initial loaded object
* To load a new object, call the MultiLoader.load* methods (loadText, loadPic, loadSwf, or loadHtml as appropriate), passing the path to the external file.
*/
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;
public class MultiLoader extends MovieClip
{
private var media:String;
private var path:String;
public var textObj:TextField = new TextField;
public var picObj:MovieClip = new MovieClip;
public var swfObj:MovieClip = new MovieClip;
public var htmlObj:TextField = new TextField;
private var objLoader:Loader = new Loader();
private var objType:String;
private var textLoader:URLLoader = new URLLoader();
public function MultiLoader(mediaType:String,objPath:String)
{
media = mediaType;
path = objPath;
if (media == "text" || media == "TEXT" || media == "Text")
{
loadText(objPath);
}
else if (media == "pic" || media == "PIC" || media == "Pic")
{
loadPic(objPath);
}
else if (media == "swf" || media == "SWF" || media == "Swf")
{
loadSwf(objPath);
}
else if (media == "html" || media == "HTML" || media == "Html")
{
loadHtml(objPath);
}
else
{
trace("ERROR: Media type not supported. Media type must be 'text', 'pic', 'swf', or 'html'.");
}
}
public function loadText(txtPath):void
{
objType = "text";
if (this.numChildren > 0)
{
this.removeAllChildren();
}
this.addChild(textObj);
this.textLoader.load(new URLRequest(txtPath));
this.textObj.wordWrap = true;
this.textObj.multiline = true;
this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
//this.textObj.width = this.width;
//this.textObj.height = this.height;
}
public function loadPic(picPath):void
{
trace("loadPic started");
objType = "pic";
if (this.numChildren > 0)
{
this.removeAllChildren();
}
this.addChild(picObj);
this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
this.objLoader.load(new URLRequest(picPath));
trace("loadPic completed");
}
public function loadSwf(swfPath):void
{
trace("loadSwf started");
objType = "swf";
if (this.numChildren > 0)
{
this.removeAllChildren();
}
this.addChild(swfObj);
this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
this.objLoader.load(new URLRequest(swfPath));
trace("loadSwf completed");
}
public function loadHtml(htmlPath):void
{
objType = "html";
if (this.numChildren > 0)
{
this.removeAllChildren();
}
this.addChild(htmlObj);
this.textLoader.load(new URLRequest(htmlPath));
this.htmlObj.wordWrap = true;
this.htmlObj.multiline = true;
this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
}
private function removeAllChildren():void
{
if (objType == "pic")
{
this.picObj.removeChild(objLoader);
}
else if (objType== "swf")
{
this.swfObj.removeChild(objLoader);
}
else
{
trace("objType != 'pic' or 'swf.' objType = '" + objType + "'.");
}
while ( this.numChildren > 0 )
{
this.removeChildAt(0);
}
}
private function addObjLoader(event:Event):void
{
trace("addObjLoader started");
if (objType == "pic")
{
trace("trying to load pic");
this.picObj.addChild(this.objLoader);
this.picObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
}
else if (objType== "swf")
{
trace("trying to load swf");
this.swfObj.addChild(this.objLoader);
this.swfObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
}
else
{
trace("ERROR: Cannot add object loader. The 'objType' variable does not contain correct media type. The function 'addObjLoader' should only be called when objType is 'pic' or 'swf'. In this case, objType is '" + objType + "' .");
}
trace("addObjLoader completed");
}
private function addTextContent(event:Event):void
{
if (objType == "text")
{
this.textObj.text = event.target.data as String;
this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
}
else if (objType == "html")
{
this.htmlObj.htmlText = event.target.data as String;
this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
}
else
{
trace("ERROR: Cannot add text content. The 'objType' variable does not contain correct media type. The function 'addTextContent' should only be called when objType is 'text' or 'html'. In this case, objType is '" + objType + "' .");
}
}
}
}
View Replies !
View Related
Graphics In Flash?
Well ive being messin' around in flash on and off for a while and the one thing that has kept me down is graphics. Like right now I need a regular old red heart for my movie im making and I have no idea how to get one. I have freehand and think I would be best off using that but I dont know how I should go about creating graphics for flash. any ideas on where to start would be greatly appreciated. Thank you!
View Replies !
View Related
Graphics And Flash
I'am learning flash but I'm not good and graphics for the site. I can put the site together but my graphics look bad. So does anyone have an idea for getting or doing good graphics. Thank you.
View Replies !
View Related
Flash Graphics.
When ever i import or open an image and then test the movie with it the image is all pixelated.
However if you test the movie when there is only one frame init the image looks the way it should, but once you increase the amount of frames in the movie it becomes pixelated again.
Can anyone help me with this problem, cheers
View Replies !
View Related
|