Posts by timmylogue

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

So, by default, when you add text to a TextField, the text appears at the top, and works it’s way down to the bottom. I would like to do the opposite: I would like to have it appear at the bottom of the TextField, and move it’s way up to the top.

I’m using the code below and it sorta works haha. The only issue i’m having is that if the text gets longer and longer, it seems to be pushing the whole TextField down and not keeping it in the same x and y position on stage. (hope I explained that correctly).

var bottomCoord;

bottomCoord = myDescription_txt.y + myDescription_txt.height;
myDescription_txt.autoSize = "left";

myDescription_txt.y = bottomCoord - bottomCoord.height;
myDescription_txt.text = "Pellentesque habitant morbi tristique senectus" 

Anyway to do this?

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Thanks! I’ll take a look at it.

- Tim
321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

I’m trying to figure out how to remove a child with a specific attribute selected (filename). I have PHP displaying an XML file on a page that loads images. If someone where to click on any image or hit the delete button -

<a href=""><img src="' . $child['src'] . '" alt="gallery image" />Delete me</a>

... it would know where to find in the XML file and delete it.



Here what loads and displays my XML file:


<?php
   $xml = simplexml_load_file('myPhotos.xml');
   //echo $xml->getName() . "<br />";
   foreach ($xml->children() as $child)
    {
        echo '<img src="' . $child['src'] . '" alt="gallery image" />';
    }
?>



Here is my XML structure:


<slideshow>
<image src="myPhotosResized/image1.jpg" desc="This is the 1st image!" />
<image src="myPhotosResized/image2.jpg" desc="This is the 2nd image!" />
<image src="myPhotosResized/image3.jpg" desc="This is the 3rd image!" />
<image src="myPhotosResized/image4.jpg" desc="This is the 4th image!" />
</slideshow>

Any help is appreciated! :D

Tim
321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Shouldnt you be appending $url and $effect to $image instead of root?

Damnit!
See… something that simple. I feel dumb :|

Thank man! Appreciate your help with fixing that.

Tim

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

I’m generating a xml file. XML’s are not my thing when it comes with php. Everything is great (besides one issue and probably a simple fix) Anyone kind enough to help me?

PHP script: http://pastie.org/8168404

My XML generates out like this:

<?xml version="1.0"?>
<images>
   <image/>
       <url>manage/myImages/Slide1.JPG</url>
       <effect>blur</effect>
</images>

But I want my XML to generate out like this:

<?xml version="1.0"?>
<images>
   <image>
       <url>manage/myImages/Slide1.JPG</url>
       <effect>blur</effect>
   </image>
</images>

Thanks :-P
Tim

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

oh… thanks, this was fixed. I use the delay call function.

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

just set up a delayed function call with whatever tween library you’re using to fade in/out? if your timer is firing too fast then you’ve probs set it up wrong… new Timer(3000) would be 3 seconds…

Thanks, been doing that, I’m using: http://supergeekery.com/geekblog/comments/delaying_a_function_call_in_flash_as3

... but I’m getting an error when I run it.
TypeError: Error #1006: value is not a function.
    at com.jmx2::delayedFunctionCall/callDelayedFunction()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.utils::Timer/tick()

Thanks for your help so far! I appreciate it!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

haven’t looked at your code but surely you just need to stop the audio from playing once the fade is complete and then start it again before fading it back up?

Thanks!

I’ve been trying that, but stopping the music ignores the fades…. well it doesn’t, but the stop just happens to fast before the fade happens. I was trying to setup a timer event…. is that correct? Like fadeOut/FadeIn and the have the timer event trigger 3 seconds after in both those cases?

Thanks!

321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

Hey MSFX! Thanks for the speedy reply!

I’m having a situation with sound overlapping. Let me explain….

In my AS3 project file, I have a YouTube Player and a Music Audio Player. Once the YouTube Player video is completed (“case 0” YouTube API) it fades in the Music Audio Player and plays for 30 seconds, then after the 30 second it fades out the Music Audio Player and then plays YouTube Player and just repeats that process.

The fade in and fade outs work great with the Audio Player, but the issue i’m having is when the audio track is finished (meaning it repeats over again , loops) it just plays on top of the YouTube Player till the next time the YouTube Player switch case starts fades out process.

Make Sense?

Here is my YouTube case: http://pastebin.com/VyJB6ZyM

Thanks!
Tim
321 posts
  • Has been part of the Envato Community for over 7 years
  • Has collected 100+ items on Envato Market
  • Located in United States
timmylogue says

In AS3, can someone give me an example of how to detect a “case 1” statement from a another class file?

Thanks Tim

by
by
by
by
by
by