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




Importing External SWF Help



I am a teacher trying to create some activities for my students.

If you could please look at my file and tell me what I am doing wrong.

Thanks soooooooo much

You can find the zip file here.

http://www.spanishome.com/index.zip



FlashKit > Flash Help > Flash Newbies
Posted on: 09-16-2006, 12:26 AM


View Complete Forum Thread with Replies

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

CS3 Importing External Swf Help
Hi, I just joined up, so nice to meet you ^_^

Anyway im making a flash website in CS 3 using Actionscript 2. I have previously made an image gallery, and i am trying to import it into my website.

I have tried loadmovie and loadmovienum, and i am having the following problems:

1/ I cant seem to be able to control the location or reposition the gallery once it has been imported

2/ some aspects of the gallery will not show unless i manually add the assets to my website

3/ I cant seem to remove the movie ones it is loaded, ive tried several methods.

Im wondering whether something is wrong with the gallery swf file, as ive never had this problem before.

Thanks for any help of suggestions. Seren

Importing External Graphics In An Swf
Got a little question.

Is it possible to import external graphics (gif or jpg) in an swf movie while it's running? Like it's possible with external text files, can it also be done with graphics?

If possible what's the code, how do I do it?

Importing External Swf Files
Hey.

Would like to know how to insert another swf file into the main flash file ... (?) .. Is it possible? - or do I have to redo all the coding and things :- ...

Thanks.

Importing External Swfs ...
Hey.

I've imported my external "scrolling" swf - it all links up fine and dandy except now it doesn't scroll .. :-| I'm using flash 5 - a buddy told me it happened to him too - the scrolling action disapeared.

so - what would I need to do to fix it :-)

Importing External Table Into MX?
Could I import an excel spreadsheet or something like a table (as long as it keeps the formatting) into MX & then use the scrollbar?

Bran

Importing External Images
i'm trying to import an external image into a movie witht the

loadMovie("image.jpg",0);

command but flash isn't having any of it.

i'd also like to import .gifs and .pngs, is flash picky about the type of jpg compression?

thank for any help

Importing External Libraries Into A Swf
i know how to export libraries... but how would i import them into a swf file?

example.
If i am making a navigation... and i want certain buttons with certain fonts... how would i import those two swfs?

1 being the button and the other a font.

thank you.

Importing External .html Into .swf
I'm using the following code to import an external .html file into my .swf file ... and it works well.


loadVarsText = new loadVars();
loadVarsText.load("text/home_page.html");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.html = true;
scroller.htmlText = this.var1;

} else {
trace("not loaded");
}
};


My problem is ... It imports the text great ... but doesn't take any of the "normal" html code. Example ... I can bring in an image by using <IMG SRC="...."> ... and it ignors my <BR> or <HR> comands.

My question is ... is there a better way to import a TRUE .html file into my Dynamic Text box?

Help With Importing External Code
I'd like to import external action script from a text file. I did use the #include command, but this only includes the file at the compile, and I want it to read from the text file after its compiled. So if I changed the text file the flash would change.

I just want to include some actionscript, I don't want to include some variables for dynamic text fields. I've seen that all over the web but thats not really what I'm looking for. Is this possible? Thank you for your time.

Help With Importing External JPGs
Help.

I am trying to import an external, non-progressive JPG into a banner. I am using the "loadmovie" function, but I am not able to determine the position (x,y) of where my JPG appears. I tried creating a symbol and putting the "loadmovie" action inside the symbol, but it doesnt work. I also tried loading it into a button, and it does appear, but only after the roll over action. How can I make it work and place the JPG in the exact location where I need it inside my flash file?

Thanks a lot!!!

Iliana

Importing External .swf Guestbook
Hi, I have made a guestbook that reads the PHP file, then the PHP file posts the content into MySQL. Here is an example of the finished product : http://skter.com/guestbook.swf

This is just an example. The guestbook isn't that big, it is accually very small. But when I put the actionscript into the web page, which looks like this:

Code:
this.loadMovie("guestbook.swf")


it stops at the first frame which is the "Loading..." frame. You can see it at www.skter.com and click on guestbook.

How can I fix this problem?

Importing External Swf And Resizing It (yes, Yet Another One Of These)
So, I'm trying to get the whole 'import external swf and resize it' bit to work.
After looking around the forums here I found some bits and pieces that was half-succesfull so far;
I've managed to import the swf to the movie, and resized it. Sorta.

Code used for importing the clip (put on an 'Actions' layer):
code: loadMovie("box1.swf", "/box1I");

Code used for resizing (put on the container apptly named 'box1I'):
code: onClipEvent(load){
this._width=169;
this._height=225;
}

The swf being imported is 300x400, so the new dimensions are keeping the aspect ratio.
But for whatever reason, neither the size I'm trying to obtain nor the aspect ratio is preserved (it does get resized, just not in the right size).
Obviously, I'm not very skilled with the scripting part yet, so any help is greatly appreciated.

I'm using flash mx 2004, and both the main clip and the external one are exported for flash player 7 and AS2

[F8] Importing External .mp3 During Runtime.
Is there anyway you can open a .mp3 file right into FlashPlayer while it's running, but have it open the folder-searchy-thingy to find it?

Importing External Js To Flash
I have a .js file that contains arrays of data. How is it possible for me to import the data in the js to actionscript? Would like the data to appear in a dynamic textbox.

[F8] Importing External Text
Hey all, quick question.

I am doing a restaurant menu and I need to import the menu items from an external text file so that my client can update it easily. Can someone please point me to a tutorial or maybe a quick hint on how its done

Thanks

[F8] Importing External SWF Once And Then Reusing It.
Hi, i am trying to create a web site that loads external swf's into a main swf.
So far this is working really well i am able to load the files into the main swf.

However i need the external swf's to somehow embed themselves into the main swf so that if the user goes back to another page the external swf will not have to reload again.

is there a way to do this? any help would be so appreciated.
shot in advance.

Importing External .wmv File
Hello,
I was using the code


Code:
on (release) {
_root.empty.loadMovie("filename.swf");
}
To load external movies into my flash. It worked fine, until I tried to load a .wmv file. If I load the file into flash and save it as an swf the sound lags behind the video. Any ideas? Thanks in advance for any help...

Importing External Swf On A Scroll Bar
Hello,
I would like to create a scrollbar that imports external SWF like this site:

http://www.firstbornmultimedia.com/#...folio/preview/

I had create something similar in AS2 but now I would like to start from scratches in AS3 to built something a bit more "professional". I have a post already opened for a problem that concerns the loader class and importing external file in an empty movieClip but I think that when I solve the problem I will face this scrolling issue because my file is written in AS2.
Also if you can point me to somewhere where I can find a tutorial to creating a loading bar in AS3.
Thank you so much for your precious help..without the community there be no Flash!!

Importing External Swf Into Empty MC
Im trying to load and play an external swf in my main swf within an empty MC depending which code I use the results are

1) loadMovieNum("intro.swf", holderclip);
loaded swf plays over top of everything and i lose the text and navigation

2)onClipEvent(load/OR/enterFrame) {
loadMovie("intro.swf",_root.holderClip);
}
nothing happens at all

has anyone got any ideas??

Importing External Images
Hey Guys!

What i'm trying to do it import a few (say four) images from an external
folder at random and display them in a row. The folder would contain up to a
hundred pictures, sequentially named (ie. 1.jpg, 2.jpg, 3.jpg, 4.jpg,
etc...)

any suggestions on how I could do this??
thanks,

-Chris

Importing And Playing An External SWF
I have a SWF that plays well if included in an HTML file here.

Since this project is becoming bigger, i'm considering preloading this SWF before make it play. I'm not sure if I am grasping the whole sequence of event since i'm getting an error.

TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
at monroman$iinit()

