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




Dynamicaly Loaded Url



Hi guys,
I have a button and i want when i press on it, it links me to a url.
and i need the url to be read from a text file.
it will enable me to change the url without refering to the flash source file.

thanks.



FlashKit > Flash Help > Flash General Help
Posted on: 04-06-2005, 09:28 AM


View Complete Forum Thread with Replies

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

AS 2 Dynamicaly Loaded Content
Hi,

I was trying to make a text scroller using this tutorial http://www.kirupa.com/developer/mx/dynamic_scroller.htm, but for some reason when i test it, just displays a part of the information on the txt file. It seems to be limiting the amount of information displayed on the dynamic text box.

Dynamicaly Loaded Button
Hello)) Here is my problem:

i have a button that loads dynamicaly from a library. I need to get access to this button and an opportunity to change its properties. Please explain me how can solve such problem)))

Thanks))

Javascript - In A Dynamicaly Loaded Txt File
Hello!
This is killing me. I have a swf movie that loads my dynamic text file fine. I want the text links in the txt file to open sized browsers (ie: 300 x 300) using javascript.
Is this kind of scripting not allowed by importing dynamic text files? Nothing happens when I click on the text.

Any help is appreciated. I have been trying to figure this out forever.
Thanks.
viner1

How To Attach Movie From Dynamicaly Loaded Swf?
I want to attach movie from dynamicaly loaded swf.

For example:
...
_root.screen.trees.loadMovie("trees.swf");
...
_root.screen.attachMovie("tree1", "tree1", 100);
It doesn't work. But _root.screen.trees.attachMovie("tree1", "tree1", 100); work properly.

What should I do to attach tree1 movie from trees.swf library to movie other than loader movie?

Contolling Dynamicaly Loaded Movies
After doing the tutorial (Controlling Different TimeLines) I was wondering if it was possible to control the timeline of a dynamically imported swf file
Ie “movie a” loads “movie b” then tells “movie b” to goto and stop frame 5 of “movie b”

regards
Scott

Re Sizing Dynamicaly Loaded Images
I am dynamically Loading a .jpg to a Movie Clip. The _mc is 160x130 pixels and the .jpg is 330 x 280.

The problem is this:
loadMovie("data/Image1.jpg", Image1_mc);
works fine but the Image1.jpg doesn't fit inside the Image1_mc

Would there be a better way of importing an image to the Scene and resizing it.

I also want to make a button over effect so that the dynamically loaded image will show in a larger frame when the user wishes to see an enlargement of a thumbnail image.

So far I have used:
_root.Image1_btn.onRollOver = function() {
loadMovie("data/Image1.jpg", Large_mc);
}
But this then reloads Image1.jpg (freshly) into the Large_mc from the dynamic source and again fails to size the image.


By the way before any one says _xscale the mc is no good for this project. Setting _width properties of the loaded Jpegs would be great but the command doesn't seem to effect the loaded image


BaNa

Help With A Preloader For Dynamicaly Loaded Jpegs
I am loading jpegs into a movie clip loader and need a preloader right before. I am using a simple transparency fader on frames 2-15, so would like to have the image completely loaded into the movie clip 'loader' before I start the fade.
Check out the link below. You can see that the images 'pop' in. They are displayed after the fader has passed by. This is really obvious when you are visiting for the first time and they haven't been loaded into the computer cache, after they are loaded you can see the fader working quite nicely, as if they were 'unveiled' after being loaded in.
Any advice would be really, really appreciated.

http://inadequateanimal.com/index2.html


The code I am using points to the 'topleftloader' movie clip from frame 1 of the 'topleft' movie clip. The fader begins on frame 2.


filename = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg"];
path = "pictures/topleft/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], topleftloader);

Thanks!

Re Sizing Dynamicaly Loaded Images
I am dynamically Loading a .jpg to a Movie Clip. The _mc is 160x130 pixels and the .jpg is 330 x 280.

The problem is this:
loadMovie("data/Image1.jpg", Image1_mc);
works fine but the Image1.jpg doesn't fit inside the Image1_mc

