ActionScript 3.0 :: Container Scales Loaded Swf File?

Jul 5, 2010

I have a container on the stage in which a swf is to be loaded when you click a button. This works fine when the content of the .swf being loaded into the container does not have content floating outside of its stage, this is a problem for me because the .swf being loaded in has content that exceeds the width of its stage, but is masked. The masked content on that page will be made visible when the user mouses over the masks. So its essential that the .swf being loaded in exceed the dimensions of its stage.

Initially, when I click a button that is a child to the menu_mc, the swf loads into the container correctly, but when I MOUSE_OUT of the menu_mc the content within the swf scales to reflect any content that exceeds the width of its stage. I'm not sure if this is the result of the way I am the loaded swf. The swf is designed to scale up and down when the user MOUSE_OUT or MOUSE_OVER of the menu. The menu is designed to be hidden when not in use.Here's my code:

ActionScript Code:
import caurina.transitions.*;
import caurina.transitions.properties.DisplayShortcuts;[code].....

Additionally, I ran into a problem when I moused over the buttons that are children to the menu_mc. Whenever I rolled over them the content in the menu would hide itself off stage. So I came up with a solution that may not have been the appropriate course of action, but worked. In the MOUSE_OVER function of the buttons, I provided y coordinates for the other movie clips to prevent them from moving off stage. For the sake of better coding practices, would there have been a much more appropriate coarse of action.

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Loaded Swf Scales - Screwing Up The X And Y Coordinates?

Mar 1, 2010

I loaded an anim.swf to the main.swf the anim.swf has some animation. in the main swf i have codes that changes the x and y coordinates of objects placed in the stage by there width/height. but the problem now is, since the anim.swf has some animation, it is screwing up the x and y coordinates since, it appears that the anim.swf is changing size (width and height) due to the animation.... Is there a ac3 code or some other settings, that can turn that off, so i have just the actual size of that swf and maintaining it?

View 3 Replies

Professional :: Run Project (main Container SWF And Child SWFs) Into Another Container File Which Place On A Website?

Jun 17, 2010

I am facing a issue in Flash container. I am having a project which has main container which call different SWFs into it. Now I call this main container file into another container, and their problem starts. Many option doesn't work properly which generally have _root, _parent etc...
 
If I want to run project (main container SWF and child SWFs) into another container file which place on a website. I want to show whole project from this container file so what I need to do?

View 1 Replies

ActionScript 2.0 :: Swf Gets Shrunk When Loaded In Container?

Jan 22, 2010

scrolling TN that I purchased for $10. I want to create many different galleries (many swfs) using this XML gallery and then load them into a container inside a "master gallery swf" if that makes sense.The problem I am having is that the swfs are getting re-sized smaller when loaded in the container (maybe 70% of the original size) even though the container and swfs have the same dimensions.I've actually had this problem before where a swf displays smaller, even if it's just inserted into an HTML page. I'm wondering if there is a simple solution

View 0 Replies

ActionScript 3.0 :: Communication Between Loaded And Container SWF

Jul 18, 2011

I need to communicate from loaded swf to the container swf in AS 3.0. This is the code for document class of loaded swf followed by code for source swf document class. How I can call the method xyz() from the external swf?