Which means: impossible to access a property or a method of a referenced null object (or something like that).

Code is below.



Thanks in advance for your help.







Attach Code

chargeur = new Loader();
addChild (chargeur);
chargeur.addEventListener (Event.INIT,EtapeUn);
chargeur.load (new URLRequest("monroman.swf")); // this files runs ok embedded in HTML code.

function EtapeUn (event:Event)
{
var monswf:*=chargeur.content;
contenant_mc.addChild(monswf);

}

Importing External Movies Like .ai Ect..
Ok so I imported a anime I downloaded from the web to Flash Mx. Then I wanted to just get like a section of the movie to make like a "movie clip". BUT when I tried to do it somehow it didnt work. Anyone here know how to select what you want from a imported movie and delete the rest. Like a movie clip of the section of the movie you want?

Importing External JPG With Preload
Hi, back again

I have another question.

I'd like to import an external JPG too. Is it possible to have a preload animation before de JPG is loaded. When the JPG is finished loading -> the preload animation stops -> an animated mask makes de picture visible.

My skills in AS are poor. Some codehints are welcome

Thanx
Alec

Importing External Swf Files
I have created a swf that imports seperate swf files that each have there own preloaders. My question is why the preloaders start using the main movies frames? Is there a way of stopping this?

Importing Sounds From External SWF
Hey people,

I know this subject has been spoken upon alot and tutorials provided such as
http://kennybellew.cowfly.com/tutori...ttachsound.htm

but I still somehow cant get it to work! I've spent hours surfing around and trying to fix it but I guess I've reached a dead end. This is how my .fla files are.

One contains the sound. The .fla is called Track2.fla.
In it, I've imported a .wav file and set the Linkage to export for AS and export in first frame. The identifier is "Track2".

on the first frame of the timeline, I added this code:
trackMusic = new Sound(this);
trackMusic.attachSound("Track2");

========

For the second .fla, it is called Test.fla. I created the empty movie clips such as the tutorial has suggested and placed this codes in the first frame:

_root.soundHolder.loadMovie("Track2.swf");
_root.soundHolder.trackMusic.start();

No sound at all.
The funny thing is when i placed trackMusic.start() in Track2.fla it works perfectly.

Also I have tried the following and have yet to succeed :

var BackgroundMusic:sound = new Sound(2);
loadMovie("Track2.swf", 2);
BackgroundMusic.attachSound("Track2");
BackgroundMusic.start();

Importing External URLS
Hello,
I have a Custom Context Menu that I'm using on some of my flash movies and I want to pull the urls from an external XML file. Reason being, in the end I will have about 50 files and I want an easy way to alter the links just in case a path changes in the future.

Any ideas?


//Context Menu//
function sc1(){
getURL("http://www.google.com")
}
function sc2(){
getURL("http://www.ebay.com")
}
var sc_cm:ContextMenu = new ContextMenu();
sc_cm.hideBuiltInItems();
sc_cm.builtInItems.zoom = true;
menu1 = new ContextMenuItem("Go to Google.com", sc1, falase, true, true);
menu2 = new ContextMenuItem("Go to Ebay.com", sc2, falase, true, true);
sc_cm.customItems.push(menu1);
sc_cm.customItems.push(menu2);
this.menu = sc_cm;
//Context Menu//

Importing External Movies Like .ai Ect..
Ok so I imported a anime I downloaded from the web to Flash Mx. Then I wanted to just get like a section of the movie to make like a "movie clip". BUT when I tried to do it somehow it didnt work. Anyone here know how to select what you want from a imported movie and delete the rest. Like a movie clip of the section of the movie you want?

Importing External JPG With Preload
Hi, back again

I have another question.

I'd like to import an external JPG too. Is it possible to have a preload animation before de JPG is loaded. When the JPG is finished loading -> the preload animation stops -> an animated mask makes de picture visible.

My skills in AS are poor. Some codehints are welcome

Thanx
Alec

