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








HELP PLEASE - Correcting Image Proportions When Loaded Into A Target


I downloaded an image gallery template off flashkit. It is great except when your images load into the target, they distort to fit the rectangular shape of the target. Is there a way to get them to load in their original and correct proportions, so they are not distorted?
Note: the file was just a little too big to attach here...I don't know how to make it any smaller without compromising the template.

Thanks in advance...




FlashKit > Flash Help > Flash Newbies
Posted on: 11-20-2004, 09:02 PM


View Complete Forum Thread with Replies

Sponsored Links:

Constraining Proportions Of Loaded Images?
First, can someone enlighten me as to how to constrain an image proportions based on using either _width or _height using ActionScript. My users are uploading full-sized images which I then want load into a movie to display at a smaller size. I thought about scale but since that's a percentage the results will vary as images vary in dimensions.

Second, I was trying to come up with some logic to determine where the image is placed on the stage depending on if width is greater than height and vice-versa but can't get it to work.

Here is just a portion of my code:

HTML Code:
myListener.onLoadInit = function(photo5_mc:MovieClip) {
trace(photo5_mc._width);

if(photo5_mc._width >= photo5_mc._height){
photo5_mc._x = 70;
photo5_mc._y = 30;
}else{
photo5_mc._x = 108;
photo5_mc._y = 30;
}
//trace(photo5_mc._x);

}
Thanks for your help.
-Scott

View Replies !    View Related
Help With Basic AS Please - Dynamic Image Proportions
I am having trouble with a script that was purchased for a clients site, it draws thumbnails within a scroller component. I need the images to be aligned x and y axis differently based on whether they are portrait (29px H) or landscape (122px H). I have tried if and else statements to no avail :confused;

What currently sets layout of thumbs:

curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);


Start of code
//////////////////////

function createClip(i){
skin = "0";
var attachWhat:String = (useThumbnails=="true") ? "skin"+skin+"_thumbnail" : "skin"+skin+"_galItem";
thumbLoader.content.attachMovie(attachWhat,"gal"+i ,i);
var curMC:MovieClip = thumbLoader.content["gal"+i];
curMC._alpha=0;
if(useThumbnails=="true"){
var imageStuff:Array = String(myArray[i][0]).split("/");
var myThumb:String = curGalDir+"/thumbs/"+(imageStuff[imageStuff.length - 1]);
curMC.image_mc.loadMovie(myThumb);
var tmpMC:MovieClip = curMC._parent.createEmptyMovieClip("tmp"+i, i+10000);
tmpMC.onEnterFrame=function(){
if((curMC.image_mc.getBytesLoaded()==curMC.image_m c.getBytesTotal())&&curMC.image_mc.getBytesTotal() >50){
curMC.image_mc._x-=(curMC.image_mc._width/2);
curMC.image_mc._y-=(curMC.image_mc._height/2);
delete this.onEnterFrame;
}
}
}
curMC.current_mc._alpha=0;
curMC.i = i;
animateIn(curMC, 100, "_alpha", 30);
curMC.myImage=myArray[i][0];
curMC.i=i;
curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);
var colMax:Number = (useThumbnails=="true") ? columns_thumbs : columns_no_thumbs ;
if(myCol==colMax)myRow++;
myCol=(myCol<colMax)? myCol+1 : 0;
curMC.onRollOver=function() {
if(galEnabled!=0)animateIn(this.btn1_mc, 15, "frame", 15);
}
curMC.onRollOut=function() {
if(galEnabled!=0)animateOut(this.btn1_mc, 0, "frame", 15);
}
curMC.onRelease=function(){
if(galEnabled!=0){
picClick=1;
if(currentMC!=this){
animateOut(currentMC.current_mc, 0, "_alpha", 30);
currentMC=this;
animateIn(currentMC.current_mc, 100, "_alpha", 30);
}
whichPic = this.i;
setFrame();
this.photoSelected1_mc._visible = true;
animateIn(this.photoSelected1_mc, 100, "_alpha", 15);
}
}
if(i==myLength-1){
galleryCombo.enabled=true;
setFrame();
var galleryWait_int=setInterval(checkWait, 500);
}
thumbLoader.size();
clearInterval(gallery["myInt"+i]);
}

View Replies !    View Related
Help With Basic AS Please - Dynamic Image Proportions
I am having trouble with a script that was purchased for a clients site, it draws thumbnails within a scroller component. I need the images to be aligned x and y axis differently based on whether they are portrait (29px H) or landscape (122px H). I have tried if and else statements to no avail :confused;

What currently sets layout of thumbs:

curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);


Start of code
//////////////////////