Would there be a better way of importing an image to the Scene and resizing it.

I also want to make a button over effect so that the dynamically loaded image will show in a larger frame when the user wishes to see an enlargement of a thumbnail image.

So far I have used:
_root.Image1_btn.onRollOver = function() {
loadMovie("data/Image1.jpg", Large_mc);
}
But this then reloads Image1.jpg (freshly) into the Large_mc from the dynamic source and again fails to size the image.


By the way before any one says _xscale the mc is no good for this project. Setting _width properties of the loaded Jpegs would be great but the command doesn't seem to effect the loaded image


BaNa

Rotation Of Dynamicaly Loaded Jpg Is Choppy
Last edited by BenConnito : 2005-10-21 at 15:58.
























when i rotate a movie clip with a jpg loaded with loadMovie the image is choppy looking like it is not smoothed. if you import a jpg into the library and rotate it on the stage the same thign will accur but you can turn on "allow smoothing" in the properties for the jpg and it will look smooth again...basically does anyone know how to rotate dynamiclay loaded jpg's and not get teh choppy look

-also...when i view the swf in 7 the jpg is smoothed...but not in 8 so what stange setting has been affected here is a good question

Relativ Path In Dynamicaly Loaded Movie
hi all
I have a mc (MC1) containing a number of objects wich all are placed dynamicaly in a position relative to each other. This works fine by it self.

The problem is that when I dynamicaly load MC1 into another MC (MC2) in the movie the positioning gets screwd. The problem seems to be that the relative paths used for positioning the objects within MC1 dosn't work when the MC1 is loaded dynamicaly into the MC2.

Anyone know whats happening? and how to avoid it?

Depth Problem With Dynamicaly Loaded Movies
I'm having trouble when trying to put movies that are created via action script into a particular depth

I have many layers, but have set an absolute background to a depth of -16384

then i want to load many movies on top of this dynamically (up to 10,000)
then everything else should go above this(non dynmic parts), Im not sure how to do this, I have tried:



Quote:




_root._depth = -1000;
_root.AbsBack_depth = -16384; // (lowest possible)
//bg_img_depth = -16282 and up
_root.usersURL_depth = -990;
_root.Lt_summ_depth = -980

while ( ((L-1)*(_root.Bg_Two._width)) < 400){
_root.Bg_Temp.duplicateMovieClip(["Bg_Two"+L], (-16282+L));
_root["Bg_Two"+(L)]._depth = (-16282+L);
_root["Bg_Two"+L].loadMovie("http://www.localtutor.co.uk/Tuition/"+localName+"/upload/Tutor_bg2.jpg?noCache="+new Date().getTime());
_root["Bg_Two"+L].gotoAndStop(0);
_root["Bg_Two"+L]._x = _root.Bg_Two._x + ((_root.Bg_Two._width)*L); _root["Bg_Two"+L]._y = _root.Bg_Two._y;
L++;}





but this doesnt seem to work, since "Bg_Two"+(L) seems to go ontop of every thing, hmmmm?

any ideas?

Simple Way To Put Dynamicaly Loaded Images Into Two Columns.
Last night i was browsing around looking for a simple way to take dynamicaly loaded images and organize them into to columns. There was a lot of methods, most were rather complicated. The other downfal is they weren't totaly dynamic. In many of them you were forced to specify the number of rows. That is annoying if the number of images will be changing.

I knew there had to be an easier way, so what I wrote was this. I hope it can help someone else out.



ActionScript Code:
//for this example, "i" is the specific number of the dynamicaly loaded image and "a" is just a variable for the movieclip that it is contained in.

//Check to see if i is even.
if (i%2 == 0) {

    //Set the x position of all the even images.
    a._x = 0;

    // Set the y position of every other image to be the hight of the previous, plus 5 pixels.
    a._y = (a._height*i/2)+5*i;

    //save the current y possition to a variable for use by the next image in the array.
    var cury = a._y;

//If "i" is not even...
} else {

   //set position of the second column.
   a._x = 195;

   //set y position to match the y position of the previous image in the array.
   a._y = cury;
}

Does Flash Slightly Blur Dynamicaly Loaded Images?
Hello,

I have noticed that Flash gives a little blur to the dynamically loaded images..
but I always thought that it came with the technology... (like the embedded fonts are also a bit blurry)...

But recently I've read somewhere that there were some settings for the images that could correct this problem...I am not sure if it came with flash8 or it always existed... or even if I misinterpreted the article that I can not find again....

did anyone notice the slight blur, any suggestions, experiences....?

Resize A Dynamicaly Loaded Image Of X Hieght And Width Any Idea
Resize a Dynamicaly Loaded Image of x hieght and width !!!! Any idea !!!!

Hi guys, i need ur head and hands

I need to resize a dynamicaly loaded image, keeping there aspect ratio, ... when the size of the image can be any thing

Like u load an image in an html frame and the image gets adjusted according to the frame with the same aspect ratio..

Any ideas ?

Resize A Dynamicaly Loaded Image Of X Hieght And Width Any Idea
Resize a Dynamicaly Loaded Image of x hieght and width !!!! Any idea !!!!

Hi guys, i need ur head and hands

I need to resize a dynamicaly loaded image, keeping there aspect ratio, ... when the size of the image can be any thing

Like u load an image in an html frame and the image gets adjusted according to the frame with the same aspect ratio..

Any ideas ?

Resize A Dynamicaly Loaded Image Of X Hieght And Width Any Idea
Resize a Dynamicaly Loaded Image of x hieght and width !!!! Any idea !!!!

Hi guys, i need ur head and hands

I need to resize a dynamicaly loaded image, keeping there aspect ratio, ... when the size of the image can be any thing

Like u load an image in an html frame and the image gets adjusted according to the frame with the same aspect ratio..

Any ideas ?

Open Email Client Through Link In Text-file Dynamicaly Loaded In Flash?
Hi,

My flash document contain a few buttons which open some movieclips and also a txt-file with an an address and an emailaddress.
The code that triggers the movieclips and the variables looks like this:



Code:
menu.btn1.onRelease = function() {
_root.container.unloadMovie();
loadMovie("textField.swf", _root.container);
loadVariables("geschiedenis.txt", "_root.container");
loadMovie("scrollerWat.swf", _root.lijn1.scroll_mc);
this._parent.activateItem (this);
};

Everything works like a charm but the thing is I want users to be able to click on the email address so they can sent me a mail.
Normally this isn't a problem in flash typing in the URL "mailto:" option but since I dynamicaly load a text into flash I don't know how to add this "mailto" function.

My text-file contains the following:


Code:
&content=

A de Busstop
P.O.box 3385
Westvilles

E info@westvilles.com
Does anyone know is this possible how to do this?
thank you for helping

Loading Dynamic Text... From A Dynamicaly Loaded Text?
Hi.

Is it possible to load another dynamic text within an already loaded text?

I'm trying to make a link from a textfield like:
"This is blabla... read more here" and while pressing the link another text is loaded in a seperate container.

Thank you for taking your time to answer...

Dynamicly Loading Text From Dynamicaly Loaded Text
I believe that is how i would phrase what im trying to do.

Here is the situation.

I have two data boxes. In one box i have dynamicly loaded text w/ scroller listing various items. In the other box i want those listed items to appear w/ scroller. How can i make it, so that, by clicking the items in box one, the text in box two appears. Almost a tellTarget type of thing. If i were using buttons i know how to do it. But since im using text, i cant figure out how to place the action script.

Any help or advice would be appreciated...

Thanx in advance..

Loading Dynamic Text... From A Dynamicaly Loaded Text?
Hi.

Is it possible to load another dynamic text within an already loaded text?

I'm trying to make a link from a textfield like:
"This is blabla... read more here" and while pressing the link another text is loaded in a seperate container.

Thank you for taking your time to answer...