Importing External Swf Files
I have created a swf that imports seperate swf files that each have there own preloaders. My question is why the preloaders start using the main movies frames? Is there a way of stopping this?

Importing External Movies
Hi! I hope someone is kind enough to help me with my
"loadMovie" problem........I'm tryin to import an external movieclip but i want the movieclip to play another frame label, instead of the defaulted 1st frame. Can this be done??....or must i create an instance for the movieclip? any form of help is very much appreciated........thanx guys

Importing External Images
I need to import images from a html string into flash to be used in a slideshow. How would I write the actionscript to do this.

Thanks

Importing An External Text File?
Need a bit of help with this one. Been going round in circles for a few hours.

Ive got an external file called text.txt (in the same folder as the swf)

In the Flash movie ive got a button and a text field.

When you click the button, I want the contents of text.txt to appear in the text field.

Cheers.

Importing Variables From An External Txt File...
i'm having problems doing this. in frame 1 of a layer i have attached a loadvariables statement referencing the text file, but it's not reading in the variables.

can anyone help with this? thanks a lot...

Importing An External Text File
I need to import an external text file into a varible in actionscript. Basically, so I can change output text in flash by only editing the .txt file.

Rundown:

myinfo.txt

needs to be imported into

textbox (one of my varibles in actionscript)

_______________________________________________

Could someone type up some syntax I could use to do
this. Help would be much appreciated.

Problem With Importing External Txt File
I cant seem to import a txt file into a dynamic text field which is in a movie clip

My movie clips instance is "sections"

the variable for the text box inside the movie clip is "news"

the text file is called "text.txt" and inside the file it begins..... news=bla bla bla bla

and the code i have on the timeline is....loadVariables ("text.txt", "sections");

What am i doing wrong???

Importing Text From External File?
Can anyone give me a basic explanation on how to use actionscript in a text box to load text from an external source aka a .txt file or something?

LoadVars() I understand will do this but I'm not sure how to set it up.
Any thoughts would be helpful

External Swf Doesn't Work After Importing It
I have a preloader swf (loadingBar.swf) that contains a preloader bar and an empty movie clip (loader) that loads an external swf (content.swf). All those experienced with AS will know why I chose to import the main body of my swf as a separate swf. My conten swf contains an object (shapeMC) and the first frame of content.swf, puts the shapeMC into a variable called dupShapeMC, using a for loop, duplicates (duplicateMovieClip) the subShapeMC, x amount of times. I then put dupShapeMC + x into a new variable called posShapeMC to distribute it horizontally and vertically.

// original shape and space between shapes
originX = 72;
originY = 60;
width = 140;
height = 140;


// used to distribute horizontally and vertically
hor = 4;
ver = 3;

x = 1;

dupShapeMC = "shapeMC";

// the loop
for (i=0; i<ver; i++) {
for (p=0; p<hor; p++) {

// duplicating shape
duplicateMovieClip (dupShapeMC, dupShapeMC+x, x);
posShapeMC = _root[dupShapeMC+x];

// positioning the shapes
posShapeMC._x = originX+p*width;
posShapeMC._y = originY+i*height;

// incrementing x
x++;
}
}

this works fine if I test the movie on its own but when I test the movie from the preloader fla the content swf loads but the shape mc's don't duplicate. I think it has something to do with my levels but I can't figure out what? Can someone take a quick look at my fla's and tell me where I've gone wrong.

http://www.geocities.com/nurbie4/content.fla
http://www.geocities.com/nurbie4/preloader.fla


CV

Importing External Game Into Another Fla/project
Hi everyone

I had a game built for me that i need to import into another flash project

Problem is when i use the: loadMovieNum("movie.swf", 0); command the game is imported but it effects my other project too. I have the mouse cursor change in the game but it effects the other project as well. No only that everything outside the canvas in the game can be seen now.

i'm lost with this and really dont know what to do....can anyone help me please?