function createClip(i){
skin = "0";
var attachWhat:String = (useThumbnails=="true") ? "skin"+skin+"_thumbnail" : "skin"+skin+"_galItem";
thumbLoader.content.attachMovie(attachWhat,"gal"+i ,i);
var curMC:MovieClip = thumbLoader.content["gal"+i];
curMC._alpha=0;
if(useThumbnails=="true"){
var imageStuff:Array = String(myArray[i][0]).split("/");
var myThumb:String = curGalDir+"/thumbs/"+(imageStuff[imageStuff.length - 1]);
curMC.image_mc.loadMovie(myThumb);
var tmpMC:MovieClip = curMC._parent.createEmptyMovieClip("tmp"+i, i+10000);
tmpMC.onEnterFrame=function(){
if((curMC.image_mc.getBytesLoaded()==curMC.image_m c.getBytesTotal())&&curMC.image_mc.getBytesTotal() >50){
curMC.image_mc._x-=(curMC.image_mc._width/2);
curMC.image_mc._y-=(curMC.image_mc._height/2);
delete this.onEnterFrame;
}
}
}
curMC.current_mc._alpha=0;
curMC.i = i;
animateIn(curMC, 100, "_alpha", 30);
curMC.myImage=myArray[i][0];
curMC.i=i;
curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);
var colMax:Number = (useThumbnails=="true") ? columns_thumbs : columns_no_thumbs ;
if(myCol==colMax)myRow++;
myCol=(myCol<colMax)? myCol+1 : 0;
curMC.onRollOver=function() {
if(galEnabled!=0)animateIn(this.btn1_mc, 15, "frame", 15);
}
curMC.onRollOut=function() {
if(galEnabled!=0)animateOut(this.btn1_mc, 0, "frame", 15);
}
curMC.onRelease=function(){
if(galEnabled!=0){
picClick=1;
if(currentMC!=this){
animateOut(currentMC.current_mc, 0, "_alpha", 30);
currentMC=this;
animateIn(currentMC.current_mc, 100, "_alpha", 30);
}
whichPic = this.i;
setFrame();
this.photoSelected1_mc._visible = true;
animateIn(this.photoSelected1_mc, 100, "_alpha", 15);
}
}
if(i==myLength-1){
galleryCombo.enabled=true;
setFrame();
var galleryWait_int=setInterval(checkWait, 500);
}
thumbLoader.size();
clearInterval(gallery["myInt"+i]);
}

View Replies !    View Related
Help With Basic AS Please - Dynamic Image Proportions
I am having trouble with a script that was purchased for a clients site, it draws thumbnails within a scroller component. I need the images to be aligned x and y axis differently based on whether they are portrait (29px H) or landscape (122px H). I have tried if and else statements to no avail :confused;

What currently sets layout of thumbs:

curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);


Start of code
//////////////////////

function createClip(i){
skin = "0";
var attachWhat:String = (useThumbnails=="true") ? "skin"+skin+"_thumbnail" : "skin"+skin+"_galItem";
thumbLoader.content.attachMovie(attachWhat,"gal"+i ,i);
var curMC:MovieClip = thumbLoader.content["gal"+i];
curMC._alpha=0;
if(useThumbnails=="true"){
var imageStuff:Array = String(myArray[i][0]).split("/");
var myThumb:String = curGalDir+"/thumbs/"+(imageStuff[imageStuff.length - 1]);
curMC.image_mc.loadMovie(myThumb);
var tmpMC:MovieClip = curMC._parent.createEmptyMovieClip("tmp"+i, i+10000);
tmpMC.onEnterFrame=function(){
if((curMC.image_mc.getBytesLoaded()==curMC.image_m c.getBytesTotal())&&curMC.image_mc.getBytesTotal() >50){
curMC.image_mc._x-=(curMC.image_mc._width/2);
curMC.image_mc._y-=(curMC.image_mc._height/2);
delete this.onEnterFrame;
}
}
}
curMC.current_mc._alpha=0;
curMC.i = i;
animateIn(curMC, 100, "_alpha", 30);
curMC.myImage=myArray[i][0];
curMC.i=i;
curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);
var colMax:Number = (useThumbnails=="true") ? columns_thumbs : columns_no_thumbs ;
if(myCol==colMax)myRow++;
myCol=(myCol<colMax)? myCol+1 : 0;
curMC.onRollOver=function() {
if(galEnabled!=0)animateIn(this.btn1_mc, 15, "frame", 15);
}
curMC.onRollOut=function() {
if(galEnabled!=0)animateOut(this.btn1_mc, 0, "frame", 15);
}
curMC.onRelease=function(){
if(galEnabled!=0){
picClick=1;
if(currentMC!=this){
animateOut(currentMC.current_mc, 0, "_alpha", 30);
currentMC=this;
animateIn(currentMC.current_mc, 100, "_alpha", 30);
}
whichPic = this.i;
setFrame();
this.photoSelected1_mc._visible = true;
animateIn(this.photoSelected1_mc, 100, "_alpha", 15);
}
}
if(i==myLength-1){
galleryCombo.enabled=true;
setFrame();
var galleryWait_int=setInterval(checkWait, 500);
}
thumbLoader.size();
clearInterval(gallery["myInt"+i]);
}

View Replies !    View Related
Help With Basic AS Please - Dynamic Image Proportions
I am having trouble with a script that was purchased for a clients site, it draws thumbnails within a scroller component. I need the images to be aligned x and y axis differently based on whether they are portrait (29px H) or landscape (122px H). I have tried if and else statements to no avail :confused;

What currently sets layout of thumbs:

curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);


Start of code
//////////////////////

