ActionScript 2.0 :: Positioning Mc With Loaded Picture Inside?
Apr 9, 2009
This is a webpage, where I use a modified gallery from tutorial (xml galllery with thumbs).This place is where I align picture movieclip in the center of area (which is also a mask).Sometimes, action clip doesn't get image _width and _height and load a picture with it's left upper corner in the center of mask movieclip. When I click again on thumbnail - image loads already perfectly how it should be centered. What can be the problem? maybe I missed something?Here is a modified code of the gallery:
I recently used the loadMovie action to load a .swf file to a target in the movie which it was being called from. Then I tried calling a picture to another target in the movie, but it did not load the picture as intended. I read about it on my book, but it didn't seem to work. Is there anyways on calling a picture into a target in the movie without placing the picture inside an swf file?
How do I position the arrows I've placed inside the TileList so that they point from the center of the TileList object and towards the border of the TileList object?
Currently, they're positioned in the top-left, and they points toward the expected direction. Because they're positioned incorrectly, it doesn't look good (See submitted files)
Today i tried to attach a movieclip using AS3, but i wanted to make the positioning inside the class.
And i obtained an error: First file(Document class)
PHP Code:
package { import test; import flash.display.*;
[Code].....
At sequence mc.q=Math.random()*100; in the trace from test.as it displays 'NaN'. How can I modify the value of 'q' (public variable) via instance? If i use a function like mc.setCoords(x,y) the script works fine.
I have the positioning for a movieclip set via _x and _y parameters. It works fine when I publish and test just that flash file with the movieclip in it. Problem is, this flash file is embed inside another. Once I load the main flash file, the _x and _y are relative to that parent file.
How can I take a loded image and with actionscript position it at say 45 degrees (3d, not 2d) so that it looks like I'm looking from one side. It would have a 3d look.
So, basically, I've loaded an .swf into an empty movie clip in my movie and positioned it with this code:
[Code]...
When I hit cntrl + enter, everything lines up looks good and works fine. When I do a publish preview in HTML however, the mc is dragged all the way to the bottom of my screen and mostly hidden beneath my footer.
basically, I've loaded an .swf into an empty movie clip (myContainer_mc) which is itself located in another mc called loop_mc on the main stage and positioned it with this code:
Code: var lp:Object = new Object(); lp.onResize = function() { loop_mc._y = Stage.height-275;
[code]....
When I test the website in flash (ctrl+enter) everything looks perfect and works right, however when I view the website in a browser the movie is dragged all the way to the bottom of my page and mostly hidden beneath the footer.
I have a flash movie that has an internal movie clip, when the various buttons are pressed I want to load a movie in place of this original so I have put this script one of the buttons:
[Code]...
However, the new movie is not positioned in the correct place ie - instead of it being in the same position as the original MC the top left corner is positioned in the middle of the stage.
-would it be possible to set the _x and _y of image.jpg relative to myMC?You see moving myMC and then loading the picture into it will not me because myMC is to be scaled and manipulated, so its axis must be in the center of the loaded image.
I'm working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.
[Code]....
the problem is that i would like put all these movies well aligned in rows and columns, i've seen it's possible to do this with a nested for.. loop, something like this
I want to make a picture gallery and use buttons that move you from picture to picture and backwards, but I don't want to tell button 1 to go to frame 2 and button 2 to got to frame 3 and so on (I hope you know what I mean)Can I use on button on a separate layer with the same action set? I tried something like that, but it didn't work:
on (release) { thisframe =+1 } [code]........
but it didn't work. I'm kind of new to any action script other than gotAndPlay, easy functions and all that.
I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
I need to know the width of a picture I load into a clip. But I always get Zero, while I see the picture properly loaded. What Am I doing wrong in this piece of code ?
how can i resize the dynamically loaded pictures: i have around 100 pictures, and i don't have the time to make thumbnails from every picture. i'm thinking to change the image size to display the thumbnails.In the xml i want to put only the <image>the link of the picture</image> code, and in flash i want to resize this image that will be displayed in the thumbnail scroller.
Im trying to make a slideshow in flash, but i want to be able to change the pictures in the flash file, by just uploading new ones to a FTP server, with the right names and resolution..
In my following code "Btn.onRelease" doesn't work after "LoadImg()" was call, How can I solve this, because I want to detect a click on Btn once the new picture was loaded.
Here is my code : var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(this); function LoadImg() {mcLoader.loadClip("images/p0.jpg", Btn); }LoadImg(); Btn.onRelease = function(){trace("onRelease"); };
Users can write a text, modify it (in type, color and size) and choose a picture (which is loaded through a XML-file) for an e-card, then send it to whomever they want. But when they have made the modifications, how do I save the card, and then store it in a database?
I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
Here is the loading code..
var context:LoaderContext = new LoaderContext(); if(Security.sandboxType == Security.REMOTE){ context.securityDomain = SecurityDomain.currentDomain }; var objLoader:Loader = new Loader();var mRequest:URLRequest = new URLRequest("SomeURL.swf");objLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, onSWFLoadComplete);objLoader.load(mRequest, context);
I have just been to a really nice website that has some really nice use of Flash on it.... I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.
I am trying to build a site that would give users the ability to upload a picture to a picture frame on my site. I would like AS3 to dynamically re-size, and upload the file from an upload bar under the frame.
I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.It must be some sort of actionscripting but how is it done?
i got five images, and five buttons, every image has a color, and lets say we start at the red one. When i click the the green button i want the green image to fade in.. i fugured out a way to do this on the timeline, but then i have to have a black box first fading in to remove the old picture and then start fading in the new picture..
I made a simple picture slideshow with a timer, prev/next buttons, pause/play buttons and jump buttons. Everything went good so far.Now i'm trying make every picture go to a URL when the picture is clicked but only the link on the first frame goes to the URL when clicked the other 5 buttons do nothing when click.(FYI: I made alpha 0% buttons in a layer above pictures)I tried two different codes but both have no effect.
as layer
Code: stop(); var nextImage:Timer = new Timer(3000); nextImage.addEventListener(TimerEvent.TIMER,playNext); nextImage.start();