Also i have another part in my project that also uses the loadmovieNum action. When i used the one above for the game that removed the other loadmovie...can i only have 1 in a flash project?

Just to warn u the guy that made this for me said he can't change the size of the movie so i can't match it to the one its being imported into...does this matter?


Thank you!

Importing External Text Problem
i'm making a basic flash website, i need to know how to import a file which contains text and have it show up on my flash page. say i click a link called "News" i need that to bring in the text in news.txt and show it in the flash movie. i need to know how to link the "News" link, what type of file i need to name "news.txt" and how to create the certain area which news.txt comes up in. anyone?

Importing A External Word Doc In A Scrollbar
can any1 give me any advise on the best way to have a component scrollbar and import an external text file within it.

Cheers

G

Importing External SWF, Animations Disappear
I'm working on a project and I'm trying to load a small movie into my main movie clip. It's very tiny, but it needs to be an external SWF, so my client can upudate these little images without having to touch the main movie (which he's not getting the source to anyway).

The problem is that when I load the little movie into the main timeline, all of the motion tweening on it is ignored. These little guys don't have a bit of actionscript in them, just a couple of tweens, because they're so small and it's the easiest way to do it that my client understands (so he can change these himself later, which he insists on).

So, my question... Where did my tweening go?

Importing External Fonts Into Flash
How to import external fonts into flash mx pro 2004 ?Thanks.

Importing External Javascript To Flash
I am a newbie in actionscript. I have a .js file that contains arrays of data. How is it possible for me to import the data in the js to actionscript?

Importing External Swf File (with Buttons)
I have a flash file which is my main animation. And then I created another .fla file with buttons and exported that as a movie (.swf) . So what I want to do is import the second flash animation with buttons into my first flash files library. However, it only imports as a graphic, not an actual interactive animation. I use Flash CS3 and AS2 (although not very good with ActionScript). Help?

All I want is the second .swf file to load at a specific time in the timeline, and allow the user to click on the buttons on that swf file. All of this happens in my main .fla file.


(Maybe there's a better solution in AS3, but I'm not familiar with that.)

Importing An External URL With Special Characters?
Hi,

I'm trying to import a URL from a text file and the import all works fine. But the URL has some characters that Flash doesn't seem to like.

The URL in the load is formatted like this (not my URL).


PHP Code:




&theUrl=http://www.somedomain.com/today'slist&today=Monday







So Flash seems to be balking at the apostrophe and the ampersand. How can I get Flash to recognize those characters on import?

Thanks,
Layne

Madness With External Classes And Importing
Hi all,

The strangest Flash behavior is driving me near to utter madness. I am working on an application with a few custom classes. Everything worked fine for many weeks. Yesterday, I quit Flash, and upon reopening my FLA, none of the custom classes would link in. I got the error "The class or interface <xxx> could not be found."

After hours of banging my head, I tried something simple. I created a new .fla called test.fla. I created a layer called Actionscript. I added the following code to the first frame of the Actionscript layer:

var test:ImportTest = new ImportTest();

I then, in the exact same directory as the file test.fla, created a file called ImportTest.as. This file has the following contents:

class ImportTest {public function ImportTest() {trace("Instantiation."); }}

When I execute this test.fla, I get the error:

**Error** Scene=Scene 1, layer=Actionscript, frame=1:Line 1: The class or interface 'ImportTest' could not be loaded.
var test:ImportTest = new ImportTest();

Total ActionScript Errors: 1 Reported Errors: 1

What gives? Perhaps a classpath issue? Well, my global classpath has:

.
$(UserConfig)/Classes
$(LocalData)/Classes

The dot alone should be enough.

My document classpath has:
.

Perhaps it's a permissions problem? Doubtful. The directory listing is:
-rw-r--r-- 1 Richard Richard 85 Feb 22 14:35 ImportTest.as
-rw-r--r-- 1 Richard Richard 41472 Feb 23 09:47 test.fla

I'm using Actionscript 2.0 in Flash 8 Professional on a Mac OS X 10.4.