function createClip(i){
skin = "0";
var attachWhat:String = (useThumbnails=="true") ? "skin"+skin+"_thumbnail" : "skin"+skin+"_galItem";
thumbLoader.content.attachMovie(attachWhat,"gal"+i ,i);
var curMC:MovieClip = thumbLoader.content["gal"+i];
curMC._alpha=0;
if(useThumbnails=="true"){
var imageStuff:Array = String(myArray[i][0]).split("/");
var myThumb:String = curGalDir+"/thumbs/"+(imageStuff[imageStuff.length - 1]);
curMC.image_mc.loadMovie(myThumb);
var tmpMC:MovieClip = curMC._parent.createEmptyMovieClip("tmp"+i, i+10000);
tmpMC.onEnterFrame=function(){
if((curMC.image_mc.getBytesLoaded()==curMC.image_m c.getBytesTotal())&&curMC.image_mc.getBytesTotal() >50){
curMC.image_mc._x-=(curMC.image_mc._width/2);
curMC.image_mc._y-=(curMC.image_mc._height/2);
delete this.onEnterFrame;
}
}
}
curMC.current_mc._alpha=0;
curMC.i = i;
animateIn(curMC, 100, "_alpha", 30);
curMC.myImage=myArray[i][0];
curMC.i=i;
curMC._x=myCol*(curMC._width+50);
curMC._y=myRow*(curMC._height+80);
var colMax:Number = (useThumbnails=="true") ? columns_thumbs : columns_no_thumbs ;
if(myCol==colMax)myRow++;
myCol=(myCol<colMax)? myCol+1 : 0;
curMC.onRollOver=function() {
if(galEnabled!=0)animateIn(this.btn1_mc, 15, "frame", 15);
}
curMC.onRollOut=function() {
if(galEnabled!=0)animateOut(this.btn1_mc, 0, "frame", 15);
}
curMC.onRelease=function(){
if(galEnabled!=0){
picClick=1;
if(currentMC!=this){
animateOut(currentMC.current_mc, 0, "_alpha", 30);
currentMC=this;
animateIn(currentMC.current_mc, 100, "_alpha", 30);
}
whichPic = this.i;
setFrame();
this.photoSelected1_mc._visible = true;
animateIn(this.photoSelected1_mc, 100, "_alpha", 15);
}
}
if(i==myLength-1){
galleryCombo.enabled=true;
setFrame();
var galleryWait_int=setInterval(checkWait, 500);
}
thumbLoader.size();
clearInterval(gallery["myInt"+i]);
}

View Replies !    View Related
XML - Resizing Dynamic Image Whilst Maintaining Proportions
Hi,

I have an issue with dynamically loading a picture into Flash from an XML file. What I want to happen is for the image (defined in my xml) to load into a text box or mc with a max height of say 100 px whilst maintaining its proportions. I have looked through other threads and found related topics but can't really make sense of them.

Any help would be gratefully received!

Cheers,

Ben

View Replies !    View Related
Loaded External Image Question: Use Default Image If Loaded Image Not Found?
Hello,

I use the following code to load an external logo into a Flash Movie.

Quote:




var myRequest:URLRequest=new URLRequest(logoPath);
var loader:Loader = new Loader();
loader.load(myRequest);
holder_mc.addChild(loader);




What if the logo file is not find? I wish that if the logo is not found, another default logo will be used, i.e.

if (logoPath is here) {
var myRequest:URLRequest=new URLRequest(logoPath);
} else (logoPath is not here) {
var myRequest:URLRequest=new URLRequest("defaultlogo.png");
}

How can I do that?

Thanks and best regards

Alex

View Replies !    View Related
Correcting The Size
Iam sure there is a simple way do this that iam missing but anyways how can I get my flash site to be centered in the IE where there are no scroll bars or anything? Every time I have to mess around with the scroll bars to get it to fit.

View Replies !    View Related
Correcting Actionscript 3.0 Coding
Hi
Can anyone help me here, on how to correct my coding?
because they keep telling me that my code is wrong
but i can't figure out what


stop();
oneB.addEventListener(MouseEvent.MOUSE_DOWN,mouseD ownHandler31);
function mouseDownHandler31(event:MouseEvent):void {
function _root.answer1.text = "Wrong Answer ";

}

What my code is meant to lead to is to link a button to a dynamic text.

View Replies !    View Related
Correcting Flash5 To Flash Mx Problem
Hey,
Thanks before hand for viewing my post or anwering it. My question is recently I have swiched from flash 5 to flash mx, before in flash 5 when I tested out the movie it filled the whole screen and it was ok, now in flash mx it is really small you can hardly read the letters when I test the movie. How do I make it so that it fits the screen, not by adjusting the 500x400 pixels default, because I would have to adjust it frame by frame everything. Thank you,
Beatles22

View Replies !    View Related
Need AS Correcting Help For GetURL Hittest - Not Very Long AS
Okay, let me explain this in a little more detail, yes I am new to actionscript and need people to explain in step by step form for me to understand what is being taught. If anyone will bare with me as I explain my problem in detail I will explain with the same care aswell.
First I made a rpg for a website and to add some fun to it I decided to make the contact in the game in a form of a post office, since the world within the character lives is so vasly hugh.
Next the root hero is my moveable character.
Hero is a movieclip along with the post office.
I want a email pop up or as reffered to in HTML, a mailto to display within the game itself.
The pop up should only occur when the hero moves within the hittest area of the post office.
I don't want people to have to click on the post office and it should only happen when you come within the hittest area.