Renaming MC's Dynamicaly. Best Way?
Hi,

I have the following code to dynamicaly rename MC's:

old_name = "_level0.butt_"+(c-1);
new_name = "butt_"+c;
setProperty(old_name,_name,new_name);

Now, "old_name" should be turned into(/evaluaded as) an expression, shouldn't it?

What's the way to do this? Is there a better way to rename MC's?

ThanX

cYa

Ivo

How To Access The Btn Dynamicaly
I created this simply code to generate menu:


PHP Code:




i = 0;
dist = 40;
for (i; i < 3; i++)
{
    attachMovie ("menuBtn", "menuBtn" + i, getNextHighestDepth (), {_x:50, _y:100 + (i * dist)});
}







Than I approach first btn with this code:

PHP Code:




menuBtn0.onRelease = function ()
{
    trace ("called");
};







Can I use insteade btn name menuBtn0 use some dynamic name?

I mean if I write access to btn with its name and than I generate instead 3 e.g 50 btns I need to rewrite the code for btn events.
I hope u understand what I mean.

Dynamicaly Positioning _mc's
I m loading in some _MC's using levels and I am running into some buizzare problems... first off If I load a .swf with loadmovie("WHATEVER", _levelwhateve) it does position itself where it is supposed to, but you can not see any onther movie symbols that I loaded in. If i use loadmovienum("whatever",2) it does not position itself like it is supposed to this mc has the code
stage.Align "TR";
inside it

I have putup the zip because it is proabably and easy problem to fix if youlok at it...
_DB

www.metajive.com/proto.zip
post it up again if you have a solutioin or e-mail it to daveb@metajve.com

Example Of Dynamicaly Loading XML Into An Ftree
Can anyone be kind enough to supply me with a very simple and short sample of an XML data file being loaded into an Ftree. (Really Simple)?

Image Loading Dynamicaly
Hi,

is it possible to load .jpg images dynamicaly through the loadMovie function like :

loadMovie("image.jpg");

I have tryed it with an MC, it loads something but I can't see my image.

THX

Loading Images Dynamicaly
Hi,

in my flashmovie I load my image dynamicaly.
I have a series of buttons on my page and when the users moves over them I show the image associated with that button.

I load the image in a MC.
Everythings works fine when you move over the buttons.
But when you move to fast over the buttons the images don't show anymore. When I load the same movie again, then they are back. But again when I move to fast over them they dissapear again. Never to be shown again, instead if I reload the movie.

Did anybody encountered this problem before and do you have a solution?

THX

Dynamicaly Crop A Movieclip
Hey guys!

Situation. I have a jpg in my movie. I need to create a movieclip from part of this jpg. In other, and maybe even more clumsy words: coordinates are loaded into my movie from the db and dynamicly creates a new movieclip from the jpg image.. this new mc shows a smaller part of the jpg.

(or sort of like the 'crop' function in image applications..)

Please let me know if the question was badly formulated.

Any help is appreciated.

Loading Sound Dynamicaly
Hello

I want to load sound dynamicaly. I have the .swf, .html and .mpc3 file in a same folder.

I have applied some action script in the first frame.

Here is the script:
s.loadSound( "music.mp3", true);

But it is not working. Shall I have to upload the files in a server and check it or it would work locally.

Or is there any error in the script.

Please help me with this.

Thanks
Salim

Dynamicaly Change Alpha?
Does anyone know how to dynamically change the alpha using actionscript?

DYnamicaly Load Sound
So here is my actionscript. When the movie begins to play it should load this sound to and begin playing it. Yet it does not. This was done in Flash 8 with actionscript 1.0

_root.soun = new Sound();
_root.soun.loadSound("flash/bkgsound.wav", true);
_root.soun.start(0, 300);
i = 100;

Im not sure what I am missing. Hopefully one of you guys can fill in the blanks.

Run Dynamicaly Generated Code
Has ActionScript can this?

e.g. PHP have function eval();. Eval() function in AS can be used only for setting value to variables.

AddListener To Dynamicaly Created MCs ?
Hello people, I have many dynamicaly created MovieClips, now to bind one function for onPress to MovieClips ?

I'm trying something like this

_root[_global.myIgra.items[id].mc_name].onPress = function() {
trace("click");
}

and I don't have nothing...
when I tried to do same with MC created in authoring enviroment, everything worked cool:

_root.bag1.onPress = function() {
trace("clikc");
}

Where myIgra.items[] is array of my item objects with string info of Movie Clip name

Arabic In Flash Through Xml - Dynamicaly
here is an example for all the people who need to put right to left languages in flash like arabic,persian and urdu etc.


http://creativeuae.wordpress.com/200...using-xml-css/

I made this small application by using xml and css styles.
all the text is coming from xml and i put the style in it too which are controlling the arabic text. By the way i used TextArea component.

If you need to put arabix text in textbox that is much easir if you need an example for that drop a line.

Load Images Dynamicaly
Hello,
i have one problem. I want to load an image (*.jpg) into flash movie from library, but I want to load it dynamicaly (depending on variable) and place it groupped with animated text.
If somebody understood what I told, please help

Dynamicaly Made Link
Howdy ... I have made this:
Main Timeline: _root.produkt = 2

on A Button:

on (release) {
_root.ergebnis = "_root.container.container" add _root.produkt;
_root.ergebnis.gotoAndPlay(5);
}

_root.ergebnis gives me _root.container.container2
but after making this link _root.ergebnis.gotoAndPlay(5);
doesnt bring me to _root.container.container2 and plays from Frame 5 !?
Any hintz? thanx in advance

ChromeD

Dynamicaly Loading Images
So I'm making a flash proggy that displays member details for a guild dynamicaly (calling their bio info from a database) and was wondering if it's possible to also call an image dynamicaly as well?

I know I could setup a PHP function to display a set image for each member, but that obviously means manualy placing in images and having to update the entire program each time I want to change a picture and thats obviously no good .. so is it possible for actionscript to call in images stored OUTSIDE of the flash program?

For example, I set where the image needs to be positioned and then use PHP to determine the URL and then pass the URL to the actionscript ... or something

Dynamicaly Loading SWF Problem
Okay , so I have a nav bar, right underneath is an empty MC called: bottomloader

In on button I have the following code;

ActionScript Code:
on (release){    _root.bottomloader.loadMovie ("bottommain.swf")}


When I click the button it loads ONLY the text of the external MC, nothing else, no shapes or graphics or nothing, just text! And only the main body text no even the titles!

thanks guys!

Dynamicaly Made Link
Howdy ... I have made this:
Main Timeline: _root.produkt = 2

on A Button:

on (release) {
_root.ergebnis = "_root.container.container" add _root.produkt;
_root.ergebnis.gotoAndPlay(5);
}

_root.ergebnis gives me _root.container.container2
but after making this link _root.ergebnis.gotoAndPlay(5);
doesnt bring me to _root.container.container2 and plays from Frame 5 !?
Any hintz? thanx in advance

ChromeD

Dynamicaly Choosing Objects
I'm having a little issue with calling objects dynamically. I think this is something that has always confused me as to why it doesn't work.

If I have objects declared such as :


Code:
var myTile_1:Object = new Object;
myTile_1.ID = "I am one tile";
Then, later in my app I want to be able to dynamically choose which object I want to call, so lets say I create another variable that will eventually have the object name in it:


Code:
var myID:String = this._parent.identify
where "this._parent.identify" essentially is equal to the "myTile_1"

So, why doesn't calling it like so seem to work:


Code:
trace(myID); //traces string as expected
trace("This is my tile" + [myID].ID);//gives me undefined
trace("This is my tile" + myID.ID);//gives me errors?
Thanks for the help. It's been a while it seems since I've done some flash stuff so I guess I'm rusty.

Dynamicaly Play Movieclip
Im working on an application where i can drag and drop an item (in a movieclip) onto a grid whihc works fine. What the problem is that i want to beable to rotate the current selected object 90 degrees, which i set up as a frame in the clip. when i click on the clip, it passes the itemID then i want to click on a button that will take in the itemID and play that frame to rotate it.

Here is the code:


PHP Code:





 on (release) {
    trace(_root.itemID);
    _root.itemID.gotoAndPlay(4);
    //_root.bike.gotoAndPlay(4);








the trace does indeed pass "bike" as the itemID and when i try to play _root.bike.gotoAndPlay(4);, this works fine. But, _root.itemID.gotoAndPlay(4); does not work at all. Any ideas?

Dynamicaly Reading Accessibility Tags
is there any way to dynamicaly read the accessibility tags on a button so that i can make a tooltip?

cheers
notty

Dynamicaly Reading Accessibility Tags
is there any way to read the accessibility tag of a button so that i can create tooltips on the fly?

cheers
notty

Dynamicaly Loading Buttons, And Scrolling
hi,

on 2a I saw, on their 'accolades' page that they have used MXL (or maybe something else) to load their accolades, and have placed each one in a button (or maybe its a movie clip), below the previus one - and then that entire 'thing' can be scrolled. If you don't understand go look at 2advanced, on the 'accolades' page.

How do I do this in Flash MX?

Width Of Dynamicaly Created Textbox
OK, I'm making a dynamicaly created menu for navigation. I have links comming in from a PHP script. They are loaded into a matrix or whatever and are placed on the scene. What I really need to do is distribute them over some space, but I have to know their width first. Because I call the createTextField method with width and height parameters I can only retreive them, but not the real width of my textbox. I even tryed creating them in the movieclip and retreiving a width of a movie clip but nothing. Take a look at a code:


Quote:





stop();
var menu = ["home", "profil", "users", "reservations", "catering"];

menuFormat = new TextFormat();
menuFormat.color = 0x000000;
menuFormat.font = "Arial CE";
menuFormat.size = 20;

for (i=0; i<menu.length; i++) {

duplicateMovieClip(_root.InsText, "MCmenu"+i, i);
}
//
for (i=0; i<menu.length; i++) {

_root["MCmenu"+i].createTextField("txt", 1, 100*i, 10,100,100);
_root["MCmenu"+i].txt.type = "static";
_root["MCmenu"+i].txt.selectable = false;
_root["MCmenu"+i].txt.text = menu[i];
_root["MCmenu"+i].txt.setTextFormat(menuFormat);
}
trace(_root.MCmenu1._width); // this line returns 100 and I want it to return the real width of my textbox.






If anyone know how to do this, please help.

Many thanks in advance.
Soniac


Quote:




Something sucks with this forum , for statements partialy erased so please ignore them, they are OK.

Preloader For Loading Image Dynamicaly
I have used load movie to load an image from a remote server. The problem is that the image is loading after some time.

Can I add a preloader so that the image appears after the preloader and not just white screen.

Please help!!
Salim

Preloader For Loading Image Dynamicaly
How can I make a preloader for loading image dynamically. I am using load movie to load a jpg file.

Thanking you
Salim

Embeding Fonts Dynamicaly ( Flash Mx)
I try to build a "business card" builder online. For this application I whould like to offer the posibility to choice few fonts. The questions is - is a way to load dinamicaly a single font (wen you need it) or I need to embed all fonts in a library....

I hope you can understand me.... For example if someone want Arial font the my main movie load a second movie with Arial font embeded, if want Courier then load a second movie with Courier font embeded...

Thanks,
Paul

How To Call This Menu Items Dynamicaly
i tried to make menu and now i dont know ho can i call the particular items of this menu and send on certain frame

thanks a lot for help!

Dynamicaly Loading Images Into Flash
I know you are all going to say this isnt possible but i have just this moment had a thought and wondered if anybody else has thought/tried this before.

Basicaly the idea is to load html content in the fom of <img> tags generated from php into flash. Would it be possible that this would work in a dynamic text box??? Just thinking!!!

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