Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

chefkeifer's Achievements



  1. I have been following Zync's tutorial and have done everything he has done. As far as i know. I keep getting this error. TypeError: Error #1010: A term is undefined and has no properties. at main/xmlLoaded() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.greensock.loading.core::LoaderCore/_completeHandler() at com.greensock.loading::XMLLoader/_completeHandler() at com.greensock.loading::XMLLoader/_receiveDataHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() here is my code. package { import com.greensock.events.*; import com.greensock.loading.*; import com.greensock.*; import flash.display.Sprite; import flash.display.MovieClip; import com.greensock.loading.XMLLoader; import com.greensock.events.LoaderEvent; import com.greensock.loading.LoaderMax; import com.greensock.loading.ImageLoader; import com.greensock.loading.data.ImageLoaderVars; import flash.display.MovieClip; import flash.text.TextField; import flash.events.MouseEvent; import com.greensock.loading.display.ContentDisplay; public class main extends Sprite { public var thumbHolder:MovieClip; public var mainHolder:MovieClip; public var titleTxt:TextField; public var descTxt:TextField; private var xImgList:XMLList; public function main() { //load in our xml var xPhotography:XMLLoader = new XMLLoader("xml/buggies.xml"); xPhotography.addEventListener(LoaderEvent.COMPLETE, xmlLoaded); xPhotography.load(); } private function xmlLoaded(e:LoaderEvent):void { var xData:XML = e.target.content; xImgList = new XMLList(xData.img); //Setup a loadermax object var thumbLoader:LoaderMax = new LoaderMax({name:"thumbLoader"}); thumbLoader.addEventListener(LoaderEvent.COMPLETE, thumbsLoaded); //setup variables for our imageLoader Vars var nImgWidth:Number = 150; var nImgHeight:Number = 100; var nMaxCols:Number = 2; for (var i:int = 0; 1 < xImgList.length(); i++) { var iLoad:ImageLoader = new ImageLoader("images/buggies/" + xImgList[i].@url, new ImageLoaderVars() .name(xImgList[i].@name) .width(nImgWidth) .height(nImgHeight) .smoothing(true) .container(thumbHolder) .x((i % nMaxCols) * nImgWidth) .y(int(i / nMaxCols) * nImgHeight) .scaleMode("proportionalOutside") .crop(true) .prop("index", i) .prop("url", xImgList[i].@url) .prop("title", xImgList[i].@title) .prop("desc", xImgList[i].@desc) .alpha(0) ) thumbLoader.append(iLoad); } thumbLoader.load(); } private function thumbsLoaded(e:LoaderEvent):void { //setup click events for our thumbnails for (var i:int = 0; 1 < xImgList.length(); i++) { var cdImg:ContentDisplay = LoaderMax.getContent("p" + (i+1)); cdImg.buttonMode = true; cdImg.addEventListener(MouseEvent.CLICK, thumbClick); TweenMax.to(cdImg, 1, {autoAlpha:1, delay:(i*0.2)} ); } } private function thumbClick(e:MouseEvent):void { var vars:Object = ImageLoader(e.currentTarget.loader).vars; trace(vars.title); checkOldImage(vars.index) } private function checkOldImage(index:Number):void { //check if theres alreayd an image loaded if(mainHolder.numChildren > 0) { var oldClip:Sprite = Sprite(mainHolder.getChildAt(0)); TweenMax.to(oldClip, 0.5, {autoAlpha:0, onComplete:function(){ mainHolder.removeChildAt(0); loadImage(index) } }); }else { loadImage(index); } } private function loadImage(index:Number):void { //Get filename var file:String = xImgList[index].@url; //change text display titleTxt.text = "Title:" + xImgList[index].@title; descTxt.text = "Description:" + xImgList[index].@desc; //setup our main image loader var mainLoad:ImageLoader = new ImageLoader("images/buggies/" + file, new ImageLoaderVars() .width(500) .height(500) .scaleMode("proportionalInside") .container(mainHolder) .smoothing(true) ) //setup event listeners mainLoad.addEventListener(LoaderEvent.COMPLETE, imageLoaded); mainLoad.load(); } private function imageLoaded(e:LoaderEvent):void { var imgClip:ContentDisplay = LoaderMax.getContent(e.currentTarget.name); TweenMax.to(imgClip, 0, {colorTransform: {exposure:2}} ); TweenMax.to(imgClip, 1.5, {colorTransform: {exposure:1}, autoAlpha:1} ); } } }
  2. thanks carl, that was a big help and stupid oversight on my part. As always it the little things that stump yor the longest time. I also figured out the columns with the following code just for future reference import com.greensock.events.*; import com.greensock.loading.*; import com.greensock.*; import flash.display.Sprite; import flash.display.MovieClip; var loader:XMLLoader = new XMLLoader("../xml/buggies.xml", {name:"buggies", onComplete:completeHandler}); loader.load(); function completeHandler(event:LoaderEvent):void { var xml:XML = event.target.content; var xmlItems:XMLList = xml.buggies; var columns:int = 2; var xPos:int = 0; var yPos:int = 0; var counter:int = 0; var item:buggieItem; for each(var xmlItem:XML in xmlItems) { item = new buggieItem(); addChild(item); item.title.text = xmlItem.title[0].text(); item.condition.text = xmlItem.condition[0].text(); item.model.text = xmlItem.model[0].text(); item.features.text = xmlItem.features[0].text(); item.salePrice.text = "$" + xmlItem.salePrice[0].text(); item.image.text = xmlItem.image[0].text(); item.x = xPos; item.y = yPos; counter++; if ( counter > ( columns - 1 ) ) { counter = 0; xPos = 0; yPos += 210;//item.height; } else { xPos += 545;//item.width; } } i am still need of some help if you dont mind. I need to know how to get the image to show up in each of them as well... i understand the xml part but i am not sure how to get that info from xml with just the dataLoader..do i need to do another imageLoader to get that to happen?
  3. I am wondering why when the first node which is this item.title.text = xmlItem.title[0].text(); is in there causes an error and they overlap as well...not sure how to word that.. but when i comment that out all works just fine..the movieclip loops and with all the data from the xml work just. i have attached a working fla file i am also trying to figure it out how to get these to show up in two columns and not one continueous column thanks for your help http:// http://www.nicholsbuggies.com/greensock ... uggies.zip
  4. Hey Jack, thanks for all you help in the past. but of course I still have issues. I am trying to bring in a swf from another folder that contains the SlideshowExample you create (its tweaked to fit my needs). All works seperatly, meaning when i test the seminole_photos1.fla it works just fine. When i test the fr_seminole.fla it works fine except when i click on the first photo icon to pull in that seminole_photos1.swf into fr_seminole.swf. I hope that makes sense. I am wondering if the folder structure is all out of wack. Not sure why the pictures one show up. this is the error i get when clicking on that first photo icon Loading error on XMLLoader 'loader0' (assets/data.xml): Error #2032: Stream Error. URL: file:///C|/Users/keith/Documents/Websites/atvRedneckNationals/flash/test/photos/assets/data.xml i have tried every folder structure i can think and it still cant get any images to show here is a link to a scaled down fla folder package... http:// http://www.keifersdesign.com/greensock/test.zip
  5. Is there a way to zoom upon the users mouseclick on the stage. for instance if the user click on certain part of the page it will then zoom from that point. Is transformAroundCenter the way to go about this?
  6. sorry Jack. i was unsure if you could or would download from my server... here is the zipped file with the html, css, flash, and the huge swf file thanks again for hanging with me. http:// http://www.keifersdesign.com/greensock/test.zip
  7. the reason i didnt upload the subloading file is because its 20megs...but i changed the file location to point to the url. here is my html. pretty plain and simple thanks for you help.
  8. i guess the reason you didnt see anything is that your probably using mozilla. for some reason that is the only browser nothing shows up in. Not sure why. anyway here is my fla.
  9. thanks again for you help and i have done my research and have come up with another issue...or course...thats me..ask my wife..just kidding...all works just fine except for when you the user goes to the page initianally...it acts a bit wierd...it uploads very huge...here is the link to see what i am talking about.. http:// http://www.worldkarting.com/online.maga ... .scene.php but if you minimize it all works just fine...as well when yo maximize again..it works just fine...its just when you first go to the site...not sure what the issue could be...i thought you could still have some insight...this is the code i have been using and learning from import com.greensock.layout.*; import flash.display.StageAlign; import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; this.stage.align = StageAlign.TOP_LEFT; var ls:LiquidStage = new LiquidStage(this.stage, 1024, 853, 100, 100); var topArea:LiquidArea = LiquidArea.createAround(topBar_mc, {scaleMode:ScaleMode.WIDTH_ONLY}); topArea.pinCorners(ls.TOP_LEFT, ls.TOP_RIGHT); ls.attach(logo, ls.BOTTOM_RIGHT); ls.attach(archives, ls.TOP_LEFT); var magArea:LiquidArea = new LiquidArea(this, 150, 60, 1024, 700); var magLoader:SWFLoader = new SWFLoader("01.2011.karting.scene.swf", {name:"kartingScene", container:this, alpha:0, onProgress:progressHandler, onError:errorHandler, onComplete:completeHandler, onInit:onMagLoaded}); magLoader.load(); function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { trace(event.target + " is complete!"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } function onMagLoaded(event:LoaderEvent):void { magArea.attach(magLoader.content, {scaleMode:ScaleMode.PROPORTIONAL_INSIDE}); TweenLite.to(magLoader.content, 1, {alpha:1}); TweenMax.to(magLoader.content, 1, {dropShadowFilter:{color:0x000000, alpha:1, blurX:12, blurY:12}}); }
  10. thanks again Jack...i kept pulling from the wrong com folder...I will get this... one last question ...in this code what does the 400,400 refer too i know that the 800,800 is the width and height of my stage but not sure what the other is refering too var ls:LiquidStage = new LiquidStage(this.stage, 800, 800, 400, 400); also in this code i know that the 0,60 is the x and y coordinates for the magLoader but not sure what the 800,700 is refering too var magArea:LiquidArea = new LiquidArea(this, 0, 60, 800, 700); thanks again
  11. i tested the file you sent and i still get that coercion error Scene 1, Layer 'Layer 1', Frame 1, Line 14 1118: Implicit coercion of a value with static type Object to a possibly unrelated type String. Scene 1, Layer 'Layer 1', Frame 1, Line 35 1118: Implicit coercion of a value with static type Object to a possibly unrelated type String. i know i have the latest version because i just renewed jsut the other day. What could be the issue?
  12. I am Shockingly Green. i renewed the other day. I appreciate your help...
  13. not that new to AS but still learning. i am very new to the liquid stage part. i am using your loadSWF to load the swf which is in side of a movie clip. i have actaully started over since i posted this. and yes that code was copied and pasted. i use the example and was going to learn from it and tweak it. here is what i came up with when i started over. i still get that coersion error i have attached a fla
  14. also, is it better to make my whole project small with higher quality images and when it expands doesnt lose quality. or do i make it big and then have it scale down. I am at a loss fo where to start, even though i am almost done...lol
  15. I am trying to do an online magazine. i made my layout in inDesign CS5 and exported it out to a swf. I have some code that imports the swf into my flash file. The problem i am having is that its too big for most browsers. right now i have my flash file setup as 1525x850 to fit the exported (inDesign) swf. I want to be able to scale if someones monitors size or browser size it smaller. How do i go about this ? i am using this code and i keep getting a coercion error import com.greensock.layout.*; //create a LiquidStage instance for the current stage which was built at an original size of 550x400 //don't allow the stage to collapse smaller than 550x400 either. var ls:LiquidStage = new LiquidStage(this.stage, 625, 400, 625, 400); //attach a "logo" Sprite to the BOTTOM_RIGHT PinPoint ls.attach(logo, ls.BOTTOM_RIGHT); //create a 300x100 rectangular area at x:50, y:70 that stretches when the stage resizes (as though its top left and bottom right corners are pinned to their corresponding PinPoints on the stage) var area:LiquidArea = new LiquidArea(this, 50, 70, 300, 100); //attach a "myImage" Sprite to the area and set its ScaleMode to PROPORTIONAL_OUTSIDE and crop the overspill area.attach(myImage, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE, crop:true}); //if you'd like to preview the area visually (by default previewColor is red), set preview to true area.preview = true; //attach a RESIZE event listener to the LiquidStage instance (you could do this with the LiquidArea as well) ls.addEventListener(Event.RESIZE, onLiquidStageUpdate); function onLiquidStageUpdate(event:Event):void { trace("updated LiquidStage"); }