Like I said, this all worked perfectly well just moments before. I quit Flash to install some Mac OS X updates (the sorts of standard updates that Apple pushes out from time to time - in this case they were updates to support changes in Daylight Savings Time), restarted the computer, opened Flash, and I can no longer seem to include any external actionscript files.

Any ideas? I am at the end of my rope on this one, ready to jump off a bridge!!

Thanks,
rj_resnick

FLASH - Flv's And Importing External Files
You may have seen this on the forum at the maromedia site...

Note: this is trying to be done all in Flash... please be patient as I have to explain it...

Here's the scenario... I am currently building a website for a coffee company, and as an introduction to their website, they want to play a short clip of 16 seconds, size 350x250 - fine... The real problem is that I have been asked to make it appear as if it was actual footage on TV - in effect, at super high quality with NO (and I mean, NO) Pixelation... very stringent, but they think I can somehow push the boundaries and work something out!! Also they wish for it to play as soon as the website begins (no chance of preloading!!) - without an option for the user to control the film (as in no play/stop/rew buttons, etc.)

In order to create this, I had to use Final Cut Pro - as this was the only program that passed the 'test' for what was asked... the client has a major issue with the 'fade' to black sections of the film - believing them to look as if they are shimmering (this also being the initial problem with building it directly in Flash).* I passed this through all types of compression to achieve the smallest possible file (12MG) - and then from Quick Time Pro - I came up with an immaculate looking, but incredibly large flv file - using the export feature. Total... 82MB, yes MB...

Please note, I am fully aware of compression, but have to iterate this incredible request!!

Rather than attach it to the timeline in Flash, I placed the created FLV file in the same folder and requested on the first line of the timeline - through Actionscript - that it plays the FLV 'progressively'. To my understanding, this file should play whilst not having to load up before hand... (learnt of this from Macromedia website.)

I have seen this method used in a few tutorials, but admittedly the file sizes are approximately 5MB...

After uploading the file (took over an hour), I tested the film and it began to play extremely slow and choppy. After 16 seconds (the expected duration of the clip) the next scene in the timeline began !! The film had actually only progressed about 3 seconds into itself....

I don't think I am necessarily doing much wrong as it is the best solution that I could come up with in terms of keeping the final 'SWF' file to a minimum size so a user will not have to wait it to load up (got Flash files to 24MB - but still too long to load up!!!)

Can anyone think of an alternative method to playing an 82 MB file, or is this just plain ridiculous??

I am at a loss because I am still curious to see if this is actually feasible... if so then maybe you will help me push the boundaries of Internet viewing!!!

ALL comments/suggested will be highly appreciated and definitely considered

Thanks

Importing Text From External File
Hello All....Hopefully someone will be able to help. I am new to flash and have read several books on CS3 and all have said you can use external files and utilize the UILoader and UIScroller to accomplish this. Number one, I cant find the UILoader component but I can find a Loader component in Flash CS3. This doesn't except text files. It will except graphics files.

All I am trying to do is use my existing text files to populate a small movie but I don't want to have to script (unless I have to) and make the movie any more complicated. None of the text tools are helping since most want the field to be editable by the user. I want the textarea to be read only. I wrongly assumed that a TextArea would accomplish this.

Any words of wisdom from you experienced users.

Thanks

Importing External SWF With Code & Fields?
Hi,

I have a problem thats driving me nuts.

I'm making a game at the moment, there is a control panel that is supposed to drop down between each players turn, the idea was to create the control panel as a seperate movie and then display it on the screen when it's needed.

The control panel contains drag and drop that feed different text fields depending on selections made.

When it comes to importing the swf in all my layers, actionscript and fields have gone leaving me with just shape objects.

I got this working with another piece of code (a power slider) and it worked.

Can anyone help with this please? What i want to be able to do it introduce the control panel as a movieclip on the screen and have the movie work within the movie just like it does on it's own.

Thanks,
gary

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