ActionScript Code:
package com.scottgmorgan {
import flash.display.Sprite;
public class ExternalMovie extends Sprite {
public function ExternalMovie():void {
Code] .....

View 1 Replies

IDE :: Guestbook Flash & Php Loaded Into Container?

Mar 24, 2009

I used guestbook form here:[URL] and when I load it into a container in the flash website the guestbook doesn't read the data from txt file. It works ok when it's alone.

View 1 Replies

Professional :: Detect The End Of An External Swf Loaded Into A Container

Oct 14, 2010

I have a main swf that will load external swfs into a container. I need to detect the end of the loaded external swf in order to start to load and play a new one into the same container. The problem is that i do not know what the length of the external swfs will be, and will have no control over the development of them, so i cannot place a variable at the end of their animation which would allow me to detect from the main movie its end. I also cannot rely on the _totalFrames property because the loaded swf might not have all the animation inside its main timeline.

View 5 Replies

ActionScript 3.0 :: Check If A Swf Is Standalone Or Loaded By A Container Swf?

Sep 16, 2009

I need a fairly foolproof way to check from a child swf whether it is loaded into a container swf through a loader object or if it is just loaded through html. I would like to do this without requiring a flashvar or any kind of function call from the parent swf that may be there. Any quick and simple solutions? I looked for something with loaderinfo but came up empty.

View 4 Replies

ActionScript 3.0 :: Target A MC Being Loaded Into Empty Container?

Oct 1, 2010

I'm trying to somehow target a MC being loaded into an empty container MC. I've tried everything I could think of.

Basically, I'm making a movie editor. Right now clips are added to the stage on initial load, then when they are clicked on they are added to the "reel" and they can be previewed in the order that they are added. Now, I'm trying to get it so that when they are on the "reel" they can be click and dragged and rearranged.

Here's how the clips are added to the stage in a function called loadClips():

ActionScript Code:
addChild(clip1);
clip1.name = "1";

Here's how they are being added to the "reel" in addClips():

ActionScript Code:
if (currentTarget.name == "1")
{
clipCopy = new Clip1();

[Code]....

Now, I just want the clips that are on the reel to be click and drag-able (along the X axis but I'll worry about that later). I realize now they're all being added as clipCopy. That's going to be an issue huh? Is there a way that I can target the container and make that mobile?

View 2 Replies

How Will Flash Work If The Container Html File And An Embed Swf File Are From Different Domains

Jan 8, 2012

Let me give the context first. A user opens a local html file which has a reference to a network url of an swf file to embed.

(1) If the embed swf requests a local image file , will Flash allow the request?
(
2) If the embed swf requests an image file on a non local url other than one of the swf file, will Flash check a crossdomain.xml file on the url?

View 1 Replies

Loaded Child Movie Controlling Container Parent

May 14, 2009

i'm a designer trying to step up my flash skills and have a scripting problem that's causing me trouble. essentially i have a child swf loaded into a container in a parent swf and want the child to be able to instruct the parent. to explain in full, the child contains an flv with bespoke video player components. it's container sits in one frame of the parent. when the flv finishes playing, i need the parent swf to move onto another frame.
as it's a controllable flv, it isnt possible to predict the exact length of time the child will need to be present, so it literally needs to tell the parent it's finished playing at that very point.

[Code]...

View 9 Replies

Actionscript 3.0 :: Bitmaps Loaded Into A MovieClip Container Are Blurry?

Sep 2, 2009

Running into an issue where the if I add a Bitmap image into a movieclip the bitmap will appear slightly Blurry.When I add the Bitmap directly to the scene it appears normal. Is their a property for a movieclip that would explain this behavior? or is their some other solution to keep bitmaps from becoming blurred?

View 2 Replies

ActionScript 2.0 :: Triggering A Sound Object Once The SWf Is Loaded Into A Container SWF

Jun 23, 2003

I have a created a sound object like so:

//Creating the Sound Object
sliderSound = new Sound();

[Code].....

It works great when viewed. the problem is that when I load this SWF file into an container SWF file (using loadMovie) the sound will not play.

View 1 Replies

ActionScript 2.0 :: Code Which Can Check To See If The Background Swf Is Already Loaded Into Its Container?

Jan 9, 2008

I am creating a site where there is a portfolio section with icons for each piece of artwork.Regardless of which icon 1-10 is clicked, for the first time ONLY, I want to load a swf which "draws in" a portfolio "background", and another swf on a higher level which corresponds to the icon clicked (lets say a sample artwork).

However, if the user has previously clicked another portfolio icon and is currently viewing one of the portfolio pages, there is no need to load the "background" swf again (it would be tedious watching the drawing in animation over again).

I've designated a target container movieclip for each.The icons swf file with the buttons is another swf on the timeline.Is there some code which can check to see if the background swf is already loaded into its container? And in which swf would I attach the code?

View 3 Replies

ActionScript 2.0 :: Targeted MovieClips Do Not Work Once Loaded Into Container

Oct 3, 2002

I have several external SWF (child) movies that are to be loaded upon demand into another SWF container (parent) movie file. Pretty straight forward. Each of the child movies has MCs communicating with other MCs within the same child movie. For instance the timeline of one MC will have a frame action, which targets another MC instance to play(). Again, Pretty straightforward stuff.

These files work beautifully when viewed independently. The problem is when they are loaded into the parent container movie the target MC functionality no longer works. I believe it's because once the child movie is loaded into the parent movie the absolute path of the targeted MC has changed and what was once the '_root' in the child movie is no longer the actual root?

I have tried both methods in the child movie:

//method without using 'with'
_root.ContentWindow.play();
And using the 'with action like so:
//method using 'with
with (_root.ContentWindow) {
play();
}

It would seem that in theory once the Child SWF file is loaded into the Parent SWF file the targeted path would have to have another level in it - cuz now the MC 'ContentWindow' is no longer one level down from the '_root' but two levels?
For example: _root.LoadedChildMovie.ContentWindow.play()

View 3 Replies

Actionscript 3 :: Movieclip Loaded In Container Reports Exaggerated .width Value?

Mar 9, 2010

I am trying to load a swf(as3) into another As3 Swf with the Movieclip loader. After loading however Loader.width/loader.content.width returns an exaggerated value than the actual width of the swf being loaded. Any pointers on where to begin looking for the discrepancy?

More Details (if it helps)

The swf being loaded has UI components like dropdowns, input boxes and combo boxes (its a Form to fill up), and a coded one-time tween. When the child MC loads into the parent movieclip, the Loader.width value returned is exaggerated by about 28 pixels (although the height remains the same). Loader.content.width also returns a 28 pixel exaggerated value. The Exaggerated value is more than even the stage width of the child MC. The extra ~30 px are upsetting subsequent code in the parent movie to scale and center the loaded swf.

update:

stage.stageWidth returns the correct Value.Code used in the parent MC, to load external SWF:

private var deadURL = "child.swf";
private var deadReq:URLRequest = new URLRequest(deadURL);
private var deadLoader:Loader = new Loader();[code].....

View 2 Replies

ActionScript 3.0 :: Place Two Or More Instances Of The Same Loaded From A Loader Bitmap In One Container??

Nov 29, 2009

Is it possible to place two or more instances of the same loaded from a loader Bitmap in one container?

View 1 Replies

ActionScript 2.0 :: Swf Called Main.swf Which Has A Container Movieclip That Gets External Swf's Loaded Into It

Jul 28, 2004

I have one swf called main.swf which has a container movieclip that gets external swf's loaded into it.

my external swf is called hosting and it calls an array of data that is loaded into a movieclip that is duplicate for each element from the database. The elements from the database are as follows:

Business
Economy
Power
Standard

Each one of these has a button over it that when press loads information from the database into a movieclip that contains a textbox. My button code is: _root.movieclip.loadVariables("url to database");

This works flawlessly when I run the hosting.swf by itself, but when it is loaded into the contianer in the main.swf the buttons dont work. I believe that it is the _root in the button call that is causing this but I dont know how to fix it. I think the _root variable changes when hosting is loaded into the main.swf.

View 1 Replies

ActionScript 2.0 :: Scaling Loaded Image Or Movie In Flash Container

Oct 11, 2010

I need to scale the loaded image or movie in a flash container without loss of quality, how to do it?

View 1 Replies

ActionScript 3.0 :: Error #1065: Variable Undefinedpath To Container Mc In Loaded Swf Not Recognised

Jun 23, 2009

One movie, named Gallery_1, with hotpots via which external swfs are loaded into a container mc of the main timeline of the Gallery_1 movie, works perfectly by now. Via another button function the Gallery_1.swf is loaded into a container mc on the timeline of the main swf, which works alright as well, but when one then clicks the hotspots of the Gallery_1.swf one gets following error message:

[Code]...

View 1 Replies

ActionScript 3.0 :: Error #1065: Variable Undefined, Path To Container Mc In Loaded Swf Not Recognized

Jun 23, 2009

One movie, named Gallery_1, with hotpots via which external swfs are loaded into a container mc of the main timeline of the Gallery_1 movie,

Via another button function the Gallery_1.swf is loaded into a container mc on the timeline of the main swf, which works alright as well, but when one then clicks the hotspots of the Gallery_1.swf one gets following error message:

ReferenceError: Error #1065: Variable GallerySite not defined.
at HotSpot1/PictureLoad()
at HotSpot1/PictureCall()

[code]....

The traces in the eventHandler function work alright.I wildly imported all relevant classes I could think of, e.g. the GallerySite class to the WebSite class and vice versa, and tried various variable definitions, but am at a loss by now as to where to define the GallerySite variable.

View 3 Replies

Actionscript 3.0 :: External SWF File In To A Container?

Sep 19, 2010

What I need:I need to load an external SWF file hosted in a remote server apart from my hosting server, I have no control over the external file. this external file is re-sizable to whatever the holder/container size is... so, if my main container is 300 x 200 the external file will be display on that size, if my container is 500 x 700px it will display with that size and so on so on... that is the idea...ProblemI have been able to load the external file without a problem, on an specific location of my main container inside my main movie clip, what I can't get done is the size!, every time I load it is display on an specific/default size which is away from what I want.

The Code to load an external SWF File AS3
Code: Select allvar swfLoader:Loader = new Loader();
holder.addChild(swfLoader);

[code]....

View 3 Replies

ActionScript 3.0 :: Flash Specify Mc Container From Xml File?

Jul 4, 2011

I am loading in a series of assets from an xml file like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<site>
<asset name="background" src="assets/backgrounds/red_wood.jpg" type="image" container="background_holder" width="100" height="100" />
</site>

I then loop through each asset node and add it to a LoaderMax var. The problem I am having is that I want to declare the container for the asset I am loading in the XML file, but when I try the following code I get this error message:

Error #1034: Type Coercion failed: cannot convert XMLList@2ebc2e51 to flash.display.MovieClip.

Code:
var xml:XML = event.target.content;
var assetsList:XMLList = xml.asset;
var mainLoader:LoaderMax = new

[Code]....

View 1 Replies

ActionScript 2.0 :: Control One Loaded SWF File From Another Loaded SWF File

Feb 7, 2005

Is it possible to control one loaded SWF File eg.(MOVIE-1.swf) from another loaded SWF file eg.(MOVIE-0.swf) on a different level? eg. with a syntax like:

onRelease
_MOVIE-1.SWF.gotoAndStop (4)
or:
onRelease
gotoAndStop (MOVIE-1.swf, frame4)

View 1 Replies

Professional :: Flash File Out Of Container In Firefox

Feb 6, 2010

Firefox throws the flash file out of it's container? The page behaves correctly in IE8 (32bit). I posted in DW forums who suggested it was a flash issue and not DW. [URL]

View 10 Replies

ActionScript 2.0 :: Scales All Of The Clips At The Same Time

Dec 6, 2010

I won't pretend like I'm really at all familiar with Flash. I'm making a project where I'll have several movie clips on the scene. When you click each movie clip, I want it to scale larger. I got the code working and it does do that. Trouble is, now when I click any one of the clips, it scales all of the clips at the same time.

This probably has to do with the fact that I'm using the exact same code for each script and only changing out the MC name. What do I need to add to the code to make it so each MC is working individually from one another?

[Code].....

View 2 Replies

ActionScript 3.0 :: Calculate Positions And Scales?

Sep 16, 2011

For some reason the "scaled.width" - the movieclip that have scaled already - after scaling it even more with TweenLite.to function by factor .3 aren't equal with the predicted result => scaled.width * .3. Orginal width is something I don't know but scaled width is something like 420. Now multiplying it by factor .3 the result should be something like 140, now when I put TweenLite.to function to scale my scaled movieclip by factor .3 the width in the end is something like 267.And frankly speakin I really can't imagine where the result came from.

Some back ground:I import three images dynamically. Each of them to their own MovieClip containers. I don't know the dimensions of images so I need to scale them proportionally to their dimensions to fit to the desired size.That was intuitively easy. I managed also to align them horizontally in the center of the screen after the first scaling by the knowledge that their registration point can be found from the top left corner. I also managed to align each of them on vertically in the middle of the 1/3 part of the empty stage with desired marginals: in the top there are 20 pixels space, between the images there are 20 pixels space and in the bottom there are 20 pixels space.

Now the problems comes when I need to tween them to their final positions. Each of them to the top of the stage and each of them in 1/3 part of the empty space horizontally scaled at the same time smaller with factor .3.Intuitively when I think the x position can be found by same way than the way I found y positions (related to the space left after the middle image is positioned). So in theory I thought the x position for the image that comes in the center should be as much as finalX = stage.stageWidth / 2 - current.width * .3 / 2(the center point of the stage minus the half of the width of the image after the scale)but when I give finalX for the tweenLite as a x position and .3 as a scaling factor the result is something different.

View 1 Replies

ActionScript 2.0 :: Thumbnail Scales To 100% Of The Picture?

Nov 18, 2006

Is it possible when I click on a thumbnail that the thumbnail scales to 100% of the picture (in an motion scale?), centered in the movie, and when I click again on the large picture that the picture re-scales to the thumbnail back again.

View 4 Replies

ActionScript 3.0 :: Flash - Swf Scales Up In Firefox?

Oct 15, 2010

when i put my swf in an html page and view it using FF 3.6.10, it gets bigger and looks ugly (all the photos pixelate). noScale is set and the swf doesn't otherwise scale (e.g. if i minimise the window or press F11), which is the correct behaviour. Problem does not occur in IE8.From reading about similar problems i thought the best embed method was a combination of object tags. I've tried:

Code:
<object
type="application/x-shockwave-flash"

[code].....

View 1 Replies

Flex :: Calling Refresh On A The Application Container From An .as File

Jun 7, 2011

I've inherited an application and am fixing a bug. There is a refresh button in a the application's mxml file and it has a click="refresh(null)". This works.

However we also want to do a refresh every five minutes automatically using a timer. There is code in an .as file (that is sourced' into the above mxml file) that uses a Timer and calls refresh(null) from within the .as file, but this doesn't seem to do anything.

Is this the right way to do this? Or do we need to explicitly reference the object we want to refresh? If so, how do we do that?

foo.mxml:
<mx:Application ...>
<mx:Script source="funcs.as"/>

[Code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved