Preloading Loadmovie Content Into Respective Frames...
Hi Everybody,
Once again I'm wondering if I can ask for everyones help and precious time. I'm working with a multi frame(at the moment 2 but soon to be more) movie, that has to take all of its data from xml. I can import the xml, but I'm trying to figure out how I can get the images loaded prior to getting to their frames. When I try to do a loadMovie to incorporate them onto their movie clips, it just isn't happening.
Any tips on how I can set something like this up?
Regards,
Plasnid
<as>stop();
offFrame = new XML();
offFrame.ignoreWhite = true;
offFrame.load("fram.xml");
offFrame.onLoad = function() {
_root.firstPic = offFrame.childNodes[0].childNodes[0].attributes.image;
_root.secondPic = offFrame.childNodes[0].childNodes[1].attributes.image;
_root.secondPic = offFrame.childNodes[0].childNodes[2].attributes.image;
loadMovie(_root.firstPic, _root.hld1);
loadMovie(_root.secondPic, _root.hld2);
loadMovie(_root.thirdPic, _root.hld3);
};</as>
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-28-2004, 10:24 AM
View Complete Forum Thread with Replies
Sponsored Links:
Preloading Content
I've created an animation that I originally split into 2 separate movies. I wanted to preload the second movie in order to get a smooth transition from the 1st to the 2nd.
I was referred to a tutorial on Actionscript.org. It did help, but it had more to do with creating a preloader progress bar.
Since the tutorial showed how to preload content from another scene, I combined my 2 movies into one, with 2 scenes.
It seems as if both scenes are loaded at the same time. How do I make just the 1st scene load and play, then cause the content from the 2nd scene to load near the end of the 1st scene and play when it ends? Thanks!
View Replies !
View Related
Preloading Content
hi.
i have this code on an empty movieclip that loads the external swf.
ActionScript Code:
onClipEvent (enterFrame) { if (!loaded && this._url != _root._url) { if (this.getBytesLoaded() == this.getBytesTotal()) { loaded = true; gotoAndStop(39); } }}
frame 38 has the empty movieclip hidden by another movieclip saying loading.
frame 39 is where the loading movieclip disapeers.
but its not working.
any help would be breat
thanks.
View Replies !
View Related
Preloading Content
Hi. Im having trouble a problem with my
flash movie. I didnt notice it was a problem
until I uploaded it to the web. Heres the problem:
I have dynamic text, .jpg's, and .swf's loading
into different parts of my movie. The file size of
them is fairly small, but I notice that they are
still taking a few seconds to show, so what
I want to do is make the movie pause until the
text, .jpg's, and swf's are fully loaded. I want to
have 'loading' text showing so the user knows that
the content is loading.
I found this tutorial on the site
'Preloader and Transition for Dynamic Files'
but I am a little confused by it. I cant relate it
to my project because I am trying load more
than just one object on a frame.
I also dont need any fancy transition that this
tutorial uses. Just plain and simple.
Can someone please help me. Thank you
Brown
View Replies !
View Related
Preloading Content
hi.
i have this code on an empty movieclip that loads the external swf.
ActionScript Code:
onClipEvent (enterFrame) { if (!loaded && this._url != _root._url) { if (this.getBytesLoaded() == this.getBytesTotal()) { loaded = true; gotoAndStop(39); } }}
frame 38 has the empty movieclip hidden by another movieclip saying loading.
frame 39 is where the loading movieclip disapeers.
but its not working.
any help would be breat
thanks.
View Replies !
View Related
Preloading Certain Frames
Hi
anyone know a way or a tutorial on preloading parts of multiple scences.
Say I want the first 150 frames in both scences of my movie. I want to then be able to preload the remaining frames when that section is chosen.
Flash is fairly new to me and some advice would be much appreciated
cheers
Jim
View Replies !
View Related
Preloading Dynamic Content
Ok I have figured how to use the loadMovie() method to load jpgs into my flash animations and have figured out how to show the progress but the thing is sometimes it would seem that they have not preloaded correctly and they do not display. Does anyone know why this would be?
Here is a link to a page with the flash file
http://fast-cars.net/thecars/page/flash.php?id=79
View Replies !
View Related
Preloading Bar For A Dynamic Content
Flashers i need a preloading bar for a dynamic content like thus code below.
onClipEvent (load)
{
startVarLoad = false;
}
onClipEvent (enterFrame)
{
if (_root._totalframes > 1)
{
perc = _root.getBytesLoaded() / _root.getBytesTotal();
_root.bars = "";
var i = 0;
while (i < Math.ceil(perc * 20))
{
_root.bars = _root.bars + "|";
i++;
} // end while
if (perc < 0.300000)
{
_root.what = "LOADING ARTWORK";
}
else if (perc < 0.600000)
{
_root.what = "LOADING PICS";
}
else if (perc < 0.900000)
{
_root.what = "LOADING SOUNDS";
}
else if (perc < 1)
{
_root.what = "FINISHING...";
}
else if (_root.mcRays._xScale >= 75)
{
if (startVarLoad)
{
loadMovie("gallery/gallery.txt", _root);
startVarLoad = true;
}
else if (_root.loaded)
{
_root.gotoAndPlay(2);
} // end if
}
else if (startVarLoad)
{
loadMovie("gallery/gallery.txt", _root);
startVarLoad = true;
} // end if
_root.what = "";
_root.bars = "";
} // end if
}
View Replies !
View Related
Preloading Cerain Content Only
Hi everyone, I'm sure this is a simple question for you all...
I'm designing a Flash site for a photographer so I only want the basic navigation and interface elements of the site to load up initially. I then want to be able to preload each photograph individually as it is selected.
I'm quite new to actionscripting but I'm familiar with making advanced preloaders... What I can't figure out is the code required to only load up certain elements of the movie thereby preventing a very long initial download time.
Thanks in advance for your help!
View Replies !
View Related
Preloading Dynamic Content-is It Possible?
Hey all;
Wondering about preloading dynamic content and how possible it is. I read thru the preloader sticky at the top of the page, but didn't see much in the way of dynamic content control.
What I'm wondering is if I'm loading jpgs and text on the fly via xml data, is it possible to have a preloader that will wait until all the jpgs and text have loaded?
The preloader I'm using now, only seems to preload content that is in the swf when it is called.
I have a 5 frame MC with the xml load on frame one along with the preloader:
Code:
onClipEvent (enterFrame){
bytesLoaded = Math.ceil((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
gotoAndStop (bytesLoaded);
if (bytesLoaded >= 100){
_parent.gotoAndPlay("start");
}
}
Frame 5 is the "start" frame, and contains the content, and the AS that creates the dynamic mcs that hold the files called by the xml file.
Any help in setting up a preloader for this is appreciated. Thanks.
View Replies !
View Related
Preloading External Content.
I'd like to preload an external .swf
I'm using Flash MX 2004.
Here's a bit more organic description of what's going on...
Hello, I'm currently working on creating a PreLoader in Flash MX 2004.
I've actually done a fair job of creating it, but I seek council.
Due to the design and the complexity of the site, the preloader will be a seperate .swf from the main website .swf
Can anyone advise me on a way to get my preloader.swf to pre-load the external website.swf?
thanks a bunch!
View Replies !
View Related
Preloading Dynamic Content
Hi!
Just wanted to know if it's possible to put a preloader on textfield/movieclip reading text from a textfile...
I guess it's not the same as preloading a regular movieclip, text being dynamic and all...
View Replies !
View Related
Preloading Dynamic Content
Hey all,
I'm loading a dynamic swf and inside this dynamic swf are images and text that are also loaded dynamically. My problem is the swf is being preloaded but without preloading the dynamic images and text. My question is, how do a I preload the images and text before or during the initial preload of the swf?
View Replies !
View Related
Preloading External Content
hello, i have two questions, but i think the answer is the similar for both:
i am trying to get external content to preload before an action is triggered. i am calling in an external .jpg into a movie clip. the timeline is stopped, but i want it to play after the jpg is loaded into the clip. the code as i have it now will start playing before the picture is loaded. is there some command for this?
also is there a way to start loading content into memory before it is triggered. i have a movie with about 10 sequences of images. the user triggers these sequences with buttons, resulting in each sequence loading only when clicked. i want to start loading these external swf files into memory so that but the time the user clicks on the button with the loadMovie() command, the swf is already loaded in memory. thanks, and help would be greatly appreciate.
here is the code from the picture loader:
code:
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.round(Math.random()*(max-min))+min;
return randomNum;
}
_root.imageToLoad = randRange(1, 5);
startMovie = function () {
play();
imageHolder.loadMovie(_root.imageToLoad+".jpg");
};
stop();
picture.onLoad = startMovie();
View Replies !
View Related
Preloading Dynamic Content
Ok the thread title is a bit confusing, so i'lll clarify.. :P
I have a main page, with buttons, when people press on a button, it sets variables to be used in an external movie (loader.swf) that will then use those variables to display the correct content, which is a picture gallery.
my button AS looks like this:
Code:
on (press){
_root.title="testing"
_root.desc="desc"
_root.url1="images/1.jpg"
_root.url2="images/2.jpg"
}
on (release){
loadMovieNum("loader.swf",1);
}
Those variables are then used in Loader to load the content. The hic here is that i want to be able to preload the content that will be displayed (the images), how can I do that? The traditional preloading method won't work since the images won't be in the movie yet when the preload begins.
any help or guidance would be greatly appreciated.
thank you
View Replies !
View Related
Preloading Future Content
I'm updating a flash movie that I didn't create, it's built with scenes and totally ass backwards. I'm redoing it so each scene is a seperate swf that is loaded into the "player". The only problem is (and the only good thing about the way it's built now) that because of the streaming nature of Flash the other scenes are being loaded in the background while scene 1 is playing so you don't see any preloading happening in the movie the way it's built now.
So my question is, is it possible to tell Flash to load a swf before you want it to start displaying? In essence I want it to preload scene1, then while that scene is playing start loading scene2, and so on.
View Replies !
View Related
Preloading XML Or PHP Content (Using Streams?)
I've been following the GoToAndLearn tutorials for importing PHP files as XML files aswell as for the advanced Flash preloader. But I hit a problem when I combine the two
Even after I've done as explained to set the component data to load in frame two, it still does not preload the data I'm importing from the PHP file.
It completes the preloading then will hang for ten or 15 seconds while it imports the PHP data.
Whenever I check this out by simulating a download in the "test movie" it shows that when it gets to frame 3 where it is meant to download this, there is a new field available relating to the file called streams which shows how much of the stream relating to my php file is downloaded.
How would I go about incorporating the data from this streams field into my preloader?
View Replies !
View Related
Preloading XML Or PHP Content (Using Streams?)
I've been following the GoToAndLearn tutorials for importing PHP files as XML files aswell as for the advanced Flash preloader. But I hit a problem when I combine the two
After I've done as explained to set the component data to load in frame two, it still does not preload the data I'm importing from the PHP file.
It completes the preloading then will hang for ten or 15 seconds while it imports the PHP data.
Whenever I check this out by simulating a download in the "test movie" it shows that when it gets to frame 3 where it is meant to download this, there is a new field available relating to the file called streams which shows how much of the stream relating to my php file is downloaded.
How would I go about incorporating the data from this streams field into my preloader?
View Replies !
View Related
Preloading Dynamic Content
This is a bit of a tough one i have found out recently. I did a popular flash tutorial and created a carousel that has an xml file with it that displays images and text etc..
now the problem i am having is adding a preloader to the thing.... i hvae tried and tried and tried and was told that a preloader cannot be added to dynamic content...
i have attached the file. please please please help.
thanks and i hope you have better luck that i have!
View Replies !
View Related
Preloading Dynamic Content
Hi!
Just wanted to know if it's possible to put a preloader on textfield/movieclip reading text from a textfile...
I guess it's not the same as preloading a regular movieclip, text being dynamic and all...
View Replies !
View Related
Preloading Dynamic Content
Hi!
Just wanted to know if it's possible to put a preloader on textfield/movieclip reading text from a textfile...
I guess it's not the same as preloading a regular movieclip, text being dynamic and all...
View Replies !
View Related
Trouble With Preloading Xml Content
hej peeps,
after working my way through some tutorials and searching on the forum,
i still have a question concerning preloading some xml content.
i'm trying to copy a movieclip called "containerMC" based on the data in my xml file.
the "containerMC" contains a movieclip (instance name "image") in which i load a picture using this script.
the script is placed on frame1 of the mainstage.
PHP Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success) {
mainNode = this.firstChild;
if (success) {
for (i=0; i<mainNode.childNodes.length; i++) {
theClip=_root.attachMovie"containerMC", "containerMC"+i, i);
theClip._x = theClip._y = 0;
theClip._y += 350*i;
theClip.image.loadMovie(mainNode.childNodes[i].childNodes[0].firstChild.nodeValue);
theClip.textClip.textContainer.text = mainNode.childNodes[i].childNodes[1].firstChild.nodeValue;
};
};
};
myXML.load("images1.xml");
this works just fine .. but i want every image to be preloaded seperately
(i hope this makes sense).
i figured that i have to create a preloader movieclip inside the "containerMC"
only i'm at a loss where i put the code for my preloader ... and which code to use.
i hope someone can help me out or point me in the right direction,
thnx in advance,
odin
View Replies !
View Related
Preloading External Swf Containing Xml Content
Hey There,
I'm having a problem preloading xml loaded content. I'm using the usual this.getbytesloaded at the start of my timeline. The problem is this is getting the total bytes for the container swf before the xml has loaded up all the images and content so my preloader is running short.
Any help would be greatly appreciated
View Replies !
View Related
Preloading XML Content (images)
I'm having some trouble getting my preload function to work. Any ideas?
XML
Code:
<storyGroup>
<story id="1">
<storyTitle>Grafisk designer</storyTitle>
<image url="http://www.gustavjonsson.com/_temp/anette.png" />
<quote by="Anette Ringstad, Grafisk design">
<![CDATA[Lorem ipsum dolor sit amet liram diram norum.]]>
</quote>
</storyGroup>
Actionscript
Code:
function setupStory(storyXML, id) {
var storyMC:MovieClip = _root.storyPLC.attachMovie("story", "story"+id, _root.storyPLC.getNextHighestDepth());
storyMC._visible = false;
storyMC.stop();
// image
storyMC.image.loadMovie(storyXML.image.attributes.url);
// quote
storyMC.quote = storyXML.quote.getValue();
storyMC.quoteby = storyXML.quote.attributes.by;
// preload the ****
storyMC.preloaded = false;
storyMC.image.onEnterFrame = function(){
var todo:Number = this.getBytesTotal();
var done:Number = this.getBytesLoaded();
if(todo == done){
trace("Image PPRELOADED");
storyMC.preloaded = true;
_root.preloadText.easeTo("", "", 5, 100);
delete this.onEnterFrame;
} else {
if(todo){
trace("Image " + String(Math.round(100 / todo * done)) + "%");
}
}
}
return storyMC;
}
View Replies !
View Related
Preloading Dynamic Content
Hi!
Just wanted to know if it's possible to put a preloader on textfield/movieclip reading text from a textfile...
I guess it's not the same as preloading a regular movieclip, text being dynamic and all...
View Replies !
View Related
Preloading XML Content (thumbnails)
Hi everyone,
It is my first time posting here and I have a question.
I usually find the answer myself but I have searched and found nothing so maybe some of you guys can help me.
I have an XML document with links to thumbnails and bigger picture (basic gallery), I have setup my flash file in a way that every thumbnail becomes a button which loads the bigger picture in a loader MC using loadClip and listeners. All that is fine.
Here is a link to it(the swf is suppose to be inside another flash so thats why its full size, i didnt make an HTML page for it)
Take a good look a t what it is doing because its a loading issue and probably wont happen again if its in your browser's cache
http://www.ferragiacomo.com/collections/wc2007spring/wc2007spring.swf
The problem: Basically I want to make a loading for all the thumbnails, now its doing the action for everyone of them.
Here is the code of my AS for the XML:
Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
spacing = 0;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
xmlLoader.loadClip(this.picHolder.attributes.thmb,this.thumbLoader);
xmlListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
xmlBar.xmlBarLoader._width = Math.round(bytesLoaded/bytesTotal*200);
}
xmlListener.onLoadComplete = function(){
xmlMask.play()
xmlBar.play()
}
this.thumbHolder.description = this.picHolder.attributes.description;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.h = this.picHolder.attributes.h;
this.wt = this.picHolder.attributes.wt;
this.thumbHolder._x = spacing;
spacing += Number(this.wt)+15
this.thumbHolder.onRelease = function() {
mcLoader.loadClip(this.main,loader);
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
loadBar._visible = true;
loadBar.barLoader._width = Math.round(bytesLoaded/bytesTotal*200);
}
listener.onLoadComplete = function(){
loadBar._visible=false;
}
loader._y = 72 + (395 - this.h);
description.text = "Model : " + this.description;
};
};
}
myPhoto.load("xmlphoto.xml");
as you can see I'm using loadClip and listeners aswell for the thumbnail part but I trying to figure out how to do this so maybe using loadClip ising the best way or maybe I am not listening to the right MC.
Thank you for any help
View Replies !
View Related
Preloading XML Or PHP Content (Using Streams?)
I've been following the GoToAndLearn tutorials for importing PHP files as XML files aswell as for the advanced Flash preloader. But I hit a problem when I combine the two
After I've done as explained to set the component data to load in frame two, it still does not preload the data I'm importing from the PHP file.
It completes the preloading then will hang for ten or 15 seconds while it imports the PHP data.
Whenever I check this out by simulating a download in the "test movie" it shows that when it gets to frame 3 where it is meant to download this, there is a new field available relating to the file called streams which shows how much of the stream relating to my php file is downloaded.
How would I go about incorporating the data from this streams field into my preloader?
View Replies !
View Related
Using Frames For Flash Content
I have to say I don't like frames at all, but I want to do the following and I'm not sure how to achieve it....
I have an XHTML site which I want music playing on continuously. The front page has a Flash jukebox on it, but subsequent pages obviously reload the Flash movie, restarting the song. The Flash movie currently sits on top of another picture (using a transparent wmode).
Does anyone have any idea how to get this movie on every page without it reloading? Alternatively, is there an ActionScript trick to sort this out?
Cheers,
Andy
View Replies !
View Related
Preloading Specific Frames
Hey guys, I'm in quite a pickle... I am creating a game, and currently working with a preloader... the deal is, and i have noticed this being used in some games, what i want to do is ahve a preloader at the beginning of the swf, that loads the first few frames that deal with the intro and menu, and then once i press play in the menu - to begin acutally playing the game itself, i want another preloader to deal with loading up the resourcs needed for game iteslf - aka the frames that come after the menu and intro....
if anyone can help me out or point me in the direction of a tutorial, that would be great,
Cheers,
AV
View Replies !
View Related
Preloading Content Of Window UI Component
Hi all,
Im having trouble in preloading the content of each of my window component.
I have three different window UI component, and each of these have its corresponding movie clip which were use with a linkage for exporting this in ActionScript (for the purpose of dynamically loading).
Here's what I have done:
Window UI components
window1
window2
window3
movie clip which has linkage property
mc1
mc2
mc3
On my main timeline, I have different layers for the different window UI component (in frame one) since at frame one the three window UI component is visible, I put on the three contentPath for each of the window UI component. By the way I use the property window do to this and not encoding this in the frame itself.
So my question now is where should I put my preloader? Can I put a preloader on each of the three linkage movie clips? Or should I put the preloader on my main timeline? Do it matter to preload early since I use the contentPath property and not hard coding it inside the frame?
What would be the recommendation solution for this?
Thanks for your help.
Regards,
AmCasperForU
View Replies !
View Related
Preloading External Content Loaded Through Xml
I want to preload an external swf which loads a large image through xml. I can do this successfully when the image is already contained within the external swf but because its loaded via xml the preloader doesn't return the correct amount of bytesTotal.
Any tutorials around for this any suggestions?
View Replies !
View Related
Preloading Content Of Window UI Component
Hi all,
Im having trouble in preloading the content of each of my window component.
I have three different window UI component, and each of these have its corresponding movie clip which were use with a linkage for exporting this in ActionScript (for the purpose of dynamically loading).
Here's what I have done:
Window UI components
window1
window2
window3
movie clip which has linkage property
mc1
mc2
mc3
On my main timeline, I have different layers for the different window UI component (in frame one) since at frame one the three window UI component is visible, I put on the three contentPath for each of the window UI component. By the way I use the property window do to this and not encoding this in the frame itself.
So my question now is where should I put my preloader? Can I put a preloader on each of the three linkage movie clips? Or should I put the preloader on my main timeline? Do it matter to preload early since I use the contentPath property and not hard coding it inside the frame?
What would be the recommendation solution for this?
Thanks for your help.
Regards,
AmCasperForU
View Replies !
View Related
Copying Frames Properties But Not Content?
Ok, I am new with Flash so please excuse my pathetic "Flash Vocab."
I am trying to have a slideshow of photos, one fades in gradually for 20 frames, sits their at 100% opacity for 20 frames, and fades out gradually for 20 frames while another one is fading in. I know how to do this, but I fear I'm doing things way to "manually." Once I have the alpha fade ins and such for one layer/image, is there anyway to apply that to the next image and only have to change the actual image? Right now I'm having to do the entire process for EACH image and it is very time consuming.
Any help, or any links to any articles/tutorials that can help me with this will be greatly appreciated.
Thanks,
Smoolean
View Replies !
View Related
Can You Load Content Into Frames Further On In The Timeline?
Hi there, hope this is the right section for this - just a quick question, hopefully should be easy. Just wondering if it's actually possible to load content to a specific movie clip/component further on in the main timeline? So for example if I have a button on frame 1, and I have a mediaDisplay component sitting on frame 20, can I load an FLV into this? I've tried to do it, but it doesnt seem to work! If I do something like:
Code:
on (release){
disp.setMedia ("test.flv", "FLV");
}
Now, if the mediaDisplay component (which I've given the instance name of "disp") is on the first frame, which contains the button - it works fine - but if it's sitting on frame 20, and then I go to frame 20 (via another button) it hasn't loaded the content. Any thoughts on how/if this can be achieved?
Cheers!
View Replies !
View Related
Help With Preloading Class Files On Different Frames
If you take a look at one of my very first completed client web sites, you will notice that the preloader does not appear until roughly 50% of the movie has loaded. You may only notice this if you are using a dial up 56k connection though.
I know why it is doing that, but can't figure out a way around it.All my class files are being loaded on the first frame, but I have tried changing the frame they are loaded into and it just won't work.My class files will not load correctly if I select any other frame to load them.
Also, anyone on a 56k modem may also notcie that for some reason my thumbnail preloader bars do not seem to work correctly either, but they work PERFECTLY on faster connections.
Any help would be much appreciated.
Kind regards,
Jason
extreme biofusion
View Replies !
View Related
Preloading External .swf's Into Html Frames
I've searched quite a few threads on preloading multiple external .swf's, but most of them realate to loading them for use within a single movie.
My situation is that I need an html page with a preloader for mulitple .swf's, so that when the preloading is complete you will be taken to an html frameset with the loaded movies in various frames. When clicking a button in a flash movie in the top frame it loads an html frame with another .swf into the center frame. It would also be helpful if I could load external .jpg's, too.
I know that the easiest way around this would be to make the entire thing in flash and scrap the frameset, but the client gets what the client wants. The answer may be quite simple, but my child-like mind has yet to grasp it.
Thanks (I'll come up with a clever signature soon)
View Replies !
View Related
Flash Navigation - Html Content And No Frames?
Hi,
I was about to make a website with frames; top frame for flash navigation, music player etc. and bottom layer for html main content. This design is ok, but everybody hates frames (including me) and now I noticed that scrolling the main content looks silly because text is disappearing under the top frame.
What I want is that flash doesn't refresh and stop music playback while browsing the main content. So do you have any alternatives to frames?
I found a interesting suggestion: http://www.kirupa.com/forum/archive/.../t-236383.html
"You might want to look into AJAX. You can call javascript from your flash file with getURL(); and have it change the content in a main container div."
Is it truly possible to change content in a div? That would be a great way to do this. Have anyone tried this or know something about AJAX?
Any ideas would be great at this moment!
Br,
Tabbu
View Replies !
View Related
Print Specific Frames And Dynamic XML Content
Hello, I am trying to print specific frames of my Flash movie with the dynamic text loaded from an XML file. The code below only prints the current frame I am on and does not print the XML text. The dataOK that is commented out is a function I have before that loads the XML content. The XML content is loaded to dynamic text boxes. Any help on this would be greatly appreciated.
Attach Code
function printTut(myevent:MouseEvent):void{
var myPrintJob:PrintJob = new PrintJob();
var mySprite:Sprite = new Sprite();
mySprite.addChild(stage);
mySprite.rotation=90;
//mySprite.addChild(dataOK);
var printok:Boolean = myPrintJob.start();
if (printok==true){
try{
myPrintJob.addPage(mySprite);
} catch (error:Error){
//error message
}
myPrintJob.send();
}
}
print_btn.addEventListener(MouseEvent.CLICK,printTut);
View Replies !
View Related
Browser Frames And Content Layout Question
Hello all.
I have a question regarding browser frames and flash. I want to use flash for a department site I am building. I want to use it for the menu on the left, the header at the top and a scrolling text box on the far right. Now this is posing a few problems I know I need a frameset because the middle frame(between the left and right) is where the non flash content will be presented. Well this wouldne be too much of an issue but the users want a gradient fade from the bottom right to the top left across the site. Well my concern is that if the window is scaled the gradient will get all messed up since it is spanning multiple frames. Any ideas or suggestions? Am I thinking about this is the right way. Please your opinions are wanted and valued. Thanks alot.
View Replies !
View Related
Preloading External Movie With Multiple Frames
help.. i am preloading my external movie into a loader. everything works fine.. i only have 1 problem. all of my other movies that get loaded into the same loader component are only 1 frame long. my gallery is 9 frames long. (the only way i could figure out how to do it.) well when it loads , the progress bar still shows up even after the first frame has loaded..when all the frames are loaded it finally disappears. any help.. heres my code for preloading my external movies.. like i say.. they all load and the progress bar disappears like it's supposed to except for my gallery page which has more frames.. any help or do i need to do seomthing different with my gallery page.........this code is in my main movie...............
//-----------Initialization---------\
extLoader_mc._visible = false;
var currentPage;
stick("da_mc");
//-----------------------------------\
//--------Movie Clip Loader----------\
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
mcLoader.addListener(myListener);
myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
extLoader_mc._visible = true;
var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
if (bytesLoaded >= bytesTotal) {
extLoader_mc._visible = false;
}
}
mcLoader.loadClip("home.swf",myLoader);
//-----------------------------------\
View Replies !
View Related
Preloading Wrapper, Avoid Heavy 1st Frames
Here is a preloading tip, brought to you by JRMillion
As you probably know flash jams a lot of stuff into the first frame of your swf, library items linked for actionscript (unless you specify) and the first frame is also where AS classes are kept.
This can become a problem when you try to setup a preloader. If the first frame makes up the majority of the filesize your preloader wont work well.
Here is something I do to avoid this problem, and prevent me from having to include the preloader in the main site swf.
Create a second swf of the same size as your main one
and on frame one place this code
Code:
siteLoader = new MovieClipLoader();
//Called when swf data starts getting downloaded
siteLoader.onLoadStart = function(target_mc){
target_mc.stop();
}
//called over and over while data is downloading
siteLoader.onLoadProgress = function(target_mc, loadedBytes,totalBytes){
loader.text = Math.ceil((loadedBytes/totalBytes)*100) +'%';
}
//Called when first frame of loaded swf is run
siteLoader.onLoadInit = function(target_mc){
}
//Called when load is Complete, duh :)
siteLoader.onLoadComplete = function(target_mc){
loader._visible = false;
target_mc.play();
}
siteLoader.loadClip("main.swf",1);
stop();
What this does is act as a wrapper, whos only job is to preload your main swf, without having to deal with possible "heavy frames".
It loads your swf into a Level rather than a clip, so you wont run into possible scope and _root referencing issues as you would when loading into a clip.
This assumes you have a dynamic text box called "loader", which the script also hides once the loading is complete.
You could obviously modify this a little bit too work with "cooler" loaders, but I figured id keep the example simple.
View Replies !
View Related
Newbie Question - Help Switching Frames Without Previous Content
Basically what the title says, I know photoshop and illustrator like the back of my hand, but now my web design needs some flash and i really need to start from scratch, ive read the lessons etc. but im having trouble learning how to switch from frame to frame without copying all of the previous content...IE:
pretend this is a text box
frame 1: would have #1
frame 2: would have #2
and so on...
but when ever i get to the last frame lets say 12345
when i go back to the previous frames they all have 12345 very confused, im probably staring the problem right in the face but im overlooking something. thanks for any help in advance
View Replies !
View Related
Frames Issue - IExplorer Blocking Flash Content
I'm working on a simple site that will use a flash menu in a frame to control content in another frame. I found the Flash and Frames tut on this site, but it wasn't much help. (It's good, it just didn't help me.)
When I load the main frameset in AOL or IE, the page containing the flash content doesn't load. When I load just the page with the flash menu, I get a pop-up blocker-like error message informing me that my browser is blocking active content from being displayed that could harm my computer yada yada yada. How can I make this thing load?! I know I could reset the security settings on my browser but what about the other billion net users?
Thanks,
Deb
View Replies !
View Related
Newbie Question - Help Switching Frames Without Previous Content
Basically what the title says, I know photoshop and illustrator like the back of my hand, but now my web design needs some flash and i really need to start from scratch, ive read the lessons etc. but im having trouble learning how to switch from frame to frame without copying all of the previous content...IE:
pretend this is a text box
frame 1: would have #1
frame 2: would have #2
and so on...
but when ever i get to the last frame lets say 12345
when i go back to the previous frames they all have 12345 very confused, im probably staring the problem right in the face but im overlooking something. thanks for any help in advance
View Replies !
View Related
Frames Issue - IExplorer Blocking Flash Content
I'm working on a simple site that will use a flash menu in a frame to control content in another frame. I found the Flash and Frames tut on this site, but it wasn't much help. (It's good, it just didn't help me.)
When I load the main frameset in AOL or IE, the page containing the flash content doesn't load. When I load just the page with the flash menu, I get a pop-up blocker-like error message informing me that my browser is blocking active content from being displayed that could harm my computer yada yada yada. How can I make this thing load?! I know I could reset the security settings on my browser but what about the other billion net users?
Thanks,
Deb
View Replies !
View Related
Preloading Into A Blank MC , If Frames Loaded ,play Timeline
Hi all,
I'm a real newbie when it comes to AS. I really need some help with this one to make my first flash site. I must be missing a small bit of code or something. Here's what i've got.
I have the main movie play an intro until it plays up to where the buttons appear and stops.
Then you click on the "school" button AS:
on (release) {
gotoAndPlay (235);
loadMovie ("school.swf", "_root.schoolSwf");
}
I put a blank stop frame in the school.swf. I don't know if I need to do that or not.
On frame 235 I have a door closing and then a few frames later, a MC plays to act as a preloader until the "school.swf" loads. The AS for this MC:
onClipEvent (enterFrame) {
if (_root.schoolSwf._framesloaded==400) {
_root.schoolSwf.gotoAndPlay("School");
}
}
On the "School" frame I have the doors closing and the blank MC "schoolSwf" should have the school.swf loaded in it ready to play, right?
But it never shows up!!
Please HELP !!
You can see the file here:
http://www.civegas.com/zFlashTesting...2/CiVegas.html
The link for both .fla's are there also.
Thanks in advance,
View Replies !
View Related
|