Please Help - Problem Loading Data On Stage
I’m having trouble displaying my xml data on to my rectangle boxes. What I want to do is create 1 rectangle box (size 285 x 59 pixels). So this box will be duplicated for the other 5 boxes that are needed to be displayed. So there are a total of 6 rectangle boxes. Within these 6 box fields I want to input data from an xml field where flash will then call the xml and read the data (swfs) on to the rectangle boxes where they will be displayed. I attached a few files one in which will show what I want it to look like and the other is the file I’m working with. Appreciate any help. what i want it to look like: File my file: File
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 04-05-2006, 07:25 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Emailing Data From The Stage
I was wondering if there was a way that you can gather data from elements that have been placed on the stage selected by the user. Basically, I have several movie clips on the stage that have been given instance names, within these movie clips are various frames that each have a frame name. The user is given options that display a particular frame from each movie clip. Once these frames have been loaded onto the stage, is there a way to call this data and export it as an email? I was thinking that maybe you can call each movie clip's instance name as well as the frame name within each of those movie cilps that have been loaded onto the stage. Let me know if there is an easy way. Thanks
Saving Data And Loading Data From A .txt File...
Hi,
I know there's a way to do it but i just couldn't get the right tutorial around..
I have read through Shared Objects but i couldn't get it work...
I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...
Anyone here have an example or some source code so i can have reference on it?
Thanks for the help provided....
Regards,
Lacus
[F8] Export Stage Data Into A JPG At Runtime?
My boss wanted me to make this business card generator in flash..
And I mean, I can do that part easy but he wanted it to save the cards at 300DPI so theyre ready to be shipped to print...
So if I'm loading in 72 dpi at say 500pix wide by 236pix or whatever tall, ..
I would press the button, and call the same image in the 300DPI form, enlarge all the text and reposition it automatically...
but is there a way to save that as a JPG? like export whats on the stage to Image format?
I know you can do that through the file menu, but what about AS?
What Data Type Would This Be? & Tracing The Index Of An Object On Stage.
okay i know this is lame, but i tried assigning different data types to it but it gives an error. i just wanna strict data type my stuff
i have a addEventListener(MouseEvent.MOUSE_CLICK, myFunc) added to one of my MovieClips on stage. Everytime id want to refernce that object that as been clicked. i would reference it by "event.target" is that correct?
what data type is "event.target"?
lets say i do
Code:
var target = event.target;
i traced that using
Code:
trace(typeof(target)); // and it returns "object"
however when i try to data type the variable as an object
Code:
var target:Object = event.target;
i get an error..
what i am actaully aiming to do is to get the Index of the object. when i tried
Code:
getChildIndex(event.target);
i get an error... it only works when i did this
Code:
var target = event.target;
trace(getChildIndex(target));
so what datatype is "event.target"?
or is there a better way to get the Index of the Child?
im still a noob at AS3.0 and would like to seek advice.
thank you so much whoever who helps me with this in advance...
and sorry for this stupid question
MC's Within MC's Different Behaviour Betewen AS-loading And Stage Loading?
Sorry about the too long topic title, but it sort of got even more incomprehensible when I made it shorter.
Now, on to the problem:
I've got a movie clip that consists of a few other movie clips. This is to maintain a certain degree of order in the chaos.
I use action script to load the container mc on the stage. Now I want to change some properties of on of the contained mc's, but they seem to be unreachable.
So I did a little testing and I found out that when you just place an instance on the stage, those contained MC's are accesable, you can see in the debugger that the container MC contains other stuff.
But if the MC is loaded with attachMovie(), the debugger does not show that the container has other mc's within it, and therefor I cannot change the properties of those mc's.
Any thoughts about how I can solve this problem?
PS. Of course I can give up this ordering business and just attach multiple movies. Although this circumvents the problem, I would prefer not to do this because:
1. I'd like to stick to the 'certain degree of order'.
2. I wish to learn how this works.
Loading Xml Data - The Rest Of The Movie Is Not Loading
I have a custom FLV player that loads an XML file from our server to get the movie details, then once the data is successfully loaded the swf advances to frame 2 where the player loads the flv and the interface (stop FF, RW, etc.) Problem is that when I load the swf the first time, all of the XML is successfully loaded (I know from trace that all vars are set...), and the swf advances to frame 2 to actually show the movie and controls but it is a blank screen. if you refresh the page that contains the swf, everything loads fine. This has only begun since I added the XML functionality, so I am thinking the XML loading is the reason but I can not for the life of me figure out...
has anyone else experienced a similar problem?
the swf player is only 11k so I know it should be loading fine...
see example below:
http://www.vidrokker.com/viewpage/NzA%3D
Any input is greatly appreciated,
-nathan
example below:
Loading External Swf, Then Loading Data...
I'm kinda new, im switching to flash from Swishmax... Concept is kinda the same but some parts are different...
I have my main swf loading an external swf which is than loading >
loadVariablesNum ("discography.txt",0);
now when I run the external swf by it self , it loads correctly.
But when I run the main swf, and it loads the external swf correctly the data being loaded does not come in at all... Ive pulled it off before on swishmax but on the real flash coding i cant
Loading Swf On Main Stage
I have my menu in a mc. I want it to load a swf into the main stage area. Also I would need it to unload the previous swf everytime a new button is pressed. How owuld I go about doing that.
Loading In A Swf- And The Main Stage
Hello, I have a swf loading into my main movie. In the swf I have movie and at the last key frame I have it tell target / go to frame a and stop. The swf alone works fine, but when I load it into the movie it does not work. I am assuming that / goes to the main movie stage rather then the main stage of the swf. How can I get it to go to the main stage of the swf. thanks in advance- Dave
Loading .swf Movies Into Stage
Hello good day!
I'm using Flash MX 2004 Professional and I'm wondering how can I load several ready made .swf movies so that I can join them together to form a bigger movie clip? I've tried the File - Import to import .swf movies to the stage but when I test the movie, it just won't play. Please help! Thanks
Loading Movie On To Stage
I'm trying to load a movie on to my stage (main) but I am having trouble positioning it where I want it. I've tried the target clip, but I lose some of my animation when I do this (the fuzz in the movie)
I also only have this 250 x 100; kind of like a pan up shot of the woman but it is showing everything; even what is off the stage?????Site
Loading SWF To Main Stage?
I have 3 seperate swf files one is the main movie and the other are a audio file saved as a swf and another is a image with animations. So I want to load the main movie first then load the audio and next the image with animations one right after another but not at the same time. How would I go about doing this best?
Loading A Jpg So It Is Already On Stage When You Go To The Page
I have a image gallery on a page on my site. Presently when you gotoAndPlay ("image gallery"); the page slides on to the screen and the thumbnails fade up, but you have to click a thumbnail before a jpg is loaded, so the page looks like it's coming up blank in the main image area.
Is there a way you can specify a jpeg to be already loaded so that when you go to the page it has an image already there. it doesn't really matter which one it is.
Thanks, in anticipation
Peter
Loading Mc Symbols To Stage
Hi, I have some actionscript that loads a movieclip symbol to the stage and positions it as so.
function DisplayContent() {
var newMovie:intro_info = new intro_info();
newMovie.x = 400;
newMovie.y = 315;
this.addChild(newMovie);
}
DisplayContent();
I would like to set up a button that loads a new mc symbol which will replace the symbol that has already been loaded from the script I have posted above. Can anyone help as I am still very much learning AS3 and my head is starting to hurt
.swf Files Are Not Loading Into The Stage
The way my portfolio is now, is on my homepage link. My plan is to improve it by having the clips load within a blank movie clip, and a button to the left serves to bring the viewer back to the menu.
So the strategy is: the viewer clicks on the button (5 buttons on frame 85, layers 8 through 10). The timeline plays to the last frame, 91 layer 11 to enable a swish effect for the button. The selected .swf plays here.
Here is the button code:
Code:
on(release){
_root.gotoAndPlay(85);
//starting with the first button. we create a screening window -
_root.createEmptyMovieClip(screen, 11);
//some stuff about screen._x and _y to be done later. screen is now the _parent
_parent.attachMovie("dracula.swf", this);
_parent.play();
}
That didn't work. I'm using MX pre-2004 so that might cause some issues. Won't you help a starving Flash dev make his portfolio not suck? I appreciate any help here!
[F8] Loading MC From Library To Stage
Hi,
How do I load an MC I have in my library onto the stage and to a certain spot (x and y coordinates would be provided when loading the MC).
Cheers,
Chris
Stage Height On Loading Swf Into Another
Hi,
I am sure this is a common issue and hopefully there is a solution:
If I load an swf into another swf is there a way of getting the stage height of the child moviclip.
I know the loaded movieclip stage will be the same as the parents (i.e. I know there is only one stage)
So what I need is a way of setting a variable in the child swf when it is published based on the height of the childs stage that can be accessed but will not be changed by the parent.
Does this make sense? I am looking for the most simple solution possible - I am aware I could make transparent MCs and get the height but this means I would have to resize this mc every time I need to adjust the childs stage height.
Any help/ideas appreciated.
pw
Loading A Jpg And Placing It On The Stage Twice
I am trying to import an image and then place the image in two spots on the stage. This is the code I'm using:
ActionScript Code:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadingDone);
var request:URLRequest = new URLRequest("sam.jpg");
loader.load(request);
function loadingDone(event:Event):void {
// get loaded data
var image:Bitmap = Bitmap(event.target.loader.content);
// create new sprite and add bitmap data to it
var newPiece:Sprite = new Sprite();
newPiece.addChild(image);
// add to stage
addChild(newPiece);
var newPiece2:Sprite = new Sprite();
newPiece2.addChild(image);
// add to stage
addChild(newPiece2);
newPiece2.x = 300;
}
My problem is rather than placing two instances of the image on the stage, the code above places one image with an x coordinate of 300 and a y coordinate of 0.
I thought the code above would place two images. One at point (0,0) and the other at point (300,0).
Any thoughts?
AS3 Loading XML And Display On Stage
I haven't done much with AS3 .. just simple Flex stuff, but I have to load
XML from an external URL and discovered this was much easier to get what I
needed with AS3. My problem is the XML loads and I can trace till the cows
come home, but I can't get the code right to display the information on the
stage.
Here is the loading code:
import flash.net.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
import flash.utils.*;
import flash.text.*;
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("externalURLremoved"));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseWeather(xmlData);
}
function ParseWeather(weatherInput:XML):void {
trace("XML Output");
trace("------------------------");
var weatherChildren:XMLList = weatherInput.cc.children();
for each (var info:XML in weatherChildren) {
trace(info);
}
}
All the data displays in the output window perfectly. But I need to display
values from the XML on the stage. With AS2, I would have used the variable
box in the property inspector, but of course, this doesn't work in AS3. I
can display text values like this:
var input_txt:TextField = new TextField();
input_txt.x = 105;
input_txt.y = 35;
input_txt.width = 530;
input_txt.height = 156;
addChild(input_txt);
input_txt.text = "Hello World";
but I can't figure out how to substitute a value from the XML for the text.
All the sample I have found for loading XML stop with the trace statement in
the output window. I haven't found any that take that through to the stage
and I have looked online for hours and in every book that I have.
I thought it would be something like
input_txt.text=(info.tmp);
but that throws errors. Everything I have tried throws errors.
Any advice?
Thanks!
Nancy
Loading Movieclips To Stage?
I have two movieclips in my library with linkage listed "meiosis1" and "meiosis2".
this:
if(Key.isDown(Key.SHIFT)){
this.attachMovie("meiosis1", "kyro2", 1, {_x: 128, _y: 128});
this.attachMovie("meiosis2", "kyro3", 1, {_x: 128, _y: 128});
}
doesn't work.
I also tried _root.attachMovie, but no success.
Loading A MC Infront Of My MC On Stage
Hey all..
Im having problems getting my MC to play infront of the one currently playing on the stage. Im loading my movie into a specified location, ive read a little on the internet about levels, but i cant seem to find something that works.
Code:
on (press) {
loadMovie("animationwebpage.swf", "empty_mc");
}
Ive even tryed putting actionsrcipt back into normal mode, and from the options it gives you, you can only have either a level or a target. Im still new to actionscript so any help be greatly appreciated.
Loading External Jpg To Stage
Hello,
I'm using Flash MX 2004 professional, and actionscript 2.
I'd like to load an external jpg to the stage. I don't need a load bar or anything like that.
I'd be extra super greatful if someone could help mw with how to do this.
Many thanks in advance.
Loading Mc From Library Onto The Stage
I have a site that has a menu. This menu is supposed to load submenues once you have selected which topic you want.
I can load a submenue using the load external swf method.
However I want to have the submenu in the library already when the site loads initially and have it load from the library to the stage.
Is there a method for this?
All searches done on this have only brought up load from external swf
Help With Loading Data.
Hello,
I have a script on my server (getinfo.php) which when called outputs some data in flash format.
Here is the thing. I have a little test game movie. I am trying to have the game load this getinfo.php data totally before it proceeds on.
Any help? I would love to make a preloader that does this, then loads the game when done.
Any help at all is appreciated. I am totally stumped. I tried an example from a tutorial but it was not workin and I was lost.
THaNKS
Loading Data
Hi,
I need to make a stock exchange market watch with flash.
in english .. I need to do a flash file loads the prices and other information for the various stocks which stored in my database and it's updated every second
something like the attached image.
I have some data stored in the database and it's updated every second and I need to load this data from the database and update it in the flash every 2 -3 second.
thanks in advance
Loading A Lot Of Data
I have a flash graph visualization tool and it works nicely. The only problem is that the graphs are quite large. I load them as xml file that is up to 200k heavy.
My question:
How to make this file as small as possible?
The best way would be to somehowe zip the data and than load it into flash and then unzip it. Is that possible?
If zipping is completly out of the question, how about reducing xml file. Since xml has about 30% of redundant data is it possible to load the data somehow else? I remind you it is a big array to load.
Any thought would be greatly appretiated
Loading XMl Data
Hiya
First off, thanks for reading and maybe be able to help me
OK
I have a dynamic txt field with the instance name of home_txt
I would like to load xml data into this text box
Here is my XML data i want too load:
home.xml
Code:
<?xml version="1.0"?>
<hometext>
<homecontent>
blahblahblahblah
</homecontent>
</hometext>
Can you help me with the action script please?
Thanks
XML Loading Data
I am trying to modify some code so that the xml page is not loaded from within flash, but from a variable. something like movie.swf?data=data1.xml
this is the original code....
var quickItems=new Array();
var myData=new XML();
myData.ignoreWhite=true;
myData.onLoad=onQuickData;
myData.load("quick.xml");
what would I need to add to get this working? I can't seem to get it to work.
thanks!
Loading Data From XML
Hi all,
I have received great assistance from Flash experts in here regarding XML. Thanks. Right now, I have gotten some stuff working with XML. However, I have no idea on how to do this.
I have a XML quiz file. I need to load the questions into the boxes such that each box = 1 question. I'm able to load the data into a single box, but I do not know how to load to many boxes.
Any suggestions will be greatly appreciated. Thanks guys.
Cheers!
Loading XML Data
I've got a newer project where I use an XML file for storing some variables, one for text, and one for credits/contacts. The data file is small only has about ten variables and nothing else. The text file contains the narrative in text form - each page has quite a bit of text, the credits file is fairly small too, only about twenty entries (name, phone, and email).
So, one question is, how much time(frames) would you expect it to take for a small file to load? I was hoping to have a one frame main movie, but that doesn't seem to be working.
Should I load all three files at the same time or sequentially? How would you do this? Right now, I have the data and narrative files loading in frame one. The data is first, followed by the narrative. The credits comes in on frame five. I don't load the control interface until frame four as it must have the data from the xml file to load the child swf.
Thanks!
Po~
Loading XML-data
Hi,
my xml-file below.
Code:
<tehtava>
<alueet><alue>
<esimerkki>erilaisia – erilaisii</esimerkki>
<esimerkki>hirveästi – hirveesti</esimerkki>
<alueid>1</alueid>
</alue>
<alue>
<esimerkki>mutta – mut</esimerkki>
<alueid>2</alueid>
<esimerkki>kyllä – kyl</esimerkki>
</alue>
<alue>
<alueid>3</alueid>
</alue>
<alue>
<alueid>4</alueid>
</alue></alueet>
</tehtava>
and here is my as-code, unrelated lines omitted.
ActionScript Code:
function parseWords():Void {
var syvyys:Number = 10;
var alueSyvyys:Number = 1;
if (wordsLoader.firstChild.nodeName == "tehtava") {
var rootNode:XMLNode = wordsLoader.firstChild;
for (i=0; i<rootNode.childNodes.length; i++) {
if (rootNode.childNodes[i].nodeName == "alueet") {
var alueetNode:XMLNode = rootNode.childNodes[i];
for (var j:Number = 0; j<alueetNode.childNodes.length; j++) {
if ("alue" == alueetNode.childNodes[j].nodeName) {
trace("vastauslaatikon parametrit: "+newDragA_mc._x+", "+newDragA_mc._y+", "+newDragA_mc._width+", "+newDragA_mc._height);
for (var k:Number = 0; k<alueetNode.childNodes[j].childNodes.length; k++) {
trace (k + " -> " + alueetNode.childNodes[j].childNodes[k].nodeName);
if (alueetNode.childNodes[j].childNodes[k].nodeName == "otsikko") {
} else if (sanatNode.childNodes[j].childNodes[k].nodeName == "esimerkki") {
trace ("esimerkki");
} else if (sanatNode.childNodes[j].childNodes[k].nodeName == "alueid") {
trace ( alueetNode.childNodes[j].childNodes[k].nodeName + " -> " + alueetNode.childNodes[j].childNodes[k] + " -> " + alueetNode.childNodes[j].childNodes[k].firstChild.nodeValue.toString());
newDragA_mc.alueid.text = alueetNode.childNodes[j].childNodes[k].firstChild.nodeValue.toString();
newDragA_mc.alueid._visible = false;
}
}
trace("Alueen alueid: "+newDragA_mc.alueid.text);
}
}
}
}
}
and here is trace output.
Code:
0 -> esimerkki
1 -> esimerkki
esimerkki -> <esimerkki>hirveästi – hirveesti</esimerkki> -> hirveästi – hirveesti
2 -> alueid
Alueen alueid: hirveästi – hirveesti
0 -> esimerkki
1 -> alueid
alueid -> <alueid>2</alueid> -> 2
2 -> esimerkki
Alueen alueid: 2
0 -> alueid
Alueen alueid:
0 -> alueid
Alueen alueid:
as you noticed only <alueid>2</alueid> is read correctly
why only when k is 1 is (sanatNode.childNodes[j].childNodes[k].nodeName == "alueid") this true? and it even doesn't care if nodeName is alueid or not.
Help is apreciated.
XML & Loading Data
I've managed to relate several text boxes to data contained within an XML document, but linking this data to assign it to a variable is not going so well.
how can i allow a variable to read the data from a dynamic text field and get a numberical value (i.e not a string) any ideas?
Loading Data From Php? Help
Hi
I'm trying to load data from mysql databse, I have set up the php page to query the information...
in flash i have created a dynamic text box which has the variable name of strdate and the instanc name of date1 and in frame 1 I have put the following code
loadVariables("http://www.acusis.co.uk/adam/connect.php", "this");
strdate = date1;
When previewing the movie i get _level0.date1
from looking at tutorials ect, it seems that what im doing is correct but it isn't displaying my info???
any ideas anyone???
Loading Xml Data Help.
I have a flash file that loads images and image descriptions via an xml file (not unlike the one in the tutorials).
My swf works fine locally and works fine in firefox locally, but it doesn't work in IE locally and it doesnt work at all when on my server(ie or ff).
The image descriptions are shown but none of the images appear.
Any ideas why?
p.s. The xml and images files are all present on the server.
Loading Data From Url
Hi,
I've been trying to figure out how to load data from the url
such as
Code:
www.somesite.com/somefile.swf?myValue=data_I_want_to_load
where
Code:
myValue=data_I_want_to_load
is the data I want to load.
is it possible?
What I'm trying to avoid loading the data from a separate file.
Thanks
Loading XML Data (Only One) - Please Help
Hi, I have some data in a XML file. Here it is:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>image01.jpg</image>
<Thumbnails>thumb01.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 01</caption>
</pic>
<pic>
<image>image02.jpg</image>
<Thumbnails>thumb02.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 02</caption>
</pic>
<pic>
<image>image03.jpg</image>
<Thumbnails>thumb03.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 03</caption>
</pic>
<pic>
<image>image04.jpg</image>
<Thumbnails>thumb04.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 04</caption>
</pic>
<pic>
<image>image05.jpg</image>
<Thumbnails>thumb05.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 05</caption>
</pic>
</images>
I do not want to show all the data - is it possible to only display one of the images such as only retrieve image 4? Please help!
I only want to pick out this:
<pic>
<image>image04.jpg</image>
<Thumbnails>thumb04.jpg</Thumbnails>
<caption>Grand Theft Auto IV Image 04</caption>
</pic>
Loading External SWF Into Main Stage
I am having multiple swf which I am loading with MC buttons placed on my main stage, everything works fine except it reloads the swf file everytime you press one of the buttons again instead of just displaying it since it loaded the swf file already the first time.
the loadmovie command ist is done in the MC where the button was made.
www.vicomsystems.com/site
thanks for any help
Problem With Loading External .swf's To Stage
***Flash 8 Professional, AS2.0, Exporting to Flash 8***
http://www.uis.edu/mediaquad/vttest/tour.html
I have a file, tour.swf. When a building is clicked, an external .swf file is loaded (297 x 540 px) on the right side of the tour to replace the old one. This keeps the file size down, because users only download what they want to see.
The main .swf is loaded with this actionscripting for when a building is clicked, and it then loads on the side:
Code:
on (press)
{
this.createEmptyMovieClip("quad", 2);
with (quad){
_x=543;
_y=0;
}
loadMovie("quadside.swf", quad);
}
The problem is that the side .swf files often do not load past the 2nd thumbnail, but when you click on one, the rest appears.
I have this preloader on frame 1 of the side swf's (quadside.swf, etc.), but have no clue if it's working.
Code:
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;
gotoAndStop(2);
};
myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";
myProgressBar.source = "_root";
myProgressBar.conversion = "1";
myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
stop();
Please help! Is there another way to have the side flash load fully before it appears? And why doesn't my preloader work??
[Flash8] Loading A Swf From Library To Stage
This question pertains to the movie I mentioned in my previous question. So what I want to do is be able to, when a user clicks a button, be able to load a swf of the movie for the button they clicked, but I dont want it to load externally, because this is going to be a standalone flash movie and wont be able to load external .swfs. Basically I want to be able to load an already imported .swf file directly from the library to the stage. Should be simple enough, right?
Loading Images On Stage Into A Grid**
Hi.
I have a slideshow of images, all being loading via Action Script, i have 20 thumbnail that load up into a strip with this code.
xmlPhotos.onLoad = function() {
for (var i:Number = 0; i<xmlPhotos.firstChild.childNodes.length; i++) {
makeAThumb(i);
nextX += 110;
}
"NextX + = 110" is what loads them up next to each other nicely.
Okay my problem is i cant work out how to load them into a 5 x 4 grid, with a 10 px gap between them, is this possible? How can i acheive this all through Action Script?
Please Help.......
ck
[CS3] Loading Symbols On Stage From The Library.
I have a bunch of graphic files that I want to load to the stage during runtime. I can't figure out what the code is to allow me to do this. I know how to load separate .swf's but have never worked with just loading something within the actual swf. Can someone give me at least a push in the right direction?
edit- wait so would the best way to do this is to make it a MC and add a linkage identifier? Is that the only way?
Loading A Swf Movie At Stage Size
Hello,
I have a problem, where I am creating a flash container to hold external SWF movies. The SWF files will be of different sizes, and may contain graphics outside of the stage boarder.
Is there a way to load the SWF's at their Stage size rather than their entire movieClip size. I don't want to have to trim each SWF's outside stage area.
The results I am seeing at the moment are that when the SWF loads, I see all the contents of the SWF. I need to be able to only view the Stage area and not the outside area also.
The container size will be fixed, unless I can dynamically change the size (which i can't seem to do either).
Could any one offer advice?
Thanks,
L.
Loading An External SWF To A Certain Part Of The Stage.
Guten Abend lads and lasses. I have a problem with attaching an external movieclip, now I use the loadMovie way, but I don't know how to add it to the main stage in a proper place. What method would I use to attach the external SWF to a certain part of the stage?
Thanks in advance.
Preloader Not Loading Main Stage In IE7
Okay, everything seems to be running fine with my site in most browsers. The problem I am having is with my preloader and Internet Explorer. When the page is loaded for the first time in IE everything loads just fine. When the page is refreshed or accessed shortly after the first view the preloader page comes up and hangs showing 100% load progress. This only happens in Internet Explorer.
Here is my code:
Code:
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, checkingProgress);
function checkingProgress(event:ProgressEvent):void{
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal*100;
bar.scaleX = percentLoaded/100;
if(percentLoaded == 100){
this.gotoAndStop("1", "Main");
}
}
And here is the url if you want to reproduce this problem:
renty.biz
Thank you for any help!
Loading MovieClip Into A Scalable Stage
I've got this bit of code on my first frame, which allows me to place clips or buttons at specific locations within a fullscreen background:
HTML Code:
//start Stage re-size code
Stage.align = "LT";
Stage.scaleMode = "noScale";
// ---> Create a new listener object
var stageListener:Object = new Object();
// ---> Define the resize function...
stageListener.onResize = function() {
// ---> first, get the new dimensions of the stage....
var stageWidth:Number = Math.round(Stage.width);
var stageHeight:Number = Math.round(Stage.height);
trace("Stage size is now " + Stage.width + " by " + Stage.height);
// ---> now, set the footer BG w & h to the stage dimensions...
footerBG_mc._width = stageWidth;
//footerBG_mc._height = stageHeight;
footerBG_mc._x = 2;
footerBG_mc._y = stageHeight-25;
// ---> now, set the footer links to the stage dimensions...
footerLinks_mc._x = (stageWidth/18) - (footerLinks_mc._width/2) ;
footerLinks_mc._y = stageHeight-200;
// ---> now, set the background clip alignment to match stage...
wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
//wallPaper_mc._y = stageHeight/2;
// ---> now, size the outLine_mc to the stage dimensions...
outLine_mc._height = stageHeight-2;
//outLine_mc._width = stageWidth;
outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
//outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);
};
// ---> Apply the listener...
Stage.addListener(stageListener);
// ---> Run the function...
stageListener.onResize();
//--------------------//
I've now added some buttons to the stage, and want to load movieClips using this bit of actionScript:
HTML Code:
on (release) {
this.attachMovie("mcSpecialists","mcSpecialists",10);
}
The question is, how can I load the mcSpecialists movieClip so that it's always at the center of the stage?
Thanks
Loading JPEG Images Onto The Stage
Hi all,
I am new to ActionScript. Presently, I am working on ActionScript3.0.
I have a combo-box on the stage with a few items in the combo-box and also have corresponding JPEG/PNG image files.
My goal is :
I need to display the appropriate image onto the stage based on the selection of the item in the combo-box. So, please I need ActionScript code or procedure to handle this using Event-Handling mechanism of MouseEvent.
I need help.. Please help me.... I am new to the ActionScript and flash environment.
Thanks a lot in advance.....
Srihari.Ch
XML Menu Not Loading Swfs On Stage
Can you have a look at this menu is not loading the swfs on stage.
ScrollingImageMenu.as This is the file that I tried to alter.
In the loadmovieTest2.zip file is loading the movie but is doesn't "remove the child" from the stage.
Thanks in advance.
Loading External .swf's Into The Library, But Not The Stage?
Can i load an external movie to the library (so I can create a linkage name) but not have it show up on the stage? I think this could solve my printing problem i discussed in a previous post...
loadMovie() requires a target and help says that the target MC will be replaced by the loaded swf file or image. If I create a holder mc in my library and use that as a target, even though its not on the stage, would it print?
thanks
Problem Loading Swf To Stage Using Button
hi there
I have a button that loads a swf to a holder. The swf is then stopped until the user wants to play it.
My button that loads this works 9 out of 10 times.
The movie is loaded and waiting for the user 9 out of 10 times.
Why is it not working 100%?
frame1:
//load animation
loadMovie("sas.swf", this.holder_swf);
this.play();
frame2:
//resize animation to correct size. function defined at start of this movie
resizeanim(); // a function that resizes the holder mc to the right size - to ensure a big size movie doesnt come in
this.play();
frame3:
//stop movie waiting for user to hit play
this.holder_swf.stop();
trace("it's animation time");
stop(); // waiting for user to hit play
please help.
This is the resize function:
resizeanim = function () {
this.holder_swf._width = 550; this.holder_swf._height = 400;
}
part II to my question is why cant the resize function be called directly after
loadMovie("sas.swf", this.holder_swf); ?
I have to put it on the next frame. This causes the pic / anim being resized to blink once.
|