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


Similar Posts:


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

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

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 3.0 :: Load Different Image Galleries Into A Container Flash File?

May 8, 2010

I am trying to load different image galleries into a container flash file. Each image gallery will be in a speparate swf that can be loaded/unloaded from the main swf. I get the first gallery to load and function fine, using the following code:
 
var ldr:Loader = new Loader();addChild(ldr);ldr.alpha = 0ldr.y = 110ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);ldr.load(new URLRequest("folio.swf"));

[Code]...

View 25 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 :: 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

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

ActionScript 3.0 :: Loading Some Sort Of File As A Container For Assets?

May 20, 2010

This is sort of a repost, but because this thread is in the AS3 section the subject is inherently different because this board doesn't have anything to do with Flex.So, I want to put a bunch of assets within one file (SWF maybe) and load it at runtime. Then I want to be able to access these assets after I've loaded the file.As is visible by my previous thread, I have no idea where to begin, but I know it's "absolutely" possible and obviously very useful.

Even if the loaded file isn't an SWF file, I'm fine with it. I would prefer to be able to store vector graphics in it though, maybe even produced in CS3/4/5 (because that's what my friend's using to draw said graphics).Looking forward to hearing from some of you over here--now that the thread has a more general subject.

View 0 Replies

ActionScript 2.0 :: Loading Variable From External File To Container MC

Oct 24, 2003

I have this code:
var loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {
myVar = this.myVar;
[Code] .....
To load an external variable to load one movie, on the data.txt I have myVar=video1. My problem is that It is not loading video1.swf to container mc, but the trace to the variable name is correct.

View 3 Replies

Flex :: Prevent Container In ItemRenderer From Exceeding Width Of List Container?

Jul 2, 2011

In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.

If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.

Anyway so, at the top of my itemRenderer I tried specifying:

<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">

And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.

<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">

[Code]....

View 1 Replies

ActionScript 2.0 :: Flash Container Within A Flash Container

May 19, 2009

i have a flash document with buttons along the top which when clicked display different flash documents below in a container.. now one of these which gets displayed has 2 buttons on the side next to them another container and within that container you get 2 different documents displayed depending on which button you click on the side.

so i have managed to get it so you have the first document displayed within the second container with the buttons to the side, however when you click one of those side buttons to view the second document it appears to display it in the first container as the buttons that were next to it have now gone.. i've tried changing the names of each container so they wouldn't get confused with each other but that seemed to cause it not to work at all.

View 3 Replies

ActionScript 2.0 :: Pass Data File To A Container That Contains All The Radio Buttons

Sep 27, 2002

I am designing a game/demo and in this game I displaying 10 trains with carraiges in a row. Each row has 2 radio buttons one that indicates the train is going East and one that indicates West. I have 10 examples to the left of the game, 5 facing East and 5 facing West each has different attributes as well. The user has to guess which of the ten trains in the demo are going East and which are going West using the radio buttons. (They will all be facing one direction in the game, not the examples.) The trains are loaded into flash dynamically using text files.

I wanted to know what is the best way of utilizing the radio buttons. I have never used them before. 1. Is it possible for me to set it up so that I can have a data file that contains the following but1=0&but2=1&but3=1&but4=0&.....but10=1& Pass this data file to a container that contains all the radio buttons. If radio button but1=0 then the correct choice is West and if but1=1 then the correct choice is East. When the user has selected their 10 choices, Can I have a button at the bottom that will calculate the users choice pass them to the next 'page' and list the users selections next to the correct answers and say something like 'You got 5/10!'

[Code]....

View 1 Replies

Flex :: Dynamically Adding Container To A Dynamic Container

Sep 21, 2011

I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way is to create a new panel (panel creates fine) and then add collapsable panels(nested) to that panel. Here is the code from the else loop.

else if (newPanel == false){
// simpleData is just for the title bar of the new panel
// otherwise the panel has no content

[Code]....

The error I get is: ReferenceError: Error #1069: Property panel4.4 not found on components.readTest and there is no default value.

I have tried setting the "name" property instead of the "id" property.

View 1 Replies

ActionScript 3.0 :: Gallery - Loading Thumbs From An Xml File And Placing Them Into One Container (sprite)

Jan 31, 2009

I am loading thumbs from an xml file and placing them into one container (sprite), which i later use for scrolling based on mouse position with this formula:

[Code]...

View 3 Replies

Flex - Hide Container Of A Viewstack Container?

Dec 23, 2010

I have a viewstack container w/ 3 views: red, black, and blue. How can I completely hide the black & not include it?

[Code]...

View 2 Replies

Flex :: Drag Circle From One Container To Another Container?

Jan 13, 2012

I am creating an flex Air project,so mxml file will run. I have circles in one Big circle at one side and will be same on other side.

Now how to drag any circle from any Big circle to other side. Or it could be like any two container having circles, then how to drag and drop circle?

For one circle i am able to do drag and drop.But I want one Big circle on left hand side and one big circle on right hand side .And small circles with class names will be in these big circles.Now i want to drag and drop those small circles in big circles.Big cicles should not move. Even i have tried this code in actionscript

package
{
import flash.display.Sprite;
import flash.events.MouseEvent;

[Code].....

But in this i want big circles should not move and small circles should only be dragged.

View 1 Replies

ActionScript 3.0 :: Scale Container In Another Variable Container?

May 6, 2010

I need to place an image into a container. The problem is that I will not know the size of the image or the container beforehand, so it all has to be dynamic.this is how I started (have not gotten to stage(or container) changing size yet. No matter what I try, either all the images are the same width, or they are all the same height. If some images are portrait and other landscape, I don't want all the images to be X pixels high. In this variation of the code, all the images turn out the same height, regardless of portrait or landscape.

ActionScript Code:
var ratio:Number = container.width/container.height;//get the ratio, if width is bigger than height then ratio is greater than 1, else ratio is smaller than 1

[code]........

View 0 Replies

Flex :: Moving Children Of A Container (defined In MXML) Inside An "inner Container"

Jan 27, 2010

I'm currently working on a custom component which extends Canvas (let's call it SuperCanvas) ; it's basically a container that let you zoom & pan its contents. It would be too long to explain why, but I can't use scrollRect, so I was forced to declare a Canvas object (called innerCanvas)... inside my SuperCanvas (I know, not very nice =/) I would like to know if there's a proper way to "redirect" the creation of my component's children in this canvas.

[Code]...

View 1 Replies

Swf Load An Image File In An Image Container Within The Swf From The Querystring

Jul 24, 2010

I want to have an swf load an image file in an image container within the swf from the querystring. 1. In the query string I'd like the extension of the image file to not show:

2. In the swf I might have more then one place where the same howdy.jpg loads, but in different sizes. Which method would keep the aspect ratio of original and resize to fit varying container sizes?

3. I have some javascript parsing code with an swf example that I got from this page. [URL] But when I tried to alter the fla for my use it didn't work. I wasn't able to find 1 line of actionscript in the query.fla.

View 1 Replies

Using Flash As Container For HTML?

Feb 4, 2009

I'm building a website with php/css. I'm a photographer and will be displaying images, one per page. I'd like to allow the user to click an image and view it in fullscreen, scaled to their screen resolution.I know that much can be done in flash. However, I'd like to display html elements once the fullscreening has occurred. This is because I want to retain right-click functionality.

(specifically, I want users who are going to try to steal my images to actually be able to download the image out of the sized div it's in, with metadata and hidden copyright notice intact, rather than taking a screenshot and bypassing all of my usage and copyright notification)So... flash fullscreen containing html elements?

View 1 Replies

Flash :: Resize An External SWF To Fit Into A Container?

Aug 14, 2010

What I want to accomplish is to resize an external SWF so that it fits into the display object that is presented as a container on the stage. For now it show up outside of the container.

Important: I do not want an external SWF to occupy the whole stage; I have a special place (that container) for it on the stage.

View 1 Replies

Flash :: Call To An AS2 Function From The AS3 Container

Nov 9, 2011

I'm trying to call a function from a AS3 container which should call old AS2 SWF that cannot be edited bacause we are talking about 1000 swf files, does exist some way to call a function inside the AS2 SWF from the AS3 container? I know a possible way by adding a LocalConnection as written here but as I said I can't edit all the swf files, so I just wonder to know if does exist some alternative.

View 3 Replies

ActionScript 3.0 :: Make A Container In Flash?

Feb 23, 2009

Im trying to make a container in flash but i would like the width of the container to be the size of the stageWidth & height to equal a set number. Having these set width & height will allow me to add another container right next to the side of the first container, this second container not being visible on stage. e.g. container1.x = 0, container1.width = 100, container2.x = 100.

[Code]...

as you can see the width has been set according to the object inside the container (the ball diameter 100, therefor container width not set to 100 rather than 550) If there is nothing to stop flash doing this, I had a thought of maybe adding a rectangle inside the container with no fill so its not visble therefore the bounding area is taken from that rectangle which could be set to a width of stage.stageWidth.

View 1 Replies

ActionScript 3.0 :: Flash Swf Detecting Its Container

Jul 26, 2010

I am making the flash bit of a kiosk. The swf will be running in a exe shell. Is there a way to have the swf see what is containing it (browser, exe shell, my hand, your hand...) and if it is contained by the exe shell it will call fscommands, otherwise it wont? The exe isn't finished yet, and I'd like to test my swf without it giving me security errors. I'd also like to be able to show my boss the swf in as few clicks as possible

[Code]...

View 2 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

HTML :: How To Resize Flash Animation To Fit Container

Mar 18, 2010

I have a flash animation with the size of 1280x1024 and I want to embed it into an HTML file. I want the flash file to be displayed in 800x600. This is my code:

<html xmlns="[URL]" xml:lang="en" lang="en">
<body align="center"><object>
<param name="movie" value="/flash/connect.swf" />
<embed src="/flash/connect.swf" width="800" height="600"></embed>
</object></body></html>

Well, it doesn't work. I do have a 800x600 frame, but the flash file itself still displayed on its original size.

View 2 Replies

Xml :: Flash - Organizing XML Results As Cells In Container?

Apr 19, 2010

Basically an array if fed to callThumbs() which iterates through it and compares the entries with preloaded XML _my_images. If match is found, it's sent to processXML which loads all relevant info and loads a .jpg thumbnail. All this is then fed to createCell which creates a specific cell with position values depending on x_counter and y_counter values (4 cells in a row) and adds the cell into a container _container_mc.

The Problem: This all works fine and looks fine, the problem is that the cells within the container do not display in descending order. They are in random order, probably because some of the .jpg's takes longer to load etc. How do I easily organise the cells within the container in descending order by the XML .id value? Or how do I tell Flash to wait till the thumbnail and data is loaded and the cell created and added?

//Flash (AS3)
function callThumbs(_my_results:Array):void { // selector = 1 for specific items, 2 for search items
var _thumb_url:XML;

[code]....

View 1 Replies

Actionscript 3 :: Adding Sprites To A Container From Flash?

Jan 7, 2011

i am currently working in flashbuilder and i imported a swc wich containes a ratingcontainer. That ratingcontainer contains 5 ratings, they are labeled "Rating1", "Rating2, "Rating3", "Rating4", "Rating5".These are placed on the stage. i also have a sprite called "Star" and when i for example click on "Rating4" then every Rating from 1 to 4 should get stah Star sprite added to them, when i click again on Rating 3 or something then only 3 the first 3 should have the star added. i tried the following:

detailContent.RatingContainer.addEventListener(MouseEvent.CLICK, ratingClickHandler);
private function ratingClickHandler(e:MouseEvent):void{

[Code]....

View 2 Replies

Flash :: Safari Is NOT Loading Until Container Div Is Visible?

Dec 9, 2011

I have a simple swf in an invisible <div>; when user mouseover's the <div> becomes visible.The swf has a ExternalInterface.addCallback( "..." , ... ) to create connection to js that needs to be called at load, such that by the time user mouseovers the flash-js connection is working.PROBLEM: on windows safari the flash does not go through its loading sequence until the user finally mouseovers

View 1 Replies







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