ActionScript 2.0 :: AttachMovie Incorrectly Positioning Clips?

Jul 25, 2005

I'm using a Movie Clip (mc1) as a button and for it to be able to function with a mouse click, I placed a Button symbol (b1) inside of the Movie Clip and put some ActionScript onto the nested Button symbol:

Code:
on (release) {
_parent.attachMovie("mc2_id", "dot", 100);
dot._x=150;
dot._y=100;
}

As you can see, I'm trying to get another Movie Clip (mc2) onto the stage and that part works fine, but for some reason it keeps ending up at the top-left corner of the stage even though my code says otherwise. What am I missing? I'm including the .fla if anyone would be kind enough to look at it.

Also, when I was setting the linkage properties for the clip to be attached, I had to enable the "Export in first frame" function just so it would work (I normally don't since I was told it would kill a preloader if I had one); how would you export things without having this box checked if you normally don't do that sort of thing because of a preloader?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: AttachMovie Dynamic Positioning Within A CreateEmptyMovieClip

Sep 2, 2009

In the current project for my schools interactive yearbook(new development). Im trying to create a grid table within a createEmptyMovieClip, by attaching a movie clip from the library, and populating it with an external xml, that i populate a few arrays too.

As of now im just trying to get the basic portion of it down. I see it as if i can create a "page" without having to dublicate the page, then i can easly do it with the multipul pages.

In a nut shell, when i publish my fla, i only get 2 images, when i should have 23, which is the number of childNodes that are in the external XML file...

Im going to attach my souce, and i'll point out the portion that im having issues with:

stop();
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

[Code].....

View 0 Replies

IDE :: Positioning The Movie Clips?

Jan 16, 2009

I have five rectangle shaped movie clips....I need to change their _y position randomly by clciking a button..but there must be 10px space between them... so how do I modify the code to do it ?

PHP Code:

myArray = new Array(m1, m2, m3, m4, m5);for (i=0; i<=myArray.length; i++) {_root["m"+i]._x=400;_root["m"+i]._y=Math.floor(Math.random()*300)+20;} 

View 6 Replies

ActionScript 2.0 :: Positioning Movie Clips [resizing]?

Oct 4, 2006

I've looked in many places and still haven't found a solution to my problem... how his content stays positioned even after you resize your browser window?

View 1 Replies

ActionScript 2.0 :: AttachMovie - Add Movie Clips To The Stage

Nov 1, 2009

I want to add 5 movie clips to the stage. The movie clip at this point is just a red box and called testMovie. Ultimately i want to have 5 red boxes displayed on screen tiled vertically one under the other. Here's the code i have so far:

[Code]...

View 7 Replies

ActionScript 2.0 :: Placement Of Movie Clips Using AttachMovie()

Mar 30, 2002

Still plugging away, but I've run up against a problem that seems like it should be easy to fix, if I only knew how. Made a hairline for use in drawing lines with attachMovie(). Wanted to test it by making a "crosshair" at (100,100). You'd think:

[Code]...

View 6 Replies

ActionScript 2.0 :: Clips Using AttachMovie Loaded Into The First Frame?

Aug 10, 2004

I have 5 frames in a Flash file. The fifth frame is the only frame that contains several attachMovie actionscript call lines. Each of the clips that are called using attachMovie contain large image file sizes. When I used debugger, I noticed that the bulk of the data is not being loaded from the 5th frame, but from the 1st frame instead. Is this supposed to happen? If this is so, the preloader that is being referenced on Kirupa doesn't seem to work properly because it loads all the attachMovie frames first before the preloader is able to perform its own action. What happens is that 80% of the movie will load (I predict from the attachMovie call lines) before the preloader actions and its visual representation will appear.

I tried directly attaching these movieclips to the last frame along with the attachMovie(), thinking that phyiscally placed frame would have a higher priority. But the debugger still informs me that the bulk of the data is being loaded at the 1st frame. Is there another workaround for this or another preloader that someone can recommend? This is the preloader I used: [URL]

View 2 Replies

ActionScript 3.0 :: Flash With A Grid Snap Function - Positioning Of Movie Clips

Aug 12, 2010

This is my first action script project and I'm having trouble with some positioning of movie clips that I can't work out. I'll post in the parts of the code that I think are relevant in hopes that someone may be able to see what I am missing. The problem is that according to my traces my gridSnap function should be working. The trace shows mc.y to have the correct value while the movie is running yet the mc's in question are appearing in the wrong spot (they appear at GRIDSIZE*gridNumber) in the movie. The problem only manifests itself in case one and case three, both of which should have the same code but I was only testing different approaches in case one. On with the code:

[Code]...

View 3 Replies

ActionScript 2.0 :: Put Movie Clips On Stage Using The AttachMovie Command?

Jun 10, 2002

how to put Movie Clips on my stage using the attachMovie command, but they always appear in the upper left corner of the screen. How can I get them to appear in a predetermined area of the stage, without having to edit the Movie Clip itself?

View 1 Replies

ActionScript 2.0 :: AttachMovie, Multiple Movie Clips W/ Original Data?

Jul 27, 2003

Now that I'm on the verge of madness I must consult the forum. I'm simply trying to take one movie clip I made, make it behave like a button, and attach multiple instances of it on my stage, each of which will load a different image to the page. Therefore each movie clip instance contains one crucial bit of unique info -> a number.

That way when I click on the upper left movie clip button it will load ["poster"+this.num] where this.num = 1 and so on. Im having a heck of a time talking to the variables stored in my movie clips... tried to do an onLoad since I only want to set it once but to no avail. any ideas? i'm confused myself just trying to explain it so i'll attach the fla, it's not too big.

View 2 Replies

Professional :: Fonts Incorrectly Embedded In CS5?

Mar 28, 2011

Create new AS3 fla fileIn publish settings, click 'Generate Size report'Put some text on the stage - Classic text, static (Though it doesn't seem to matter)Make sure the font is '_sans' (There is no 'Use device fonts' option for this font choice)Publish the fileNote that _sans is now embedded in the SWF, occupying bytes in the size report. Try the same in CS3, and there is nothing embedded, as you would expect. Unfortunately I can't get my fla loaded into CS3 because CS5 will only allow me to export as CS4.
 
Similarly, change the font to something specific, like Verdana, and set it to use device fonts and it still embeds font data (We're talking about 3 or 4k) but doesn't list any glyphs. Occasionally though, by screwing around, it doesn't embed anything. Then nudge some text in some magical way and it's back to embedding redundant data.

View 2 Replies

Flash :: MaxScrollV Reporting Incorrectly?

Dec 9, 2010

I have an html text field that displays content from an xml file, and a class that determines whether or not to show a scrollbar.The code that determines this is as straightforward as

if (field.maxScrollV>1){
showscrollbars()
}

And 9 times out of ten it is working. Sometimes - it seems when the html contains <li> - maxScrollV is reporting '2' and the scrollbars are showing, even though all text is visible onscreen and it will not actually scroll at all.

View 2 Replies

ActionScript 2.0 :: Php Script Being Called Incorrectly

Jul 2, 2009

I have a project with flash, php and mysql. We have a form for notes, that sends and stores a note, and then we have some other forms, and the other makes a query on a database to know what equipment some employee has. They are different swf movies loaded in another one. The issue is that whenever you make a query for an employee, there is a blank note saved. I already tried to trace something but nothing shows up. The code for notes is NEVER executed on the list change action, but still blank notes are added to the database. Here are the flash codes:

[Code]...

View 1 Replies

ActionScript 3.0 :: Images Sorting Incorrectly From XML?

Nov 5, 2009

I have a series of images coming in from XML, they are labeled sequentially something_01 - 21. No problems there at all.

When I add the image links to an XMLList, they trace in order... something_01 - 21. No problems there either...

Hell, even when I trace "loadedImages" below they trace in order.

But on stage... though all the images appear & line up the way I want, they're random in order. Image 15 | Image 12 | Image 17 | Image 6, etc...

I'm sure it can be in the code but it's really very frustrating. I first add each image to a box and then load it to a content container.

Code:
XML...
function formatXMLContent():void {
for (var i:uint = 0; i < tourImage.length(); i++) {
var loader:Loader = new Loader();

[Code]....

View 0 Replies

ActionScript 3.0 :: TextField Width Reported Incorrectly?

Mar 5, 2009

I've been working with a marginally subclassed form of a TextField, which I need to display with embedded fonts. I'm noticing some surprising behaviour with the width property when embedded fonts are enabled, which is causing me trouble further on in my code.Due to the way I am animating text, I am displaying each word in a separate TextField (or Word object, as I've subclassed it). I then reassemble a line of text with even spacing, and to that I need to know the width of each word, so that following words will begin at the correct x-position. Before I began to use embedded fonts, the width was reported accurately, as expected, but once I enable embedding, the width property is reported as a much lower valueI've included the constructor for my Word object, which shows some traces for debugging

PHP Code:
public function Word(wText:String, partOfSpeech:String, chunkTag:String) {
text = wText;

[code]....

View 3 Replies

ActionScript 3.0 :: Images Incorrectly Scaled On Loader?

May 22, 2009

the loader class isnt loading images to their correct scales.they are always stoo short in width. is there a work around for this? it may be a common issue. im using AS3 for this.

View 1 Replies

ActionScript 2.0 :: Loading Images Displaying Incorrectly?

Jun 6, 2009

I'm trying to load some jpeg's into my movieclips. They are loading, but my height is displaying wrong. The image is 64x100px. I'm changing my movieclip to show the same size, but the display of the image is stretched.Doing a Debug of the movie, the movieclips show the correct dimensions, but the images are still stretched vertically somehow. My _xscale and _yscale are both at 100.

This is in actionscript 2.0. I've ran this file on both MX2004 and CS3, with the same result. The images aren't progressive,

Code:
numImages = 30;
spacing = 10;
x_pos = 0;
y_pos = 0;[code]..........

View 1 Replies

Data Integration :: Rendering XML Code Incorrectly

Mar 13, 2007

I'm pulling text from an XML file that was created throug Filemaker. Some of the text has special characters like ampersands or quotes etc. In the XML file those characters look like they would look in a regular HTML file (& or ") But once it's imported into the textfield in Flash it still only shows the long form (&) instead of the character. In the Property Inspector I clicked on "Render Text as HTML" but it doesn't make a different.

View 1 Replies

Flash Displaying Incorrectly Once Uploaded To Apache?

Aug 8, 2010

I recently purchased a flash template and after a lot of configuration and tailoring to my own requirements, I have the website look and feel exactly how I want it. I then proceeded to upload the site into cPanel and more specifically Apache, and unfortunately the display within the flash has now gone completely wrong. There are extra spaces in sentences where there were previously none and numerous images and text titles do not display any longer.his occurs in all browsers when viewed live but when viewed from my local computer via my hard drive all browsers display the content as normal??I am more of a Cisco/Network consultant therefore my knowledge in this area stretches a very small amount. I have added the Apache Handlers for .swf, .xml and the image formats but that's about as much as I know

View 9 Replies

Flex :: Spark CurrencyFormatter Formats '0' Incorrectly?

Feb 10, 2012

I'm having trouble with a spark CurrencyFormatter, which is failing to format the value 0 correctly.All other values are formatted fine.I'm using Flex 4.5Here's an example:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

ActionScript 3.0 :: ROLL_OUT And MOUSE_OUT Triggering Incorrectly?

Mar 7, 2009

I am having a rather annoying problem!! Basically my code is triggering the event when it definitely should not be...Here is my layout:

Node container - holds all my Sprites and has a MOUSE_OVER (<works fine) and a MOUSE_OUT / ROLL_OUT (<neither of which work) Sprites in Node container - contain text + images but have a Shape hitbox on the top layer meaning there should be no confusion!Basically, I check to see if anything rolls over my node container with MOUSE_OVER which triggers correctly and allows me to target which sprite the user has rolled over.

However, when you move the mouse over the sprites (but not outside!) if constantly triggers my MOUSE_OUT and ROLL_OUT events, it makes no difference which one I use...This is is really frustrating and I can not think of even an ugly work around in my code to solve this, it would be nice to fix it and add it to my knowledge later.

EDIT : Actually the MOUSE_OVER triggers as soon as the OUT event has triggered incorrectly.

EDIT 2 :Basically I have a custom cursor and this is the root of the problem, it thinks I am rolling over the cursor and then out constantly.. OK so how can I Ignore my mouse cursor image? So it doesn't think I am rolling out all the time..?

EDIT 3 : FIXED

mouseEnabled = false;
mouseChildren = false;

View 1 Replies

ActionScript 2.0 :: Activating Sound Files Incorrectly

May 8, 2002

I did this e-card, and it seemed fine. Then I played it on another persons computer (both PC), and the sound failed to work. I'm using Flash 5. Other e-cards with sound produced by other people worked fine. So here's my code. On the first frame (root) I have:

[Code]...

View 4 Replies

Flash :: Videos In Safari Render Page Incorrectly?

Sep 16, 2010

I have a really strange issue. If I insert a flash video from YouTube, BlipTV, JW Player etc. the text on the page is jagged and the links from the "Pages" drop down menu that overlays the video are all bunched up. This problem only occurs in Safari, you can see it for yourself here: cannot pinpoint why this is happeningEDIT: Fixed this myself by adding position: static to the list items. It seems position: relative was causing the problem.

View 1 Replies

Actionscript 3 :: Dynamic Text Displaying Numbers Incorrectly

Mar 15, 2011

I have a .fla file with a movieclip that has a dynamic text box in it. In my .as class file I'm setting the dynamic text's text with _clip.Score.text = "Points: " + _score.toString(). This seems like it would work but for some reason the following results happen:[code]

View 1 Replies

ActionScript 3.0 :: Papervision3D / BitmapData - Faces Are Oriented Incorrectly

Nov 28, 2011

I have a question about Papervision3D, or perhaps bitmapData, I am unsure where the problem is. I have constructed a program that takes 4 banners and splits them into pieces and then applies those pieces to cubes so that I can make a banner rotator. So after I run my program I have 10 cubes with a piece of a banner on 4 faces(front, top, back, bottom) of each cube. The problem is that some of the faces are oriented incorrectly(spun 180 degrees). Is there a way in Papervision3D to spin a cube face? The other place I think the problem may be is when I create the bitmapData that will be applied to the cube faces.

View 3 Replies

ActionScript 3.0 :: Number Data Type Adds Incorrectly?

Dec 27, 2011

When adding Numbers, AS3 seems to add incorrectly?:

Code:
var num:Number = 5.4;
for(var i:int=0; i<100; i++)
{

[Code]...

Why do I get Numbers into the tens of decimal points?

View 1 Replies

ActionScript 2.0 :: Color Tweens Fades Incorrectly When Mouse Over?

May 10, 2006

[code]...

It fades in correctly when you mouse over but when you mouse out it turns to a black color when it should be turning blue. Not sure why.

View 2 Replies

ActionScript 3.0 :: Accessing Clips Inside Clips Of Dynamically Generated Clips

Jan 15, 2009

For loop generates clips containing clips. I need to access a specific clip (look_back) within the parent clip generated by the loop. Not sure how to do this.[code]

View 1 Replies

Flex :: Large Serifs In A Font Cause Flash To Measure Size Incorrectly?

Nov 2, 2009

I have a textarea where I measure the textWidth and textHeight to make sure the user cannot enter more text than can fit in the text area. I also extended the textArea with a textHeightNow and textWidthNow that measure the textField's dimensions since they update w/out requiring validation. Now this works great for 90% of the embedded fonts I'm using but any fonts that have giant serifs are not measured properly, for instance look at the 'f's in this text area:You can see they get cut off on both sides because textWidth and textWidthNow both return an incorrect size not taking into account the massive serifs.

View 1 Replies

Flash :: Private Function Set, Returning The Error "A Member Attribute Was Used Incorrectly?

Sep 7, 2011

In Actionscript 2 I find that I cannot have a "private function set" without returning the error "A member attribute was used incorrectly." If I change it to "public function set" I'm fine but that defeats the goal of trying to protect the function from setting externally

View 2 Replies







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