ActionScript 2.0 :: Building A Dynamic Content Page In Flash That Consists Of Using AttachMovieClip And CreateEmptyMovieClip With Coordinates To Place Photos And Objects
Oct 15, 2006
I'm building a dynamic content page in flash that consists of using attachMovieClip and createEmptyMovieClip with coordinates to place photos and objects, which are loaded from an external source and scrolling their thumbnails I've run into a problem setting the variables correctly because the scrolling thumbnails required that the thumbnails be nested inside a scrolling controller clip and that has somehow messed up my preloading and sequential text caption loading for the tumbnails.
How do I get the size of the content area of Container objects? One non generic solution is checking for styles I suppose but I am looking for some code that works generic for all standard flex Container objects. The controls are Flex 3
I'm trying to create a simple interactive animation for a website that consists of three rollover areas on a page. When you mouse over an area, a bit of explanatory text is revealed by animating a mask over some text. The text is left displayed until a mouseover of a different area occurs.Let's call the three mouseover targets A, B, and C.A MOUSE_OVER event listener is registered for all three targets. In the event handler for each, I'm following a pattern like this:
I am attempting to dynamically display a series of questions with answers in my flash movie from an existing ASP page. Initially, the dynamic questions imported from an ASP page appear on the Flash page (question 1, 2, 3, etc.). When the user clicks on a question, the flash movie advances a frame and displays the answer. I can display the questions properly, but I am having a difficult time carrying over the question ID to the next frame so that the appropriate answer will display.
The current database fields look like this:
-QuestionID -Question -AnswerID -Answer
This is very simple to do in ASP or PHP but I am having a tough time trying to tie everything together in Flash. Should I create two separate ASP pages, one to query the questions and one to query the answers? How do I carry the QuestionID to the next frame in Flash?
I have a master page and a child page and have placed the javascript code inside the child page for flash movie.
The problem is the movie seems working when there is a alert on, without at least one alert msg, the code does not work, I am sure you people can solve, I can see that the following code works well in both Mozilla and IE, but only if the alert is ON, if I put it off, then the code does not work. Can anybody tell me what is the workaround :
I would like to have some dynamic content on the pages... I want to use it for a website. The problem is, when you click anywhere on the page, it reacts. I tried putting an MC over it to override it, I tried removing the Mouse listener temporarily... I'm not too advanced with AS, but I thought I'd give it a try... Well I just can't figure it out.
Is there any way that I could make it so that when the mouse is in a certain area and is clicked, the pages do not react like they should? With the dynamic content I'm going to need scrollbars and stuff and that just isn't going to work unless I can do this.
I am trying to build a page transition in Flash. The way I have it set up right now is as follows: 1) I have a movieClip with the transition animation.
2) I have two buttons, both MovieClips. And the actions layer of my timeline is scripted as follows: Code: stop(); mybutton1.onRelease=function(){ navVar="firstpage" _root.transitionClip.play(); } mybutton2.onRelease=function(){ navVar="secondpage" _root.transitionClip.play(); }
3) The last from of my Transiition movieClip I have this code: Code: stop() if(navVar=="firstpage"){ _root.gotoAndPlay(navVar); }else if(navVar=="secondpage"){ _root.gotoAndPlay(navVar); }
When I click on the buttons, they are loading the transitionClip movieClip. But they are not moving to the correct framelabel after they hit the last frame of that movieClip.
I'm creating a backend using flash, php and mysql. The problem i'm having is that i have 2 dynamic text fields on the stage that i want it to display their content based on the page i am. My txtTitle is showing both mysql rows together like this: Aboutabout_content=About from MySQL Here is my coding:
I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.
I'm in the process of making a board game in Flash; as part of process of getting fully to grips with Flash AS3.
I have a JPEG of the original board. This contains ~ 1000 circles that players may move pieces between. Pretty standard board-game stuff. The circles are not in any way regularly spaced.
So far, I've drawn the circles in Flash, by hand, and positioned them where they need to be. This looks great - I can see all my places.
What I want to do now is create these circles programatically. I want to be able to do this so I can adjust how the spaces look (depending on game state). Eventually I'll want to be able to zoom / pan the entire game board as well.
My question is, is there a way of tagging each circle with a unique reference and then looping through and recording locations?
I'm thinking something a bit like the Javascript DOM "getElementsByTagName" or similar.
At the moment I can only see two options:
Convert each circle to a symbol and give it a unique class name so I can access it from code Go through and write down the X/Y of each circle (add to my DB of board locations that I already have) so I can plot them programatically
how it is possible to edit dynamic content and modify the content and save it, all within flash.I have tried some experiments in the past and have got the text to change etc which is easy but i need a way to save the content so the next time anybody sees the flash it will have the latest content until i change it again.
I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random orderI want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x 5 grid)Movie size is 1024 x 768Here's my code, which doesn't work:
stop(); var myXArray=[57, 187, 317, 447, 577, 707, 837]; //cordordinates for x var myYArray=[53, 183, 313, 443, 573, 573, 573]; //cordordinates for y
is it possible for flash to detect off-stage mouse coordinates in order to continuously drag an object within its bounds while the mouse is moving outside of the stage? for example: i have a draggable red square on my stage. the stage is the bounds of the drag. if i drag the red square to the bottom of the stage and continue to drag outside of and around the stage, i'd like the red square to continue moving within it's bounds, following the mouse coordinates. currently, dragging halts as soon as i leave the stage and the red square only begins to move with the mouse coordinates if i reenter the stage bounds.
I've just started working on a Flash-based annotation tool. How it works is I place a transparent flash movie in a DIV over a HTML page and draw on it.Now the drawing part turned out to be fairly simple and I found numerous examples to get me free-form drawing. Its the erasing that's driving me nuts. All the examples out there I looked at either cleared the entire canvas, or let me click on specific drawings to take them off the canvas. I need an MS-Paint style eraser that just rubs things in its path.I could draw in white to simulate erasing, but that wont work. I have a transparent flash movie and the background HTML needs to show through.Here's the script for the drawing bit I picked up from Adobe, and on which I'm trying to build the eraser.
[url]...would it be possible to integrate HTML pages into this template using AS3.0. Specifically, I would like to put the HTML page inside one of the modules, and have it appear and dissappear just like the other modules, except the content would be HTML driven.
I would like the HTML page to load with an animation like the module backgrounds do, but the content can be easily customized because it's HTML.
So I have a photo gallery that loads with a series of thumbnails that link to larger images.The entire gallery is dynamically added to the stage using attachMovie when a user clicks on a button. Because the gallery is pretty big, I want to add a preloader that tells the user that thumbnails are loading. I have set my gallery up using three frame. The first frame measures how many bytes have been loaded, the second frame loops the timeline back to the first frame using 'gotoAndPlay(1);' The preloader code on the first frame looks like this:
I'm trying to build a "product spotlight" area on my site's homepage. There are a lot of products, so I want to display them randomly, and I want to specify an image, link and text in the XML file.
I've started by using the XML gallery on kirupa.com, but that didn't quite do what I wanted. I found a little workaround when I found a random XML image loader on another site, and used that.. all it would load was an image, so to make the product photos be links and have special text I made each photo a .swf instead of .jpg file and added a button link over the whole image. This way works, but we are adding more and more products and it's becoming cumbersome. There will be about 50 different products randomly changing.
It would be perfect if we could just set up the xml like
<list> <product> <image>whatever.com/product1.jpg</image> <url>whatever.com/product.2htm</url> <title>Buy this now for $3.50</title> </product> <product> <image>whatever.com/product2.jpg</image> <url>whatever.com/product2.htm</url> <title>Buy this now for $4.50</title> </product></list>
And then the flash file would have the link on the top layer and pull the url from the xml file, bottom layer would load in the image, and in the middle we'd have the title, maybe I'd have it slide in with a basic tween or something like that. And then, there could be like 50 different images listed in the xml, and it would display one randomly for like 10 seconds, then fade into a new one, and just keep swapping it out forever and ever. I really want to do it this way because I can update the text or images without having to build a new .swf file every time something changes.I know how to do some regular basic flash stuff, but I never got into the hardcore actionscripting, so I'm kinda stumped. Anyone know how I can pull something like this off or know of freeware example that I can use and build off of?
I'm trying to build a "product spotlight" area on my site's homepage. There are a lot of products, so I want to display them randomly, and I want to specify an image, link and text in the XML file.I've started by using the XML gallery onbut that didn't quite do what I wanted. I found a little workaround when I found a random XML image loader on another site, and used that.. all it would load was an image, so to make the product photos be links and have special text I made each photo a .swf instead of .jpg file and added a button link over the whole image. This way works, but we are adding more and more products and it's becoming cumbersome. There will be about 50 different products randomly changing.
<list> <product> <image>whatever.com/product1.jpg</image> <url>whatever.com/product.2htm</url> <title>Buy this now for $3.50</title> </product> <product> <image>whatever.com/product2.jpg</image>
Ive been trying to find a way to play 3 photos and stop when I click on The vision page on my site. I have the site laid out like this Home Vision Contact when I click on the VISION i need the photos fade in and out and stop to show the vision statement...
I have decided to build my own XML gallery. The flash loops through, checks how many images there are and duplicates a movie clip to match the amount of photos on that page. The duplicated mc's are given the names "hello"+z, but when trying to load the images they don't want to load (I have taken the code that loads the dynamic images out). When I trace "hello"+z, it gives me an undefined.
Here is the code: //builds an array for the amount of XML nodes function loadXML(loaded) { vararPhoto =[] if (loaded) { xmlNode = this.firstChild; [Code] .....
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:
I'm trying to figure out the best way to make the text in the upper right hand corner of my photos page linkable URL...Here's the action script that's in the action layer of the file for that spirt: function loadGallery(directory, images)[code]
i'm attempting to position a textfield to the bottom left of an image that is added to the display list from the Loader() class. i don't know how to access the width/height information of the image.
var dragSprite:Sprite = new Sprite(); this.addChild(dragSprite); var imageLoader:Loader = new Loader(); imageLoader.load(new URLRequest("picture.jpg"));
[code]....
within the displayPic function, i could assign the evt.target.content.height and evt.target.content.width to variables that i could use to position the text field?
Suppose I have an IFRAME (or even better a Div, if it works?) set at 50% width. And if I put a swf in there, with the swf's size set to expand and fill the area, I'm assuming it will resize accordingly.Then when I resize the window, the frame and the SWF resizes(correct?)THEN, is it possible to place content in the SWF that will adjust accordingly? What I'm trying to do is lay out a series of identically sized thumbnails w/in the swf that will wrap to the area width. Exactly like a list of inline divs, but within the swf. I'd like to figure out a way to make the SWF know its size as it changes and adjust the positioning of contents in the swf fluidly.
How do i change content on a page each time a user visits or refreshes the page? example: the icon on kirupas header changes when the page is refreshed or re loaded. I have searched using dynamic content, but didn't quite find it...I only want to change 1 image..
I'm trying to print a mc which is bigger than the default page size. I want to change the page/margin size so the content can fit in the page without scaling. Per the API reference [URL] the page settings are readonly. How can I print something bigger than the default page size? Is it doable in AS2 or AS3?