Jump to content
Sign in to follow this  
Obi1-Cannabis

dynamicaly resize a movieclip...

Recommended Posts

hey!it's not that i don't want to use _xscale or _height :) ... but _xscale is not what i need because it works in percentage and i want fixed values, and since i have an image inside the movieclip if i try to use _height or _width it simply doesn't show up... is there any other way to resize a movieclip?please... i've been looking for this and i can't seem to find it...big up everyone!

Share this post


Link to post
Share on other sites

My advise is using loader to load your movie clip, using CreateEmptyMovieClip() usually gets some error about size, position ...The loader will help you better if you notice the background of your movie clip, it should be the same with the background that the loader is put on !!!

Share this post


Link to post
Share on other sites
My advise is using loader to load your movie clip, using CreateEmptyMovieClip() usually gets some error about size, position ...The loader will help you better if you notice the background of your movie clip, it should be the same with the background that the loader is put on !!!
heya smiles!if by loader you mean a MovieClipLoader, i tryed your idea right now and it does load the images, but it doesn't enter the onLoadComplete nor onLoadInit... i'am breaking myu head here...
a=0;vazio = false;xx = 139;while(!vazio){  if(foto[a] != null){	b=5-a;	vazio = false;	this.img = "img"+a;							var loadlistner:Object = new Object;	loadlistner.onLoadComplete = function(){	  trace("algo aconteceu");	}	loadlistner.onLoadInit = function(){	  trace("antes ou depois?");	}						var mcLoader:MovieClipLoader = new MovieClipLoader();mcLoader.addListener(loadlistener);this[val].createEmptyMovieClip (this.img, b);mcLoader.loadClip("http://cgseguros/imagem.php?id="+foto[a], this[val][img]);							xx+= 101;a++;}else{vazio = true;}}

Share this post


Link to post
Share on other sites

Hi Obi1, I think you are better with Action Script than me because the loader I meant is Loader Component 1.Drag the Loader component from the Components panel to the library. 2.Select the first frame in the main Timeline, open the Actions panel, and enter the following code:

this.createClassObject(mx.controls.Loader, "my_loader", 1);my_loader.contentPath = "http://.....";

3.Select Control > Test Movie. The Loader with specify width and height will scale your movie clip or image suitably !!!I had tried it with my site and it's good but never with .php :)

Share this post


Link to post
Share on other sites
this.createClassObject(mx.controls.Loader, "my_loader", 1);my_loader.contentPath = "http://.....";

...The Loader with specify width and height will scale your movie clip or image suitably !!!

that seems fine but _width and _height properties doesn't seem to work with the Loader, how am i suposed to set this?

Share this post


Link to post
Share on other sites

huf.. i've finally made it :) now i have another huge problem. when i call this .swf that i created inside another .fla, the properties that i've been working on, don't work, but if i open the swf alone it's perfect...man... i'm going crazy with this... :)

Share this post


Link to post
Share on other sites
huf.. i've finally made it :)
you scale it successful ?if your movie is rectangle, you put it in square, certainly it is distortedinspite of anything, you must have the suitable rate about height and width between loader and external moviehope I understand you right :)

Share this post


Link to post
Share on other sites
you scale it successful ?
see, scale is my problem. yes i scaled it successfuly (when i play it outside the other file) but when i import it or load it, the scale doesn't work. i didn't used the loader, though... i used the MovieClipLoader that you reminded me when you first talked about loader...tell me something about that loader, if i want to use it in only in frame 100 for example and it's for use inside an movieclip and not in the root, how can i acomplish that? :)

Share this post


Link to post
Share on other sites

Try to upload this file for youhttp://uploadhut.com/download/image.php/?file=381959.zip you will see inside it is 3 files : try.fla, aotrang.swf,try.swftry.swf using a loader component ( Windows>>Components>>You find Loader and drag into stage)notice the parameters that I set for loader (see in try.fla)I never put a loader component into a movie clip :) you can try it for yourself :)

Share this post


Link to post
Share on other sites

i found the problem with my code... i was using _root, so it gave me problems, all i needed was to assign specific objects to it to work.i'm going to try your loader, tough, just to see how it really works.big up! :)

Share this post


Link to post
Share on other sites
i found the problem with my code... i was using _root, so it gave me problems, all i needed was to assign specific objects to it to work.i'm going to try your loader, tough, just to see how it really works.big up! :)
I always believe you will success :) Have a nice day !!! ... now I have to pick up the New Year 's Day of my country :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...