Messed up code:


onClipEvent (enterFrame) {
if (hitTest(_root.hero) {
getURL("mailto:somename@yahoo.com", "_self");
}


This doesn't seem to work but, maybe someone can help me out. I have been trying to add this to the post office actions by the way.
I give credit where credit is do so by helping me I'll add you to the credits. The game is done and this is just extra feats but, very important to me.

View Replies !    View Related
Correcting A Couple Syntax Errors
Hi I am currently attempting to make a preloader by following the tutorial on here entitled "Creating an Advanced Preloader in Flash" by Programming Art.Everything was going fine until I tried to paste this actionscript into my movie:
code:
loadPercent = (Math.floor (_root.getBytesLoaded() / _root.getBytesTotal() *100) + "%");
loadBytes = (Math.round((_root.getBytesLoaded()) / 1024) * 1000) / 1000 + " Kb;
of " + Math.round((_root.getBytesTotal() / 1024 * 1000) / 1000 + " Kb total Loaded.")
And the syntax checker popped up saying:

Scene=Preloader, Layer=Actions, Frame=2: Line 2: String literal was not properly terminated
loadBytes = (Math.round((_root.getBytesLoaded()) / 1024) * 1000) / 1000 + " Kb;

Scene=Preloader, Layer=Actions, Frame=2: Line 3: ';' expected
of ;" + Math.round((_root.getBytesTotal() / 1024 * 1000) / 1000 + " Kb total Loaded.")

Actionscript is fairly new to me so I am having trouble fixing this problem. Can someone please tell me how to correct the errors? Thank you.

View Replies !    View Related
Perspective Correcting Zoom (throught Scale) In Flash.
I am trying to take a large image behind a matte and move the image aound so it looks like a camera viewfiner. The problem I run in to is when zooming. The movement and focus controls were easy enough, but I now have problems when trying to zoom. I simulate zooming by scaling the image, but because I scale based on the image center rather than the matte center, the image gets moved sideways. I wanted to know if anyone knew how to counteract that. Thanks.

View Replies !    View Related
Correcting Pixel Aspect Ratio With Publish Settings
Same old, I know. I'm designing and producing a Flash site using a Mac, but it will be viewed on a large touchscreen (1366x768) driven by a PC. The vectors look fine when going from the Mac 1.1 pixel aspect ratio to the Windows 1.0 display, but the photos look degraded and squashed vertically. Could I fix with the Publish settings ... such as html- publish at 100% width, 99% height? I can't test easily because my pc's have such fuzzy old displays, I can't see a thing. Flying blind. The only time I see how awful it looks on a good PC display is when I review the work to the client on the client's own PC...ouch.

View Replies !    View Related
Tell Target A Loaded Swf?
Anyone know of a way to communicate with a loaded swf? I need to tell the loaded swf to proceed to it's next frame at a certain point.

Any help would be excellent!!

View Replies !    View Related
How Do I Target A Loaded Swf?
This is the code I am using to load an external swf into my movie -

loadMovie("equipment.swf", "load_equipment");

load_equipment is an empty movie clip. How do I target equipment.swf in my main movie?

View Replies !    View Related
AS3 : How To Target Sub-MC Of Loaded .swf?
Hey everyone. I'm new to AS3 and very... very lost (Last time I did much with flash was Flash 5).

Short version: I'm trying to load an external .swf from a URL and add event handlers to the movie clips (or it's movie clips sub-MCs) on its stage. I can't find a THING online on how to do this.

Details:

I've been tasked by my employer to build a simple control interface in flash, with just a few buttons to do things like display some info or images or maybe an associated MP3. I've written little test apps to do all of these individual things & managed to fake my way through.

But the sticking point is that I'm now trying to place all the UI controls into an external .swf, which I then load into the canvas by a URL. The goal is to be able to load it into a variable named, say, 'private _ui:MovieClip' and then add event handlers to mivie clips within that by name like:

_ui.someButton1.addEventListener(MouseEvent.MOUSE_ UP, handlerFunction1);
_ui.controlStrip.someButton2.addEventListener(Mous eEvent.MOUSE_UP, handlerFunction2);

The goal is that if we want to swap out the UI for a particular client, we just export a new .swf with all the correctly named MC instances & use the new URL to load the UI.

I seem to be able to load the .swf OK and trace the movie clips "Main Timeline" like so:

_ui2.contentLoaderInfo.addEventListener(Event.COMP LETE , uiDidLoad);
function uiDidLoad(evt:Event){
trace("UI2 LOADED");
if(_ui2.content){
addChild(_ui2);
trace(_ui2.content); //--> [object MovieClip]
// Target the "ControlStrip" named instance on the loaded .swf's main timeline
trace(_ui2.content.controlStrip); //--> ERROR
}
}

Can anyone point me in the right direction here? I've spent hours making no headway on this. I think I've read half of adobe's website so far. :-(

- Cliff

View Replies !    View Related
To Target A Scene In A Loaded Swf
hey guys..i read all the messages above and feel that there's a lot of u who are knowledgeable on the subject, can neone help me out?

i got some solutions about loading a swf into an MC and then going to a frame label.
it works fine

but how do i go to a frame label on a scene other than the first?
what i want to do is to let the user continue from where he left off by tracking his clicks and storing in database. and then when he comes back he gets a link to his last viewed frame. i plan to assign frame labels and then call them from variables by making the user click on a button with the foll action

- on frame 1 of the parent movie i have:
##
lastmodule = "module2.swf";
lastframe = "Overview1";
##
- on the button the user clicks i have:
##
on (release) {
loadMovie (aa, "_root.callerMC");
gotoAndPlay (2);
}
##
- and on frame 2 i have (for the waiting peroid as some of u have rightly pointed out):
##
_root.callerMC.gotoAndStop(_root.bb);
stop ();
##

Now, if framelabel "Overview1" is in scene 1, it works, but not if it's in a subsequent scene.

flash requires u to enter scene name as a quoted string and not a variable, but the frame label can be a variable as i have done above.

i need to know if we can, in the above setup assign the scene name as a variable as well so that i will keep it in my database and send it to flash along with the last swfname and last frame label.

i'll be really grateful guys if u can provide a soln to this, cuz otherwise i will have to make some huge modules in one single scene!

thanks,
Sammy

View Replies !    View Related
Using Tell Target On A Loaded Movie
I used load movie to load a swf onto level2 and i want to go to a particular scene in the movie that i loaded by clickin on a button from my originl movie which is on level0.. how do i do that??

all help will be greatly appreciated

View Replies !    View Related
Tell Target Not Working When Loaded
Movie A has a button that loads movie B into a target.
Movie B has buttons with tell target actions that function properly .
When movie B is playing in Movie A the tell target actions of movie B do not function.....?????
confused...

View Replies !    View Related
Tell Target From A Loaded Movie...please
Hi all, well.. I have a movie called demo.swf and it loads a movie into called sound.swf. The movie loaded had a button that play the soud of it. I'm trying to make a action in th frame.
Something like this.

tellTarget ("_level1.targetsom") {
gotoAndPlay("Scene 1", 3);
}

But it doenst work.!!

Whats the problem???
Thank you very much....

Luciano Loffi
..

View Replies !    View Related
How To Test If A Swf Is Or Isn't Loaded In Target Mc?
Hi all,

I have serveral buttons loading different swf's in the same mc.
The swf's have an "opening" and "closing" animation.

Ofcourse I want to see the closing animation before I load the next movie (with opening animation)..
but sometimes there is NO SWF in the target mc, so that means I don't want to see the "closing" animation first!

How do I controll such a thing?

I've tried the actions

on (release) {
movie.gotoAndPlay("out");
loadMovie("intro.swf", "movie");
}

But that doesn't work, it loads the next movie to soon, and you will always see the closing animation first.

Then I tried:

on (release) {
if (movie.getBytesTotal > 0) {
}
movie.gotoAndPlay("out");
}

But that doesn't work either.. and still I have to load the next movie!

Does anyone know how to solve this problem?

View Replies !    View Related
Target A Frame In A Mc From A Loaded Swf - HELP
Can you target (go to and play) a specific frame in a movieclip in a swf (level 1) from a loaded swf (level 3)? Please help!

View Replies !    View Related
Communicate To A Loaded .swf At A Target.
Hello all,

I have a .swf movie loaded at a placeHolder_mc. I want to be able to tell the loaded movie at placeHolder_mc to play when a user pushes a button (on the _root timeline). I can't figure out how to target the clip.
************************************************** ********************
Better explaination:

maintimeline.---->placeHolder_mc
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; |
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; |
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; clip.swf( this is what I want access to.)

hows do you "talk" to the loaded .swf?
************************************************** *********************
I hope I have been clear.

Thank you.

View Replies !    View Related
How To Target The Playhead Of A Loaded Swf? Help
I know the solution is right in front of me but I'm still missing it...

I'm loading a swf into a container clip and I'd like to target this swf for control such as gotoAndPlay, etc.

I thought targeting the container clip would do it but it's not. Here's my script so far:

var mediaMenu:MovieClip = this.createEmptyMovieClip("mediaMenuHolder", 1);
mediaMenu._x = 15;
mediaMenu._y = 175;
var mediaMenuLoader:MovieClipLoader = new MovieClipLoader();
mediaMenuLoader.loadClip("mediaMenu.swf", "mediaMenuHolder");
this.mediaMenuHolder.gotoAndPlay(2);

The swf is loading but I can't seem to give it any instructions.

Any advice on how to do this?

thanks!

View Replies !    View Related
Loaded SWF/MC Target Problem
Hey Folks,

I should know this by now, and I've read the tutes, but I can't seem to make it work, please help

I'm loading an swf into an MC that's in my Main movie's timeline.

This swf houses an MC; actually, the swf is an mc.

From this mc I want to target a labled frame in my Main movie's timeline.


on the mc in the swf I've tried all the following


Code:
on (release){
_root.gotoAndStop(bn);
_root._root.gotoAndStop(bn);
_parent._root.gotoAndStop(bn);
_root._parent.gotoAndStop(bn);
_parent._parent.gotoAndStop(bn);
}
I'm out of option, PLEASE HELP


Peace,
Jose Antonio

View Replies !    View Related
How To Target The Playhead Of A Loaded Swf? Help
I know the solution is right in front of me but I'm still missing it...

I'm loading a swf into a container clip and I'd like to target this swf for control such as gotoAndPlay, etc.

I thought targeting the container clip would do it but it's not. Here's my script so far:

var mediaMenu:MovieClip = this.createEmptyMovieClip("mediaMenuHolder", 1);
mediaMenu._x = 15;
mediaMenu._y = 175;
var mediaMenuLoader:MovieClipLoader = new MovieClipLoader();
mediaMenuLoader.loadClip("mediaMenu.swf", "mediaMenuHolder");
this.mediaMenuHolder.gotoAndPlay(2);

The swf is loading but I can't seem to give it any instructions.

Any advice on how to do this?

thanks!

View Replies !    View Related
Target Loaded Swf Timeline...
I'm trying to target, from a button, the timeline of a loaded swf. Here's sort of a rundown of the structure...

the swf files are loaded from an xml file.
the buttons are also created from the xml file.
there's an imageHolder on the main stage.
the swf files are first preloaded into a preloadHolder.
They are then attached to an "image" holder within an "imageBox" movieclip. This is then attached to the imageHolder.

From the buttons created, onRollOver (function rOver), I would like to target the loaded swf timeline to just gotoAndStop frame("b") and onRollOut (function rOut), to go back to frame("a"). How would I write this?

Thanks for any help.

Button code:
ActionScript Code:
function rOver(){
for(i = 0; i<imageTotal; i++){
_root.imageHolder["imageBox"+ this.rID].image.gotoAndStop("b"); //<<<----------------??????
trace(_root.imageHolder["imageBox"+this.rID]);
}
}

function rOut(){
for(i = 0; i<imageTotal; i++){
_root.imageHolder["imageBox"+ this.rID].image.gotoAndStop("a"); //<<<----------------??????
//trace(_root.imageHolder["imageBox"+ this.rID]);
}
}

View Replies !    View Related
Target Issue - Loaded MC
hey there,

i am stuck - its seems so easy, but i can't figure it out.

I have 2 swf's. swf two loads into a movieclip in swf one. swf two then loads variables into itself. Here s the code i am using.



ActionScript Code:
loadVariables("storeinfo.cfm?storeid="+storeid, this, "POST");


it is not working at all.

any ideas - thanks

View Replies !    View Related
Unable To Target Loaded Swf In MC
I was wondering if somebody could shed some light on this for me. I have attached a .zip with the files used. I am loading an swf file into a created MC. Then I am trying to reference a movie clip contained within the loaded swf. When I look at the path in debug it shows _level0.test_mc.instance1.button1. I can reference it using this but the instance# changes depending on when you click the button that loads the swf in my larger movie. I have instance names assigned for all the movie clips involved, but I dont know what the instance1 is referring to. Any help will be appreciated.

View Replies !    View Related
Mx2004 Cuts Loaded Image Borders - Image Format Problem?
hi mates

i know i didnt post here quite a long time (wasnt programming quite a long time too), and since i know this forum to be very helpful, i am back with one irritating problem.

i have some jpgs, all contents seem to be ok, and wanna load and rescale them (rescaling would work, thats not the problem). it seems my pictures have some format error, but i cant find it

they dont seem to get displayed completely. or better, their contents dont. that means, the content is displayed in a certain area, but not outside of it, although the image is fully loaded (at least getBytesTotal tells me so). i made a small file to test the picture loading, and it shows the same error as my real clip does.

- no, theres no mask applied
- no, the jpgs are no progressive types
- yes, i tried using baseline optimization, standard baseline, and different compressions.
- yes, when displaying the jpgs with any other tool than
- when inserting one of the pics to the stage in developing and then exporting it being inside the swf, it is displayed correctly
- btw, the pics are quite big (about 3000*2000px/300-700kB) for being able to zoom.

another issue i am noticing is that some areas inside the displayed area of the jpg are not displayed instantly when the jpg is displayed, and fadein (alpha) effects of other clips in front of these areas cause much more cpu load than they should.

anyone ever seen this problem? or anyone having an idea how to solve this one?

thx for reading, greets

self

View Replies !    View Related
Actionscript Fails When Loaded To A Target
I have a feedback form in a swf loaded to a target in my main movie. It contains a 2 frame MC that acts as a checkbox. The actionscript that controls this 'checkbox MC' is:-

on (release) {
Options = Options add "Interactive solutions" add ", ";
tellTarget ("/MCOption6") {
gotoAndStop (2);
}
}

View Replies !    View Related
Preloader In A Called Swf Loaded In A Target
i have a main movie that consists of a target called 'hold'
when a swf gets loaded into the 'hold' target it should have a preload:

now in each swf that is being loaded I have a mc with 2 frames:

frame1:

Code:
txtPercentage = Math.round((_root.hold.getBytesLoaded()/_root.hold.getBytesTotal())*100) add "%";
tellTarget ("loader") {
gotoAndPlay (Math.round((_root.hold.getBytesLoaded()/_root.hold.getBytesTotal())*100));
}

frame2:

Code:
if (_root.hold.getBytesLoaded() == _root.hold.getBytesTotal()) {
gotoAndPlay (8);
} else {
gotoAndPlay (7);
}


is this right? my machine goes too fast and i can't tell, and it doesn't seem to play streaming when a called movie is being loaded (besides the root). originally i just had it check the _root but then i changed it because it isn't actually checking the _root movie because that is the main movie that is already loaded.

thanks for the help

View Replies !    View Related
Tell Target Not Working In Loaded Movie
I've got one movie as my interface and I've got others loading on top of it.

I've got a little drag n drop game in one of the loaded movies which works fine on it's own, but when loaded the things will drag (and snap back) as told, but won't stay when dropped on their target. Is this something to do with Tell Target and Load Movie?! I have looked at the Macromedia technote but it doesn't answer my problem.

Also my loaded movie has a movie clip in it which seems to run twice as fast as it normally does. What am I missing?

This is my first go with Load Movie - please help!

View Replies !    View Related
Tell Target To Loaded Movie Timeline?
I understand I can target a movieclip in a loaded movie (level) by the instance name of that given MC. But what if I want to trigger by Tell Target the timeline of a loaded movie.
Can somebody please help me with this, maybe this is so basic but this is the newbies section right, so forgive me.
Thanks

View Replies !    View Related
Target Main Timeline From A Loaded SWF
I'm trying to target an MC on the main timeline from a loaded SWF. How is this done? "_root.mcName" doesn't seem to be working. Is this not possible? When the SWF is loaded into the main movie. The SWFs timeline is "_parent", and I thought "_root" would be used for the main movie timeline.

?????

View Replies !    View Related
Target Main Scene From Loaded In .swf
hello,
I have loaded a .swf into my mainframe, using Loadmovienum(target)
i know have a button in this new .swf, and i want it to tell the Main scene to go and stop frame 4.
Can i do this, if so how?
Thnx

View Replies !    View Related
Loaded Movies, Different Levels, Same Target
SOS
This may be silly or perhaps it can’t be done…
The question:
How can I trigger an instance of a MC which is located in the main movie (level 0) to go to another frame? I need to do this from a button placed in MC loaded into another level. What a hassle!
Please do help me, I’m having a terrible time with this issue!
Regards form Chile
Flash Dummy

View Replies !    View Related
Scrollbar Does Not Work When Loaded Into Target
Hey guys!

Okay, I have a scrolling text file that is four frames long. It works great when opened up by itself. No problems.

I have a one frame main file that loads the scrolling text file into a target. It loads the file, but the scroll bar does not work! I've tried several different things like increasing the frames in the main file but nothing seems to work. I've ran out of ideas to try.

PLEASE HELP!

View Replies !    View Related
Scrollbar Does Not Work When Loaded Into Target
Hey guys!

Okay, I have a scrolling text file that is four frames long. It works great when opened up by itself. No problems.

I have a one frame main file that loads the scrolling text file into a target. It loads the file, but the scroll bar does not work! I've tried several different things like increasing the frames in the main file but nothing seems to work. I've ran out of ideas to try.

PLEASE HELP!

View Replies !    View Related
Load .swf Into Target In .swf Already Loaded Into Level
MainMovie loads movieA.swf into level 5
movieA.swf has a target in it "target5"
I'm tying to load movieB.swf into target 5.
I'm trying:
_root.movieA.loadMovie("movieB.swf","target5")

also:
loadMovie("movieB.swf","target5")

no luck with either.

please help.
B

View Replies !    View Related
Target Sound Object From Loaded .swf
Here's a fun one...

I have a long movie/presentation using an attached mc as an soundtrack...

frame 1 script:

attachMovie("bgloop", "daloop", 2);
mainlp = new Sound("daloop");
mainlp.start(0,50);
mainlp.setVolume(80);

now this works fine...the soundtrack plays independently of anything else going on...

now these presentations are 800x600 and I need to integrate them into another movie that is 640x480 (for a video)...so I'm calling it into a mc instance "sym" in the 640x480 movie

frame 1 script:

stop();
loadMovie("800x600.swf", "sym");

...then resizing with

onClipEvent(data){
this._xscale=80;
this._yscale=80;
}


ok...loads, scales...music plays but no control...it seems to be ignoring the sound object...

This appears to be a targeting issue, but I've tried all manner of targeting from the main timeline and it's not responding...I'm chasing my tail a bit here so if anyone help with the right syntax I'd appreciate it...

thanks in advance

View Replies !    View Related
Loaded Text Target Problem
I am building a site with multiple movieclips. Each of these MC's will have externally Loaded Text files, to be displayed in dynamic text boxes as a variable. I have done this a few times in single SWF sites, and always works well.

So my external SWF loads the txt file fine by it self, but once I load that SWF into the main page, it stops loading the text.

Here is the main page: (click on "about 242" to see the page I am having a problem with)

http://www.242online.com/test/


here is the SWF that gets loaded in:
http://www.242online.com/test/subpages/aboutcontent.swf

the text that gets loaded in:
http://www.242online.com/text/about242.txt



so you can see the SWF by itself works. so I know it is an issue with the target. I just have no idea how to fix it.

Anyone know an easy fix? I need to basicly do the same system on 4 other pages for this site. I need the text to be loaded in externally for easy updating/editing.

Thanks!

View Replies !    View Related
Buttons Won't Work When Loaded Into A Target
hey guys... another question.

i have chose to make my website by loading external swfs into a target ( i was told that this is pretty much the same as having them load on different layers but will be able to have more control) The problem i am having is that when i load an swf into the target the movieclips (which i made as buttons using the "this.onPress" commands won't work. when i load them onto a layer instead of using the target they work fine. what am i doing wrong when loading it in to the target??

View Replies !    View Related
[MX] Cannot Find Target Within A Loaded Movie
hey all!

a newbie here on the flahkit forum, but not too much to flash,
usually more basic ActionScripting.

aight, got a lil problem.

i have a SWF with a scrolling MC in it, scroll buttons and another
empty MC to control the scroll with action-script.

when i run the file on itself it's perfect.
but when i load it into the main SWF, it cannot find the target.


what is the correct way to address targets when the swf will be played
in another SWF?

currently i think it's relative, all of them.

the buttons adrees the empty MC which in turn influence the scrollin MC.
at first it couldn't find the first M, then got it work only to find
it cannot find the 2nd MC.


appreciate the help!

View Replies !    View Related
How Can I Target This MovieClip That I Loaded Onto The Stage?
I'm trying to target a .swf that I loaded into a movie clip (mc_container) but it seems like I'm missing something. Can you take a look and see where I went wrong?


Code:
mc_container.loadMovie("mc_photoSwap.swf");

//homepage Animation Swap Images
function photoSwapAni(){
switch(random(3)){
case 0:
_root.mc_container.gotoAndPlay("ani_1");
trace("case 0");
break;
case 1:
_root.mc_container.gotoAndStop(50);
trace("case 1");
break;
case 2:
_root.mc_container.gotoAndStop(100);
trace("case 2");
break;
}
}
var intervalID:Number = setInterval(photoSwapAni, 2000);
Also I see I'm going to have an issue with the random part because it could call the same animation twice or more times in a row. Should I ad some sort of if statement or is there a better way to do this random part of the code?

View Replies !    View Related
Loaded Movie Target Path
Hi

I'm having real problems working out the path to get a scroll function within a movie loaded into another movie (using a movie holder) to work. Grateful for some help.

The main movie has a movie holder with an instance name of 'approach_mc'. This hold a movie (approach.swf).

Approach.swf has a scroll function with the following actionscript:

ActionScript Code:
y = getProperty("_root.text.content", _y);
if (y<-120) {
gotoAndPlay(4);
} else {
setProperty("_root.text.content", _y, y-6);
}
The _root.text.content path on the loaded movie is obviously the problem, as it refers to the root on the loaded movie rather than the main (parent) movie.

But what should the path look like - I've tried various paths but nothing is working.

Grateful for some advice.

Thanx

Dirk

View Replies !    View Related
[F8] How Can I Target This MovieClip That I Loaded Onto The Stage?
I'm trying to target a .swf that I loaded into a movie clip (mc_container) but it seems like I'm missing something. Can you take a look and see where I went wrong?


Code:
mc_container.loadMovie("mc_photoSwap.swf");

//homepage Animation Swap Images
function photoSwapAni(){
switch(random(3)){
case 0:
_root.mc_container.gotoAndPlay("ani_1");
trace("case 0");
break;
case 1:
_root.mc_container.gotoAndStop(50);
trace("case 1");
break;
case 2:
_root.mc_container.gotoAndStop(100);
trace("case 2");
break;
}
}
var intervalID:Number = setInterval(photoSwapAni, 2000);
Also I see I'm going to have an issue with the random part because it could call the same animation twice or more times in a row. Should I ad some sort of if statement or is there a better way to do this random part of the code?

View Replies !    View Related
Copying Loaded Image Bitmap Data To Another Image Loader
Hi,

I have an app where the user uploads an image into an image loader component. I am trying to figure out how to copy the bitmap data from that loaded image into another image loader component.

Could someone steer me in the right direction? I was looking at bitmap clone and copypixels though haven't figured out how to get this to work yet.

Thanks,

Dan

View Replies !    View Related
Proportions
Ok here's the layout. I'm attempting to make a website where if you click on links new boxes come up. With these new boxes I want there to be a corner to make things bigger. I gues what I'm asking for is a script to make an interactable transform, but only allowing it to become wider and taller.


I've been searching for a little bit, but I cant find exactly what im looking for.

Thanks before hand,

Antivirus

View Replies !    View Related
Keep Swf Proportions
Hi friends.
I use to specify both width and height when embedding a flash movie in html pages.
Now I need to make a flash movie stretch to 100% of the containing <div> restricting proportions so the movie doesn't result distorted.
When you set an image width in the <img /> tag (or thru CSS) and omit the height, the image gets resized to the stated value keeping its proportions, and the same when the height is set and the width ommited.
Embedded objects seem to behave different. I've tried omitting the height parameter, setting it to "auto" and then to "100%". In each case the movie proportions has not been honored, nor I've got consistent results across browsers (currently just FF2 / IE7 tested).
I've also tried the four available values for Stage.scaleMode (showAll, noBorder, exactFit, noScale) but without luck.
I'll appreciate some advice from the experts out there.
Thanks a lot

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved